我为网站创建的MIGS付款工具出现问题。当用户在migs服务器上遇到错误(付款未成功运行)时,如何知道它是否遇到此类错误?
这些是我使用的参数(将我的链接替换为示例链接):
"vpc_Amount" => ($amount*100),
"vpc_Command" => 'pay',
"vpc_Locale" => 'en',// order id
"vpc_MerchTxnRef" => $session_id,
"vpc_Merchant" => $merchantId,
"vpc_OrderInfo" => "Test order",
"vpc_ReturnURL" => "http://mywebsite.com/returnUrL",
"vpc_Version" => '1'
我怎么知道它是否失败,因为付款成功或付款失败都会发生,因此它会返回相同的returnURL。我可以设置另一个链接,如果交易失败,它将链接到那里?
如VPC手册中所述-“使用在vpc_ReturnURL字段中指定的Internet浏览器重定向将事务响应返回到您的网站。DR将始终具有安全的哈希值供在线商店检查数据完整性。”
基本上,它$GET
在其中抛出一个名为vpc_TxnResponseCode的变量:
The merchant application receipting function needs to be able to calculate the secure hash signature in the Transaction Response to determine if the signature received is valid for the receipt data. It has to handle:
• Incorrect secure hash signatures
• Successful transactions
• If vpc_TxnResponseCode code is equal to '0' then the transaction was completed successfully and you can display a receipt to the cardholder.
• Declined transactions
• If vpc_TxnResponseCode is equal to '1', '2', '3', '4', or '5' the transaction has been declined and this needs to be conveyed back to the cardholder.
• Error Conditions –
• If vpc_TxnResponseCode equals '7' or '8' an error has occurred
• Other values may also indicate an error has occurred
• Further details for error conditions can be gathered by examining the vpc_Message field so a decision can be made as to the next step.
All four of these conditions are responses that can be returned from the Virtual Payment Client.
我希望这对其他也在使用MIGS开发应用程序的人有所帮助。我很幸运,一个朋友告诉我我正在寻找有关MIGS答复的答案,因此能够给我这个资源。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句