Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error: Call to a member function call_api


creativeone

Recommended Posts

Hi Thanks for this wonderful module.

 

I have installed a couple of times to make sure I did everything correctly. When I try to test it (in production with my own cc) virtual merchant tells me the order is going through, however I am directed to a page with this

 

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

 

How can I fix this? That line has buysafe info which appears to be commented out. Any help would be greatly appreciated. Thanks

Link to comment
Share on other sites

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

non standard function. which contributions have you installed without reading installation instruction or skipped the installation steps?

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Link to comment
Share on other sites

  • 1 month later...
Hi Thanks for this wonderful module.

 

I have installed a couple of times to make sure I did everything correctly. When I try to test it (in production with my own cc) virtual merchant tells me the order is going through, however I am directed to a page with this

 

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

 

How can I fix this? That line has buysafe info which appears to be commented out. Any help would be greatly appreciated. Thanks

 

Edit the following code by adding the /* and */ to suppress the code in checkout_process.php around line 124

 

// {{ buySAFE Module
/*  $buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1);
 $checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id);
 $checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params);
 if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true')
 {
$update_data_array = array('buysafe_cart_id' => $buysafe_cart_id,
						   'buysafe_client_ip' => tep_get_ip_address(),
						   'buysafe_session_id' => tep_session_id());
tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'");
 }
// }} */

Link to comment
Share on other sites

  • 9 months later...

Edit the following code by adding the /* and */ to suppress the code in checkout_process.php around line 124

 

// {{ buySAFE Module
/*  $buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1);
 $checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id);
 $checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params);
 if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true')
 {
$update_data_array = array('buysafe_cart_id' => $buysafe_cart_id,
						   'buysafe_client_ip' => tep_get_ip_address(),
						   'buysafe_session_id' => tep_session_id());
tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'");
 }
// }} */

 

------------

This works, nice one, complete lifesaver!!

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...

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