Jump to content
Sign in to follow this  
creativeone

Fatal error: Call to a member function call_api

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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 . "'");
 }
// }} */

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I had same problem on my website when I customer tried to pay using the express checkout but following the above method eliminated that problme.

Thank you!!!

Edited by sahilsaid

Share this post


Link to post
Share on other sites

hello all

 

thank you this solved my problem but I want to ask question

 

why the developer write the code is not is it not usable or we can use it for other function && what is that fun

 

Regards

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×