Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
hcl
hcl
Hello,
 
What i want to ask is :
 
We are using external payment system ( MasterCard ) ; so After placing an order on the first 'Checkout: personal information' page (order_info.php) my customer will be forwarded to the system's site where he or she has to
provide his / her payment details and delivery address. When finished he is returned on to my VIART site to the 'Checkout: final' page , which is (order_final.php)
 
 
We get following values from Payment gateway after transaction to order_final.php page :
 
0 = Success
1 = Unknown Error
2 = Bank Declined Transaction
 
Etc.... Etc ....
 
Now we are wondering , how can we pass these values to VIART so the order will be handled and appropriate status will be assigned.
 
I want to know how can we update status of the VIART order Area, when response is passed from Payment gateway, i.e. what parameters does VIART understands while receiving inputs ??
 
Where shall we pass these mentioned values , so the status is updated in VIART and reflect accordingly.
 
tw (Guest)
tw (Guest)
You can set up parameters at the "final check out page" and/or specify "advanced parameters" in "edit system". All under Orders>Payment Systems.
 
hcl
hcl
You did not understand what i said,
i said : my customer is able to make payment, but while returning response, how can i update response at VIART ?
 
how can we pass these values to VIART so the order will be handled and appropriate status will be assigned, like paid, failed, etc...
 
hcl
hcl
We know we can set statues for payment in ( Administration > Payment Systems > Final Checkout Settings )
 
But, which parameter should we pass to VIART , in Validation Script so, it knows that the order is a SUCCESS or FAILURE ?
 
We are getting back values from our payment gateway, in 0 or 1 ( to show success or failure of payment ), but how to update it to VIART ??
 
tw (Guest)
tw (Guest)
If you are using one of viart's payment system, then the validation script is set up to update the status from the payment response. You can go to the Payments folder to see the code for your payment system and see what variable they used for the response code. Otherwise, you'll need to modify your own script to update the status.
 
hcl
hcl
but something must be common in all payment systems, which updates statuses of the order ??
what are those parameters and how to update them ?
 
Monk
Monk
It's quite easy.
 
In case if your validation script return variable $error_message with some error then failed status from final checkout settings is set otherwise success status will be set for your order.
 
You can check payments/paypal_pdt.php as example.
 
hcl
hcl
Hello Monk,
 
Please help me out,
 
See i have a variable in ADDITIONAL Validation script ( $txnResponseCode )
 
if that is == 0 ; My Transaction is successful
 
and if that is !=0 ; My Transaction is Failed
 
Now, what statement shall i pass to system, so it knows whether its failed or passed.
 
 
As of now, every transaction is passed as success status
 
Monk
Monk
You can try the following code as example
 
if (!$txnResponseCode) {
$error_message = "Transaction has failed";
}
 
but it just a simple example and I think you need to have more validation rules to check some additional parameters to verify if this response was really sent by payment gateway if your gateway support it.