Click here to Skip to main content
15,886,566 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I was integrating one bank's Payment Gateway module in one of my client's website. I saw some points which I want to know the reason they occur.

1. When Payment Gateway [Secured] sends RESULT onto some intermediate page [PHP page], I can save all the data to Database, but I can not echo them on the screen.

Why?

2. On the Intermediate page, I use the following code to redirect the user to Success/Failure page according to the result of the transaction.
$redirect = "REDIRECT=http://mysite.com/success.php?paymentID=xxxx";
echo $redirect;    // How this code redirects?


The control comes to various pages as shown below.
Secured Payment Gateway [Response] >> Intermediate.php [Some DB entry according to the response received] >> Success.php

How this redirect works as shown in the code above.
Posted

1 solution

1. Because the page output is sent to the payment gateway, and not the browser.

2. Because the payment gateway interprets your redirect and passes it on to the browser.

This mechanism should be described in the documentation of the payment gateway.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900