Post by jackrawles » Thu Oct 04, 2012 2:02 am

Hey guys,

I just want other 2checkout users to help me out with something.

I have set up an opencart shop and it uses the 2checkout payment gateway.

Now...when a shopper completes an order with 2checkout they see a page saying "Thanks for your order, order processed' BUT if they don't click the 'Click here to finalize your order' button then opencart does not register the sale, so we cannot see what tshirt size and colour etc they ordered!

I just want to know if everyone has this same problem? The shopper must click Finalize otherwise opencart doesn't register the sale.

PLease let me know if you it's the same for everyone! Because if the user see's 2checkout 'Thanks for your order, your order has been processed' text before seeing the 'Click here to finalize your order' button then its useless as opencart doesn't register the sale!

Thanks again everyone!

Newbie

Posts

Joined
Wed Jul 18, 2012 5:36 am

Post by Craig@2Checkout » Thu Oct 04, 2012 4:46 am

Currently this is how the checkout process works with OpenCart. We actually have 3 different return options but OpenCart only works with the "Given Links Back to my Website" option that requires the buyer to click the confirmation button. This return method will be replaced in the near future by one that will automatically redirect and pass the sale parameters back by POST. If you would like assistance with adding support for our Header Redirect return method in the mean time, just contact us directly at techsupport@2checkout.com with your OpenCart version and we will provide you with the code. For example, to add header redirect support in 1.5.2.1 you can replace the callback method on 'catalog/controller/payment/twocheckout.php' with the following code:

Code: Select all

	public function callback() {

		$this->load->model('checkout/order');
		
		$order_info = $this->model_checkout_order->getOrder($this->request->get['cart_order_id']);

		if (!$this->config->get('twocheckout_test')) {
			$order_number = $this->request->get['order_number'];
		} else {
			$order_number = '1';
		}
		
		if (strtoupper(md5($this->config->get('twocheckout_secret') . $this->config->get('twocheckout_account') . $order_number . $this->request->get['total'])) == $this->request->get['key']) {
			$this->model_checkout_order->confirm($this->request->get['cart_order_id'], $this->config->get('twocheckout_order_status_id'));
	
			$this->redirect(HTTP_SERVER . 'index.php?route=checkout/success');	
		} else {
			echo 'The response from 2checkout.com can\'t be parsed. Contact site administrator, please!'; 
		}
}


Posts

Joined
Thu Oct 04, 2012 4:20 am

Post by jackrawles » Thu Oct 04, 2012 5:36 pm

Wow thanks for the reply Craig. Great to hear from someone directly from 2checkout. I have the checkout set to 'Given links back to my website' and have the URL set to: http://www.mystore.com/index.php?route= ... t/callback which I have designed to say thanks for your purchase...blah blah. I just had some customers recently not press the finalize button so the sale wasn't recorded with opencart and I couldn't find out what size and colour t-shirt they wanted.

What does the code you supplied do? I am a little unsure by what you mean!

Thanks again for the reply, thats great customer service for you!

Newbie

Posts

Joined
Wed Jul 18, 2012 5:36 am

Post by Craig@2Checkout » Thu Oct 04, 2012 7:18 pm

All that is changed in the code are the references to `$this->request->post` are changed to `$this->request->get` so that the parameters are pulled from the query string rather that the message body. This allows you to use the Header Redirect option which will immediately return the buyer to your approved URL and bypass the Order Confirmation page on our end. We will be adding a new passback method in the very near future that will take care of this problem but in the mean time, you can just make this change in the callback method on 'catalog/controller/payment/twocheckout.php' s that you can use Header Redirect.

As always you can contact techsupport@2co.com if you have any questions or would like assistance.


Posts

Joined
Thu Oct 04, 2012 4:20 am

Post by toddlock » Wed Jan 23, 2013 2:07 am

Craig,

When will 2CO be adding the new passback method so that sales will be immediately be reported to Opencart?

Newbie

Posts

Joined
Wed Jan 23, 2013 2:02 am

Post by toddlock » Wed Jan 23, 2013 2:49 am

Craig,

When will the update on the opencart pasback method be complete.

Newbie

Posts

Joined
Wed Jan 23, 2013 2:02 am

Post by wavloops » Fri Jun 24, 2016 6:00 am

Hi,

I am using Opencart 2.0.1.1 Version
Could yo please advice for this version for the same problem

Regards

Newbie

Posts

Joined
Fri Jun 24, 2016 5:58 am
Who is online

Users browsing this forum: No registered users and 4 guests