So the Beanstream guys say they know about this issue and anticipate the fix being ready first week of September.
Printable View
So the Beanstream guys say they know about this issue and anticipate the fix being ready first week of September.
Since upgrading to PHP 5.6.30 I'm getting the following error:
[07-Apr-2017 08:37:56 America/Vancouver] Request URI: /admin/orders.php?origin=index&page=1&oID=1967&action=edit, IP address: 64.180.94.185
#1 beanstream->admin_notification() called at [/home/public_html/admin/orders.php:594]
[07-Apr-2017 08:37:56 America/Vancouver] PHP Warning: Creating default object from empty value in /home/public_html/includes/modules/payment/beanstream.php on line 404
Any ideas?
1. Those are WARNINGS, not ERRORS.
2. To change the code to be more compatible with newer versions of PHP, edit the /includes/modules/payment/beanstream.php file and add the new line shown here:
Code:function admin_notification($zf_order_id) { global $db;
$output = '';
$trnData = new stdClass;
$trnData->fields = array();
require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/beanstream/beanstream_admin_notification.php');
return $output;
}
Yes, sorry, a warning not an error.
Thank you for the edit!
Wow, I set this up for a customer over 8 years ago and all is still running great with this module and the Interac module. Thank you all!
A requirement to ensure they were using TLS 1.2 at a minimum brought me back here. My password had to be changed upon login, it's been over 8000 days since it was last changed. lol
Anyways, thanks again for the solid software!
Good to hear - but if you are running 1.3.8a, you really need to update; it has many well known vulnerabilities.
With the latest mod, I'm gettingIn code checking, one checker says things are fine, the other says WAY too many opening and closing parentheses. Checked both in PHP 5.6 and 7.1. PHP version made no difference in the results.Code:PHP Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/theirSite/public_html/155f/includes/modules/payment/beanstream.php on line 73
The code for the function including line 73 isWith line 73 beingCode:function __construct() { global $order, $messageStack;
$this->enabled = ((MODULE_PAYMENT_BEANSTREAM_STATUS == 'True') ? true : false); // Whether the module is installed or not
$this->currency_code = 'CAD';
$this->code = 'beanstream';
$this->login = MODULE_PAYMENT_BEANSTREAM_CAD_LOGIN;
$this->title = MODULE_PAYMENT_BEANSTREAM_TEXT_CATALOG_TITLE; // Payment module title in Catalog
if (IS_ADMIN_FLAG === true) {
// Payment module title in Admin
$this->title = MODULE_PAYMENT_BEANSTREAM_TEXT_ADMIN_TITLE;
if (MODULE_PAYMENT_BEANSTREAM_STATUS == 'True' && ($this->login == '000000000' || !defined('MODULE_PAYMENT_BEANSTREAM_API_PASSCODE') || empty(MODULE_PAYMENT_BEANSTREAM_API_PASSCODE))) {
$this->title .= '<span class="alert"> (Not Configured)</span>';
}
if ($this->enabled && !function_exists('curl_init')) $messageStack->add_session(MODULE_PAYMENT_BEANSTREAM_TEXT_ERROR_CURL_NOT_FOUND, 'error');
$new_version_details = plugin_version_check_for_updates(612, $this->moduleVersion);
if ($new_version_details !== false) {
$this->title .= '<span class="alert">' . ' - NOTE: A NEW VERSION OF THIS PLUGIN IS AVAILABLE. <a href="' . $new_version_details['link'] . '" target="_blank">[Details]</a>' . '</span>';
}
}
$this->description = '<strong>Bambora Payments Module ' . $this->moduleVersion . '</strong><br><br>' . MODULE_PAYMENT_BEANSTREAM_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_BEANSTREAM_SORT_ORDER; // Sort Order of this payment option on the customer payment page
$this->form_action_url = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false); // Page to go to upon submitting page info
$this->order_status = (int)DEFAULT_ORDERS_STATUS_ID;
if ((int)MODULE_PAYMENT_BEANSTREAM_ORDER_STATUS_ID > 0) {
$this->order_status = (int)MODULE_PAYMENT_BEANSTREAM_ORDER_STATUS_ID;
}
$this->_logDir = DIR_FS_LOGS;
if (is_object($order)) $this->update_status();
}
Along with the debug file, this is causing a partial white page on the Admin >> Modules >> Payment page as would be expected.Code:if (MODULE_PAYMENT_BEANSTREAM_STATUS == 'True' && ($this->login == '000000000' || !defined('MODULE_PAYMENT_BEANSTREAM_API_PASSCODE') || empty(MODULE_PAYMENT_BEANSTREAM_API_PASSCODE))) {
BTW, another checker says the error is line 76The only thing unusual about this setup is that it was a new install of 155f using a database from 1.5.4 version of ZC.Code:FATAL ERROR syntax error, unexpected 'is' (T_STRING) on line number 76
Ideas anyone?
Download a fresh copy of the mod - you have messed up the files somehow. PHP syntax checking works fine on the latest version of the mod.
$ for i in `find . -name \*.php`; do php -l $i; done
No syntax errors detected in ./includes/languages/english/modules/payment/beanstream.php
No syntax errors detected in ./includes/modules/payment/beanstream/beanstream_admin_notification.php
No syntax errors detected in ./includes/modules/payment/beanstream.php
PHP version 5.6.
Did you do this? (Note from the plugin's page)
NOTE: You will need to add your API Access Passcode to the module after installing, else transactions will fail.
Did several downloads, file verifications between downloads, and verifications between downloaded files and files on server.
There is no method provided for removal other than using remove from the Modules >> Payments menu. Of course, with a new install updating a previous database, there is no listing in the Payments menu. Thus, no way to drop the mod without going into the database and attempt to remove settings by hand. Apparently, some of them are not tagged with "beanstream" as I have removed all that I could find that were not part of an order or other extraneous listing (mentioned in one EzPage).
Installing the files with the current database (cleared as best as I can tell) it still results in a blank page as soon as it attempts to write the module to the menu. This appears to be the function that is generating the error.
If there is some database setting not containing beanstream that is causing this, I can't find it. Would be nice to have an uninstall sql file.:(
1. The T_PAAMAYIM_NEKUDOTAYIM key is PHP internal jargon for "double colon" (in Hebrew). It has to do with objects referring to static properties, and I'm guessing that the test with $this->login (which is an attempt for the object to read the login property) is throwing up because of some extra-strict mode enabled somehow in your PHP config (which I cannot recreate). Despite its being set on line 67.
If that's the issue, you could "fix" it by declaring the property earlier, by adding a line like this:
2. A very quick "uninstall" would be the following, extracted from the remove() function of the module:Code:var $reportable_submit_data = array();
protected $login = '000000000';
function __construct() {
Code:delete from configuration where configuration_key like 'MODULE\_PAYMENT\_BEANSTREAM\_%';