MPGS 集成

osa*_*eed 5 integration bank

我正在尝试使用新的 migs getaway (MPGS) 我遵循了下一个 url 中的代码

https://ap-gateway.mastercard.com/api/documentation/integrationGuidelines/hostedCheckout/integrationModelHostedCheckout.html
Run Code Online (Sandbox Code Playgroud)

当然我被替换了所有必填字段

<html>
<head>
    <script src="https://ap-gateway.mastercard.com/checkout/version/36/checkout.js"
            data-error="errorCallback"
            data-cancel="cancelCallback">
    </script>

    <script type="text/javascript">
        function errorCallback(error) {
              console.log(JSON.stringify(error));
        }
        function cancelCallback() {
              console.log('Payment cancelled');
        }

        Checkout.configure({
            merchant: 'xxxxxx',
            order: {
                amount: function() {
                    //Dynamic calculation of amount
                    return 80 + 20;
                },
                currency: 'USD',
                description: 'Ordered goods',
               id: 'xxxxxx'
            },
            interaction: {
                merchant: {
                    name: 'xxxxxx',
                    address: {
                        line1: '200 Sample St',
                        line2: '1234 Example Town'            
                    }    
                }
            }
        });
    </script>
</head>
<body>
    ...
    <input type="button" value="Pay with Lightbox" onclick="Checkout.showLightbox();" />
    <input type="button" value="Pay with Payment Page" onclick="Checkout.showPaymentPage();" />
    ...
</body>
Run Code Online (Sandbox Code Playgroud)

但我一直都把这个错误作为 json 对象

{
  "cause":"INVALID_REQUEST",
  "explanation":"Invalid request",
  "supportCode":"6RVIIBKFVR6CG",
  "result":"ERROR"
}
Run Code Online (Sandbox Code Playgroud)

小智 0

重新检查您获取的 SESSIONID 和merchantId,这些来自网关的错误意味着您没有为网关提供正确的凭据来执行付款。