php-keyclient icon indicating copy to clipboard operation
php-keyclient copied to clipboard

parseResponsePayment does not require any parameters?

Open FerX opened this issue 9 years ago • 3 comments

I have an error in the final inspection. parseResponsePayment does not require any parameters?

$response = $client->parsePaymentResponse(???);

thanks.

FerX avatar Feb 08 '16 15:02 FerX

the error: Fatal error: Uncaught exception 'Eo\KeyClient\Exception\KeyClientException' with message 'Missing parameters passed: mac' in /var/www/vhosts/*****.net/engine/****/inc/pagamenti/keyclient/vendor/eo/keyclient/src/Payment/AbstractPayment.php:32 Stack trace: #0 /var/www/vhosts/*****.net/engine/*****/inc/pagamenti/keyclient/vendor/eo/keyclient/src/Payment/PaymentResponse.php(24): Eo\KeyClient\Payment\AbstractPayment->__construct(Array) #1 /var/www/vhosts/****.net/engine/****/inc/pagamenti/keyclient/vendor/eo/keyclient/src/Client.php(68): Eo\KeyClient\Payment\PaymentResponse->__construct(NULL)

FerX avatar Feb 08 '16 15:02 FerX

Looking at the return url not find var mac . &regione=EUROPE &codAut=TESTOK &alias=payment_testm_urlmac &orario=165426 &data=20160208 &importo=1 &$BRAND=MasterCard &tipoProdotto=MASTERCARD+-+CREDIT+-+N &cognome=******* &languageId= &pan=525599XXXXXX9992 &nazionalita=ITA &divisa=EUR &email=f******** &scadenza_pan=201612 &esito=OK &codTrans=14537 &nome=******** &messaggio=Message+OK

FerX avatar Feb 08 '16 16:02 FerX

It has been a while since I last used keyclient so I'm not sure if they actually changed something but the problem seems to be the missing "mac" value.

parsePaymentResponse accepts a Request parameter (if not given, it will create a new request from global variables, see: PaymentResponse.php#L21)

Here is the test function for parsePaymentResponse, hope this helps.

eymengunay avatar Feb 12 '16 10:02 eymengunay