Jump to content
Sign in to follow this  
sugarenia

Redirection Payment Module Help

Recommended Posts

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Yes

 

Now you must contribute the module :)

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×