Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to a member function call_api() on a non-object


medalta

Recommended Posts

Posted

I haven't been able to find a resolution to this on the 2.2 forums.

 

everything appears to be working up to the point of confirmation of the order but when you confirm the order your get:

 

Fatal error: Call to a member function call_api() on a non-object in /home/web/public_html/giftshop/checkout_process.php on line 127

 

can anybody help with this???

Posted

Can you post what do you have in the line 127 at the checkout_process.php

Posted

Can you post what do you have in the line 127 at the checkout_process.php

 

124 // {{ buySAFE Module

125 $buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1);

126 $checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id);

127 $checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params);

128 if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true')

129 {

130 $update_data_array = array('buysafe_cart_id' => $buysafe_cart_id,

131 'buysafe_client_ip' => tep_get_ip_address(),

132 'buysafe_session_id' => tep_session_id());

133 tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'");

134 }

135 // }}

Posted

Does your includes/application_top.php include the lines

require(DIR_WS_CLASSES . 'buysafe.php');
$buysafe_module = new buysafe_class;
...
$buysafe_result = $buysafe_module->call_api('AddUpdateShoppingCart', $buysafe_params);

? If not, it sounds like you have an incomplete installation of BuySafe. Note that my copy is several years old (I don't use it in an active store), so the code may have changed a bit since then.

Posted

It looks like the buySAFE mod in my install is crap so I cut to the chase and deleted the following from checkout_process.php and it appears to be working fine.

 

BuySAFE says they do not support Canadian stores so it is moot. Who’s bright idea was that anyway.

 

Thanks for the help people the store is functioning again and I can get back to work.

 

 

in checkout_process.php I removed

 

124 // {{ buySAFE Module

125 $buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1);

126 $checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id);

127 $checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params);

128 if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true')

129 {

130 $update_data_array = array('buysafe_cart_id' => $buysafe_cart_id,

131 'buysafe_client_ip' => tep_get_ip_address(),

132 'buysafe_session_id' => tep_session_id());

133 tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'");

134 }

135 // }}

Posted

Let me guess -- your host offered osC installation via Fantastico? Fantastico has some kind of deal with BuySafe to add it into osC before offering it on Fantastico. I would suggest installing a clean copy obtained from this site, and skip the Fantastico crap.

Posted

Let me guess -- your host offered osC installation via Fantastico? Fantastico has some kind of deal with BuySafe to add it into osC before offering it on Fantastico. I would suggest installing a clean copy obtained from this site, and skip the Fantastico crap.

 

I looked in to it a bit further yesterday and you’re correct Phil. However my original install was from back in 04 when I knew next to nothing about the process and the problem presented itself when I FINALLY upgraded to 2.2 shortly ago.

 

The only advantages with Fantastico that I see are for newbies. It handles everything with one click and a few no brainer Q/A’s

 

This is all on buySAFE.com I am pretty sure that if I was able to create an account with them for a Canadian store it would have functioned properly. Further I would be willing to bet that once it was enabled you could uninstall it safely from the admin panel. As far as I am concerned this was most likely done with intent on their part.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...