'WorldPay 3ds implementation INVALID_PAYMENT_DETAILS
I am trying to implement 3ds to an existing worldpay payment to my system. Although this works with test environment requests, I am facing problem with the live on the final authorize call, Worldpay returns invalid payment details. Here is the response I get back from worldpay on authorize call: Api :https://api.worldpay.com/v1/
{
"httpStatusCode": 400,
"customCode": "INVALID_PAYMENT_DETAILS",
"message": "EXT_67: Verification of threeDSResponseCode failed",
"description": "Server is refusing to fulfill the request.",
"errorHelpUrl": null,
"originalRequest": "{'threeDSResponseCode':'base64code','threeDSecureInfo':{'shopperIpAddress':'ipadress','shopperSessionId':'guid','shopperAcceptHeader':'application/json','shopperUserAgent':'userAgent'},'shopperIpAddress':'ipaddress','shopperSessionId':'guid','shopperUserAgent':'userAgent','shopperAcceptHeader':'application/json'}"
}
I did check with worldpay support team and I was told the threedsResponseCode(token) which I sent was not in valid with the token which the bank send to worldpay. Worldpay support team send me the token which was send by the bank and there is some kind of encoding mismatch in the token which I couldn't get around. Token send from bank to worldpay and to us is similar but few character have a mismatch.
For Example, Please find some of the mismatch characters in the long token below,
Token what i send :MzuxC%2FX
What worldpay expects: MzuxC%2FX
Worldpay mentions that they used base64 encoding in the documents but we tried all possible encodings but its in vain.
Worldpay support team is not been helpful, so if someone help me with the expected format, it'll be much appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|