Waqas Saeed Posted August 11, 2021 Share Posted August 11, 2021 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'); } 0 Quote Link to comment Share on other sites More sharing options...
SeanP Posted August 13, 2021 Share Posted August 13, 2021 (edited) Try putting the following under the header line: exit(); Edited August 13, 2021 by SeanP 0 Quote Link to comment Share on other sites More sharing options...
Waqas Saeed Posted August 13, 2021 Author Share Posted August 13, 2021 (edited) 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 August 13, 2021 by Waqas Saeed v2 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.