View Full Version : credit card payment redirection

01-04-2008, 01:45 AM
hi friends ,

In my current credit card gateway
1) i post few variables to the payment gateway website
2), it then performs the transaction
3) Send email to mycompany for payment confirmation
4) redirects to success url and failure url , which is posted to them as well

Now sometimes when the payment company redirects the user to success url then if user cancel it or hit back button the his order is not confirmed in the system but we got mail that payment is processed.

so every day we have to check the emails and manually confirms that order

Is there any way to solve this problem

01-04-2008, 02:29 AM
how are you confirming the order in the system?

01-04-2008, 02:55 AM
there is a database field orderConfirmed whic is 0 by default when customer comes after redirected by the bank then that field is updated to 1

Now we have to check all uncnfirmed order number with the email sent by the bank whether we have received payment or not then manually make that database field to 1

01-04-2008, 03:05 AM
ok, is that field set to 1 at the top of the success page? or somewhere at the bottom? and how will your gateway action page react to a back button?

01-04-2008, 03:24 AM
that field is set to 1 near the top of page

if customer hits back button then it says the page expired
usually customer cancels while redirecting and then payment gets processed and order remains unconfirmed

01-04-2008, 03:32 AM
okay, one more question.. (i'm about to go to sleep, so i may answer this one in the a.m.). How are you sending them to the success or not success pages?

i.e. is the gateway sending you back a 1 or 0? because if so, you can take that page that receives the response from the gateway and have the confirmation done immediately.


if ($success=='1'){
alter confirmation to equal 1
set redirection to success page}
{alter confirmation to equal 0
set redirection to not succes page}

01-04-2008, 03:40 AM
After payment success the redirection is automatically done by the bank so i have no access to thier code

01-04-2008, 02:32 PM
After payment success the redirection is automatically done by the bank so i have no access to thier code

so when they redirect, it is done automatically, and your problem is somewhere during that redirection, people are cancelling? that seems a bit odd. Why don't you post the code that updates the confirmation field so we can take a look and see if their are some errors that could be occuring.