I'm having issues with my MIGS Payment facility that I created for my website. When the user encounters errors with the migs server (payment did not run successfully), how do I know if it encountered such error?
These are the parameters I used(replaced my link with a sample link):
"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'
How do I know if it failed, since either a payment successful or a payment failure happens, it goes to the same returnURL. Can I set another link wherein it would go there if the transaction failed?
As stated in the VPC Manual - "The Transaction Response is returned to your website using an Internet browser redirect as specified in the vpc_ReturnURL field. The DR will always have a secure hash for the online store to check data integrity."
Basically it throws a
$GET
variable named vpc_TxnResponseCode where-in:I hope this helps others who are also developing application using MIGS. I was lucky a friend was able to give me this resource after I told him that I was looking for answers regarding responses from MIGS.