Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Updated beanstream module for 2.2 MS2


on55

Recommended Posts

Might be useful for someone?

 

Updated beanstream payment module for v. 2.2 MS2

Not extensively tested.

 

File ?bean_webobject.php?.

Change:

1. $osCsession to $osCsid

2. payment_error to error_message

 

Regards,

Alex

 

 

 
// CUSTOMIZATION: owner's OsCommerce website URL

if (ENABLE_SSL == true)
$http_string = "https://";
else
$http_string = "http://";

//if(substr($txResult, 0, 13)=="trnApproved=1")

if ($aryResult['trnApproved'] == '1')
//echo $http_string . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . "checkout_process.php?osCsid=" . $osCsession;

header("location:" . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true) . "?osCsid=" . [b]$osCsid[/b]); 
else

header("location:" . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL', true) . "?osCsid=" . $osCsid . "&error_message=" . $aryResult['messageText']);

//	header("location:" . $http_string . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/" . "checkout_payment.php?osCsid=" . $osCsession . "&payment_error=beanstream&error=" . $aryResult['messageText']); 

curl_close( $ch );

Link to comment
Share on other sites

You're assuming that register globals are on (maybe with your store). If they are off it wont work. And the module still does not check if the session is set with the get array or the cookie is passed. You should only check if the session var is set

 

For example for approved payments

	header("location:" . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true) . (isset($osCsession))?'?osCsid="' . $osCsession:'' . '"');

 

Personally I prefer setting up the webobject with the application_top.php included so then you have the regular osc functions to check for sessions and append them to the url.

Link to comment
Share on other sites

You're assuming that register globals are on (maybe with your store). If they are off it wont work. And the module still does not check if the session is set with the get array or the cookie is passed. You should only check if the session var is set

 

For example for approved payments

	header("location:" . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true) . (isset($osCsession))?'?osCsid="' . $osCsession:'' . '"');

 

Personally I prefer setting up the webobject with the application_top.php included so then you have the regular osc functions to check for sessions and append them to the url.

 

 

Thanks for comment. I was trying to find any help how to make old beanstream module to work with newer version of osCommerce - unsuccessful. So I've tried to fix that by myself and that what I came up with. I?m not a PHP programmer but seem like my solution works fine after I tested it. osCommerce required to have register globals ON so I have in my php.ini. I was hoping to get attention to this topic so someone who implemented beanstream module will correct me.

 

For some reason I can?t include application_top.php or header.php. I?m getting error. application_top.php already contains include ?configure.php?, may that?s why.

Any comments/help would be greatly appreciated!

 

Alex

Link to comment
Share on other sites

  • 6 months later...

hello on55

I have a problem with my credit card process, I use beanstream which I have download it from:

http://www.oscommerce.com/community/contri...arch,beanstream

 

after I install it, I did the test process; and it will give me the error that "Shipping state/province does not match country" the state/province is match, is that anyway you can figure this one out, I have no idea.

thanks,

KOROUSH

 

 

Thanks for comment. I was trying to find any help how to make old beanstream module to work with newer version of osCommerce - unsuccessful. So I've tried to fix that by myself and that what I came up with. I�m not a PHP programmer but seem like my solution works fine after I tested it. osCommerce required to have register globals ON so I have in my php.ini. I was hoping to get attention to this topic so someone who implemented beanstream module will correct me.

 

For some reason I can�t include application_top.php or header.php. I�m getting error. application_top.php already contains include �configure.php�, may that�s why.

Any comments/help would be greatly appreciated!

 

Alex

Link to comment
Share on other sites

  • 3 months later...

On the "Payment Modules" page in the Admin panel, there are two options:

Beanstream online secure payment service, payment in CDN

Beanstream online secure payment service, payment in USD

If I enable both of them, then on the "Payment Information" page during Checkout for the customer, both of these options show up.

 

How do we set it up so that only one of them (the correct one depending on which currency the customer has selected) shows up on the "Payment Information" page?? That is, if the customer has chosen Canadian currency from the drop-down list, then on checkout, the CDN option for Beanstream shows up only. If the customer has chosen US currency from the drop-down list, then on checkout, the USD option for Beanstream shows up only.

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
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...