cmcnulty Posted February 10, 2003 Share Posted February 10, 2003 Hi, I've developed a payment module for 2.1 (for the Skipjack Service). The problem I'm having is figuring out what to do if I get back a failed authorization code from the cc processor. It seems like the right thing to do is to check the response codes in PM_BEFORE_PROCESS and then re-direct via a header("Location:") call if the payment failed. The problem that I'm encountering is that even though the page does get re-directed properly, all of the stuff that happens in checkout_process.php still happens. (e-mail is still sent, basket is emptied, etc.) Obviously, I don't want a confirmation e-mail sent and the basket to be emptied if their payment failed. I'm not sure why the stuff in that page is happening since I redirected the page. Here is a little snippet of code from the bottom of PM_BEFORE_PROCESS $response = SkipJack_Authorize($request); if (!$response['szIsApproved']) { tep_session_register('response'); header('Location: ' . tep_href_link (FILENAME_CHECKOUT_FAILURE, '', 'SSL')); } Any suggestions? -Chuck PS. I consider myself a fairly experienced php coder, and an expert in the intracacies of osCommerce 2.1 having custom added coupons, bulk discounts, VIP discounts, etc. Link to comment Share on other sites More sharing options...
cmcnulty Posted February 10, 2003 Author Share Posted February 10, 2003 All I needed was exit; after my header call. -Charles Link to comment Share on other sites More sharing options...
erichayslett Posted July 28, 2003 Share Posted July 28, 2003 :shock: Anyone heard how the module for skipjack is coming, I could really use this for helping a few friends out. Any word would be very appreciated. thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.