Hi
I've been a long time lurker here and on my site, http://www.naturallytots.com, I encountered a problem that I noticed was not really answered here.
I recently got an order from Australia and the order was rejected.
After seeing on page 1 of this thread that Beanstream requires the province to be "--" if the country is not Canada or US, I finally figured out this change.
In beanstream.php, at line 290 change:
toCode:if (strlen($order->billing['state']) > 2) { $sql = "SELECT zone_code FROM " . TABLE_ZONES . " WHERE zone_name = :zoneName"; $sql = $db->bindVars($sql, ':zoneName', $order->billing['state'], 'string'); $state = $db->Execute($sql); $province_code_order = (!$state->EOF) ? $state->fields['zone_code'] : '--'; } $province_code_ship = (in_array($order->delivery['country']['iso_code_2'], array('CA', 'US')) ? zen_get_zone_code($order->delivery['country']['id'], $order->delivery['state'], '--') : '--'); if (strlen($order->delivery['state']) > 2) { $sql = "SELECT zone_code FROM " . TABLE_ZONES . " WHERE zone_name = :zoneName"; $sql = $db->bindVars($sql, ':zoneName', $order->delivery['state'], 'string'); $state = $db->Execute($sql); $province_code_ship = (!$state->EOF) ? $state->fields['zone_code'] : '--'; }
Code:if (in_array($order->billing['country']['iso_code_2'], array('CA','US'))) { if (strlen($order->billing['state']) > 2 ) { $sql = "SELECT zone_code FROM " . TABLE_ZONES . " WHERE zone_name = :zoneName"; $sql = $db->bindVars($sql, ':zoneName', $order->billing['state'], 'string'); $state = $db->Execute($sql); $province_code_order = (!$state->EOF) ? $state->fields['zone_code'] : '--'; } } $province_code_ship = (in_array($order->delivery['country']['iso_code_2'], array('CA', 'US')) ? zen_get_zone_code($order->delivery['country']['id'], $order->delivery['state'], '--') : '--'); if (in_array($order->delivery['country']['iso_code_2'], array('CA','US'))) { if (strlen($order->delivery['state']) > 2 ) { $sql = "SELECT zone_code FROM " . TABLE_ZONES . " WHERE zone_name = :zoneName"; $sql = $db->bindVars($sql, ':zoneName', $order->delivery['state'], 'string'); $state = $db->Execute($sql); $province_code_ship = (!$state->EOF) ? $state->fields['zone_code'] : '--'; } }
The lines
andCode:$province_code_order = (in_array($order->billing['country']['iso_code_2'], array('CA', 'US')) ? zen_get_zone_code($order->billing['country']['id'], $order->billing['state'], '--') : '--');
assign "--" as the billing and shipping province if the billing and shipping province is not Canada or US.Code:$province_code_ship = (in_array($order->delivery['country']['iso_code_2'], array('CA', 'US')) ? zen_get_zone_code($order->delivery['country']['id'], $order->delivery['state'], '--') : '--');
The IF statements I added above ensure that the province code, which is assigned by the SQL statements from lines 291 to 293 and 298 to 300, only happens if the country is Canada or US.
I noticed without these extra IF statements, even though the province/state is set to "--", the SQL statements reassign it back to QLD (for Queensland state in my case) which will cause Beanstream to reject the transaction.
This code change seems to work. It probably needs more testing though.
Hi, highlander, have you solved this problem?
acutally, beanstream only allows 64 characters for the "shipping mothod (description text)". you just need to change the shipping mehtod language at the language file.
if you still have this problem, please let me know. I will send detail about how to change this.
Jing
Well I'm back, I like this module and intend on using it but!
I use a shared server for my hosting and therefore will not pass a full PCI compliance, what this means that I have to pass the customer on to the Beanstream payment page. Right now when I use the module the customer enters their information then it is passed to Beanstream through API, I think
Beanstream notified me today saying "The account notes show that the account was supposed to be using our hosted payment form via your Zen Cart configuration. The problem here is the Zen Cart module with Beanstream uses our API which requires FULL PCI Compliance"
I guess I need to use hosted payment, I'm not sure if there is a module for this, I would assume that it is like the Moneybookers module.
Is there any help on this or can you provide me with direction.
Thanks
Pcsdesign
No, that's an incorrect statement.
There are lots of good "shared server" hosting services out there that have attained PCI Compliance.
A more correct statement for you would be that your host isn't willing to become PCI Compliant, or at least not for their shared-hosting offerings.
And in that case you'd be better off (and serving your customers better too) by changing hosts.
But the topic of hosting services or anything else outside discussing the Beanstream module ... belongs in a more suitable forum thread. This one is about the Beanstream module specifically.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Hello,
My employer recently asked me to add VbV / SC to this zencart module. We are now testing it on our live site, and after one month of review it will be published onto the plugin/mod section. I also fixed several api compliance issues (thanks beanstream support, went extra mile), bugs from the previous version, added order history comments for AVS results (address verification service), along with account age and previous order count to help assess fraud risks.
![]()
Thank you @brizzo for sharing your work. I was hoping someone would do this.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Hi:
Presently, I am using 1.3.9h.
I am thinking about updating to Zen Cart version 1.5. Is Beanstream compatible with 1.5?
Dave
I am chomping at the bit waiting for ANY beantream payment module that is ZC1.5 compatible. I thought there was a premium version out there somewhere but I have lost track of it. Anyone got a link?
New Zenner
Bookmarks