2

我为我的网站创建的 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。如果交易失败,我可以设置另一个链接吗?

4

1 回答 1

0

如 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 回复的答案后,我很幸运一位朋友能够给我这个资源。

于 2014-07-14T03:33:42.013 回答