adrianbarbos / mobilpay

Laravel 5 mobilpay wrapper around omnipay with omnipay-mobilpay driver
MIT License
19 stars 23 forks source link

Error on payment complete #11

Open vladNVT opened 4 years ago

vladNVT commented 4 years ago

Hi,

I get this error: Undefined property: Omnipay\MobilPay\Message\CompletePurchaseRequest::$action {"exception":"[object] (ErrorException(code: 0): Undefined property: Omnipay\MobilPay\Message\CompletePurchaseRequest::$action at /..../vendor/adrianbarbos/omnipay-mobilpay/src/BusinessMastery/Mobilpay/Message/CompletePurchaseRequest.php:109)

On the mobilPay app it has status 'payed', and when it tries to confirm to my app confirm endpoint, it get Error 500... I guess it has someting to do with one of these lines: "$response = Mobilpay::response();" "$data = $response->getData();" or "$response->getMessage()"

The plugin version I used is "adrianbarbos/mobilpay": "^1.0", Also, the error occurs only in some users payment situations, not all the time

Can anyone help?

Thanks very much!!

danstoian07 commented 4 years ago

Try to generate new Public and Private keys. I had a similar issue with an error in the same file (CompletePurchaseRequest.php), and this solved the problem. Another thing, try to experiment with the PHP version. I think I had some issues with 7.4 and switched to 7.3.

I hope this helps!

vladNVT commented 4 years ago

Thanks ! It worked for the moment, In all my tests the process runs smooth , but I discovered a pattern in the users than encountered the error. They all have used diacritics in the card name... and I wonder if that could be the problem. (all the users who managed to successfully make a transaction have card names without diacritics.

Thanks again for the quick reply!

danstoian07 commented 3 years ago

Now I get this error in a client's store. I also think it may be because of diacritics. I found the same pattern, they had diacritics in the name. All the confirmed payment don't have diacritics.

The confirmation endpoint fails with status 500: $response = Mobilpay::response(); IDS_Model_Purchase_Sms_Online_INVALID_RESPONSE_STATUS

Maybe a diacritics filter should solve the problem? Or should I enable some PHP extension?