我正在尝试使用新的migs度假(MPGS),我遵循了下一个网址中的代码
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"
}
最佳答案
重新检查您获取的SESSIONID和商人ID。来自网关的这些错误表明您没有为网关提供正确的凭据来执行付款。
关于integration - MPGS整合,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42891558/