Jump to content

user not redirecting after successful payment


Recommended Posts

Hello!

I have a difficulty find out the reason. my code is mentioned below; the only problem am having is that the after payment is successful, the user is not redirected through php header; although have tried javascript redirect but unfortunately does not work after payment gateway send params to the callback file. however there is no problem in logs and payment. as mentioned above. 

code :: 

if ($status_api=="PAID"){


    addInvoicePayment(
        $invoiceId,
        $transactionId,
        $paymentAmount,
        0,
        $gatewayModuleName
    );

	logTransaction($gatewayParams['name'], $response, "PAID");
	header('Location: '.$systemUrl.'viewinvoice.php?id='.$invoiceId.'&paymentsuccess=1');
 }

 

Link to comment
Share on other sites

Unfortunately that wasn't the issue due to the header, or window.location.replace,

the gateway response to the callback file consist of 2 similar responses (HTTP response after successful payment, and Click Button with GET variables) that was actually duplicating the transaction_id, log transaction does not work for duplicated transaction id and freezes,  I've added a localAPI that checks the invoice is Paid that does not execute AddPayment and redirects to the invoice page. 

Edited by Waqas Saeed
v2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated