Contributions
Beanstream Module
** Credit should be given when credit is due... Thank you to all previous contributors **
None of the current beanstream contributions were working for me so I had to fix it so that it would.
I changed some code in the bean_webobject.php file so that it now uses application_top.php instead of the files that were previously there. This has solved all kinds of problems for me and it should for you too.
I also translated it into french. Should you want to change any text, check out the respective language files.
THIS IS A COMPLETE PACKAGE
Expand All / Collapse All
Small fix to the order status update. No file attached. Seems I kept getting my order status updated to a value to "4" every time an order was made, depending on your site this may correspond to say "Processing". On a default install of OSC it doesn't correspond to anything.
Anyway, after some work and testing I found the problem lies in beanstream_cdn.php or usd.
Change:
================================
function after_process() {
global $insert_id;
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments) values ('" .$insert_id . "', '4', now(), '0', 'payment confirmed')");
tep_db_query("update " . TABLE_ORDERS . " set orders_status = 4 where orders_id = ".$insert_id."");
return false;
}
================================
TO THIS:
================================
function after_process() {
global $insert_id;
tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments) values ('" .$insert_id . "', '". (int)MODULE_PAYMENT_BEANSTREAM_CDN_ORDER_STATUS_ID ."', now(), '0', 'payment confirmed')");
tep_db_query("update " . TABLE_ORDERS . " set orders_status = ".(int)MODULE_PAYMENT_BEANSTREAM_CDN_ORDER_STATUS_ID." where orders_id = ".$insert_id."");
return false;
}
================================
Attached is the above note only.
If anyone is having session problem with this Beanstream module where the osCsid differs when returning back from Beanstream, here's the fix for it.
I noticed that there are a bunch of param passing to the Beanstream like approved link, declined link, ref1 - ref 3 etc..which don't seem to be used, but I'm taking ref2 as the original osCsid here.
This is an updated version of the Beanstream module...
I've added the CVV contribution posted by vincentdemers and worked out a couple of bugs.
I've been using it for a while without a problem so it should work for you too.
Updated beanstream module with CVV code support. Please make sure you enable CVV (or CVD as Beanstream calls it) in your Beantream account under Administration/Account Settings/Order Settings if you plan to use this updated module. Use at your own risk.
If you have register_globals = off with patch #2097, the beanstream module won't work. This is because the var $osCsid is expected to be retrieved from register_globals.
To go over this you have to set a value for $oscSid in bean_webobject.php just after require(DIR_WS_INCLUDES . 'application_top.php');
add
$osCsid = tep_session_id();
When in Beanstream test mode, you must use the following credit card number, otherwise it will not work.
4030 0000 1000 1234
for expiration, use any future date.
Cheers
** Credit should be given when credit is due... Thank you to all previous contributors **
None of the current beanstream contributions were working for me so I had to fix it so that it would.
I changed some code in the bean_webobject.php file so that it now uses application_top.php instead of the files that were previously there. This has solved all kinds of problems for me and it should for you too.
I also translated it into french. Should you want to change any text, check out the respective language files.
THIS IS A COMPLETE PACKAGE
Note: Contributions are used at own risk.