Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined property 'TransactionStatus' in class 'Eway\Rapid\Model\Response\CreateTransactionResponse' #28

Open
shangguan-chenxi opened this issue Sep 9, 2022 · 1 comment

Comments

@shangguan-chenxi
Copy link

shangguan-chenxi commented Sep 9, 2022

array(3) { ["Customer"]=> array(1) { ["CardDetails"]=> array(5) { ["Name"]=> string(10) "John Smith" ["Number"]=> string(16) "4444333322221111" ["ExpiryMonth"]=> string(2) "12" ["ExpiryYear"]=> string(2) "25" ["CVN"]=> string(3) "123" } } ["Payment"]=> array(1) { ["TotalAmount"]=> int(1000) } ["TransactionType"]=> string(8) "Purchase" }
Notice: Undefined property 'TransactionStatus' in class 'Eway\Rapid\Model\Response\CreateTransactionResponse' in C:\Users\hp\Desktop\lifeByteSrv\eway-rapid-php-master\src\Rapid\Model\Support\HasAttributesTrait.php on line 199

Above are the output information I got, I totally copied and pasted the example code then replaced the apiKey and apiPassword (also cpoied from the sandBox Business Centre)

I had printed the $response and find the following:
object(Eway\Rapid\Model\Response\CreateTransactionResponse)#9 (3) { ["fillable":protected]=> array(17) { [0]=> string(10) "AccessCode" [1]=> string(17) "AuthorisationCode" [2]=> string(11) "BeagleScore" [3]=> string(19) "CompleteCheckoutURL" [4]=> string(8) "Customer" [5]=> string(6) "Errors" [6]=> string(13) "FormActionURL" [7]=> string(7) "Payment" [8]=> string(12) "ResponseCode" [9]=> string(15) "ResponseMessage" [10]=> string(16) "SharedPaymentUrl" [11]=> string(11) "TotalAmount" [12]=> string(13) "TransactionID" [13]=> string(17) "TransactionStatus" [14]=> string(15) "TransactionType" [15]=> string(12) "Verification" [16]=> string(19) "AmexECEncryptedData" } ["errors":protected]=> array(1) { [0]=> string(5) "S9992" } ["attributes":protected]=> array(1) { ["Errors"]=> string(0) "" } }
According to the "errors", I found S9992 error code; refer to the documentation, it meanss "Error connecting to Rapid gateway", but the php can definitely have access to the public internet

Any solution to this?

@shangguan-chenxi
Copy link
Author

Problem solved, solution from StackOverflow

What you need to do is update your certificate.
On your server upload this file - https://curl.haxx.se/ca/cacert.pem
Make sure its not in your www folder, somewhere only apache can access.
Then in your php.ini file add this line to the bottom:
curl.cainfo=C:\wamp\certificates\cacert-2016-11-02.pem
Replace C:\wamp\certificates\cacert-2016-11-02.pem with the path of the certificate you just uploaded. Restart your server. It should now start working.
Here is some more information:
Update WAMP/Apache to use new cacert.pem
https://curl.haxx.se/docs/caextract.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant