Mastercard Hosted Checkout Integration

问题描述 投票:0回答:1

我正在尝试将托管结帐与万事达卡集成。我想为付款请求提供完整的回调URL。根据文档,为了使您的回调在付款成功/失败时得到通知,您应该创建一个会话,并在checkout.configure对象中提供会话ID。我已经能够生成会话,但是当我通过会话ID时,尝试付款时会收到以下错误消息。

{ "cause": "INVALID_REQUEST", "explanation": "Value '46' is invalid. The version used for this request must match the version previously used to update the session using the UPDATE_SESSION operation or OPEN_WALLET operation.", "field": "version", "validationType": "INVALID" }

如果可以,请提供帮助。

payment mastercard
1个回答
0
投票

您已使用Create Checkout Session操作创建了会话。对于此操作,API URL将为:https://na-gateway.mastercard.com/api/nvp/version/<version-number>

上述URL中的版本号必须与checkout.js文件中的版本号匹配:

 <script src="https://na-gateway.mastercard.com/checkout/version/<version-number>/checkout.js"
            data-error="errorCallback"
            data-cancel="cancelCallback">
 </script>
© www.soinside.com 2019 - 2024. All rights reserved.