Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello there,

 

I'm trying to develop a redirection payment module for a greek bank.

 

I'm supposed to provide them with 3 URLs : the order form URL, the successful transaction URL and the erroneous transaction URL.

 

I have trouble finding out what the response pages URLs are gonna be. My before_process is something like this :

 

function before_process() {

	global $HTTP_POST_VARS, $order;

	// send email notification
	if ( (defined('MODULE_PAYMENT_WINBANK_EMAIL')) && (tep_validate_email(MODULE_PAYMENT_WINBANK_EMAIL)) ) {
		$this->winbankID = $HTTP_POST_VARS['transactionid'];
	}
	// 00, 08, 10, 11, 16 OK else ERROR
	if ($HTTP_POST_VARS['responsecode'] != '00' && $HTTP_POST_VARS['responsecode'] != '08' && $HTTP_POST_VARS['responsecode'] != '10' &&
			$HTTP_POST_VARS['responsecode'] != '11' && $HTTP_POST_VARS['responsecode'] != '16') {
		tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_WINBANK_TEXT_ERROR_MESSAGE), 'SSL', true, false));	
	}
}

 

So, on an erroneous transaction, a redirect to checkout_payment.php is made.

 

All payment modules I've checked do something like this in before_process(). Any ideas what URLs should I provide the bank with? Should they be something like :

 

OK : http://heregoesmysite/checkout_payment.php

Error : http://heregoesmysite/checkout_payment.php..._message=blabla

Posted

I searched about it a little, and found out that checkout_process() handles the before and after process functions, and handles the redirects accordingly.

 

So should I give the bank only the checkout_process.php link for both OK and ERROR pages, since all the error handling is done there?

Posted

Yes

 

Now you must contribute the module :)

 

Matti

Posted
Yes

 

Now you must contribute the module :)

 

Matti

 

I surely will, if I test it and it works ok.

 

Some people may bash me though, since it's a much sought-for module for osCommerce and many users pay for it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...