We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I cancel a payment, mpay sends something like this to my notify endpoint:
$_GET = {array} [18] OPERATION = "CONFIRMATION" TID = "12345aa33" STATUS = "ERROR" PRICE = "15000" CURRENCY = "EUR" P_TYPE = "EPS" BRAND = "EPS" MPAYTID = "1234" USER_FIELD = "" ORDERDESC = "some nice description" CUSTOMER = "Werner Krauss" CUSTOMER_EMAIL = "[email protected]" LANGUAGE = "DE" CUSTOMER_ID = "" PROFILE_ID = "" PROFILE_STATUS = "IGNORED" FILTER_STATUS = "" APPR_CODE = ""
Silverstripe-Omnipay then creates a CompletePurchaseRequest, which tries to grab the transaction with the given TID from mpay24.
This results in an object like:
$params = {array} [20] OPERATION = "CONFIRMATION" TID = "12345aa33" STATUS = "ERROR" PRICE = "15000" CURRENCY = "EUR" P_TYPE = "EPS" BRAND = "EPS" MPAYTID = "1234" USER_FIELD = "" ORDERDESC = "some nice description" CUSTOMER = "Werner Krauss" CUSTOMER_EMAIL = "[email protected]" LANGUAGE = "DE" CUSTOMER_ID = "" PROFILE_ID = "" PROFILE_STATUS = "IGNORED" FILTER_STATUS = "" APPR_CODE = "" operationStatus = "OK" returnCode = "OK"
In ComplaetePurchaseRequest::sendData() I get this result:
$result = {Mpay24\Responses\TransactionStatusResponse} [7] paramCount = {int} 18 transaction = {array} [18] OPERATION = "CONFIRMATION" TID = "12345aa33" STATUS = "ERROR" PRICE = "15000" CURRENCY = "EUR" P_TYPE = "EPS" BRAND = "EPS" MPAYTID = "1234" USER_FIELD = "" ORDERDESC = "some nice description" CUSTOMER = "Werner Krauss" CUSTOMER_EMAIL = "[email protected]" LANGUAGE = "DE" CUSTOMER_ID = "" PROFILE_ID = "" PROFILE_STATUS = "IGNORED" FILTER_STATUS = "" APPR_CODE = "" responseAsDom = {DOMDocument} [35] status = "OK" returnCode = "OK" createdAt = {int} 1592214783 exception = null
which means, the TransactionStatusResponse was fine, but the transaction itself is bogus.
IMHO this code
$params['operationStatus'] = $result->getStatus(); $params['returnCode'] = $result->getReturnCode();
should not only check if the TransactionStatusResponse was OK, but also check the actual status via $result->getParams()
$result->getParams()
The text was updated successfully, but these errors were encountered:
related: NotificationsValuesTrait::isSuccessful returns true, when TransactionState is "ERROR" and OperationStatus is OK.
Sorry, something went wrong.
The comment above is fixed by an update to 1.1.3 (#9); You might close this issue if you think the original issue is also fixed.
judgej
No branches or pull requests
When I cancel a payment, mpay sends something like this to my notify endpoint:
Silverstripe-Omnipay then creates a CompletePurchaseRequest, which tries to grab the transaction with the given TID from mpay24.
This results in an object like:
In ComplaetePurchaseRequest::sendData() I get this result:
which means, the TransactionStatusResponse was fine, but the transaction itself is bogus.
IMHO this code
should not only check if the TransactionStatusResponse was OK, but also check the actual status via
$result->getParams()
The text was updated successfully, but these errors were encountered: