我正在尝试使用新的 migs getaway (MPGS) 我遵循下一个 url 中的代码
https://ap-gateway.mastercard.com/api/documentation/integrationGuidelines/hostedCheckout/integrationModelHostedCheckout.html
当然,我已替换所有必填字段
<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>
但我一直把这个错误作为 json 对象
{
"cause":"INVALID_REQUEST",
"explanation":"Invalid request",
"supportCode":"6RVIIBKFVR6CG",
"result":"ERROR"
}