Post by Lamiaa » Mon Jul 11, 2011 5:43 pm

I have a problem , my site is new and I always check my sales regularly without finding new orders except my test ones.
i have received emails from some customers claimed they purchased without sending the order. When I go 2 my 2checkout page I have find that they really did purchased and the amounts n my account there .
I don't know how to deal with that , as I receive orders with missing data like comments in 2checkout but I don't receive them in my admin page. Any help please



Sat Apr 02, 2011 11:53 am

Post by Nochexman » Mon Jul 11, 2011 9:09 pm

Just so you are aware... Nochex is offering a FREE Merchant account set-up this month, with no recurring charges. Transactions attract a charge of 2.9% + 20p per transaction: go to for details.

I'll go back in my corner now...



Mon Jun 06, 2011 10:00 pm

Post by pirate » Wed Sep 21, 2011 2:19 pm

In 2co settings Direct Return (After completing an order, buyers should be) what settings we have to use.

1)Given links back to my website
2)Immediately returned to my website
3)Header Redirect (Your URL)

I tried 1 option with " ... t/callback" Not working ..
Last edited by pirate on Sat Oct 01, 2011 5:10 am, edited 1 time in total.

New member


Sat Sep 03, 2011 1:28 pm

Post by igabc » Sat Sep 24, 2011 12:42 am

Same problem here. Please some help! thanks!



Sat Aug 06, 2011 8:25 pm
Location - Italy

Post by thetitan72 » Mon Sep 26, 2011 6:59 am

I also have the same problem. Please help!



Mon Sep 26, 2011 6:55 am

Post by pirate » Fri Sep 30, 2011 5:04 am

Why no one replying ?

New member


Sat Sep 03, 2011 1:28 pm

Post by thetitan72 » Sun Oct 09, 2011 5:50 am

Finally got the fix for this issue thanks to 2CO's support. In my case it's for 1.5.0

Go to catalog/controller/payment/twocheckout.php

Change all the on the file contet for this one:
class ControllerPaymentTwoCheckout extends Controller {
protected function index() {
$this->data['button_confirm'] = $this->language->get('button_confirm');


$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

$this->data['action'] = '';

$this->data['sid'] = $this->config->get('twocheckout_account');
$this->data['total'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
$this->data['cart_order_id'] = $this->session->data['order_id'];
$this->data['card_holder_name'] = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
$this->data['street_address'] = $order_info['payment_address_1'];
$this->data['city'] = $order_info['payment_city'];
$this->data['state'] = $order_info['payment_zone'];
$this->data['zip'] = $order_info['payment_postcode'];
$this->data['country'] = $order_info['payment_country'];
$this->data['email'] = $order_info['email'];
$this->data['phone'] = $order_info['telephone'];

if ($this->cart->hasShipping()) {
$this->data['ship_street_address'] = $order_info['shipping_address_1'];
$this->data['ship_city'] = $order_info['shipping_city'];
$this->data['ship_state'] = $order_info['shipping_zone'];
$this->data['ship_zip'] = $order_info['shipping_postcode'];
$this->data['ship_country'] = $order_info['shipping_country'];
} else {
$this->data['ship_street_address'] = $order_info['payment_address_1'];
$this->data['ship_city'] = $order_info['payment_city'];
$this->data['ship_statey'] = $order_info['payment_zone'];
$this->data['ship_zip'] = $order_info['payment_postcode'];
$this->data['ship_country'] = $order_info['payment_country'];

$this->data['products'] = array();

$products = $this->cart->getProducts();

foreach ($products as $product) {
$this->data['products'][] = array(
'product_id' => $product['product_id'],
'name' => $product['name'],
'description' => $product['name'],
'quantity' => $product['quantity'],
'price' => $this->currency->format($product['price'], $order_info['currency_code'], $order_info['currency_value'], false)

if ($this->config->get('twocheckout_test')) {
$this->data['demo'] = 'Y';

$this->data['lang'] = $this->session->data['language'];

$this->data['return_url'] = $this->url->link('checkout/checkout', '', 'SSL');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/twocheckout.tpl')) {
$this->template = $this->config->get('config_template') . '/template/payment/twocheckout.tpl';
} else {
$this->template = 'default/template/payment/twocheckout.tpl';


public function callback() {

$order_info = $this->model_checkout_order->getOrder($this->request->post['cart_order_id']);

if (!$this->config->get('twocheckout_test')) {
$order_number = $this->request->post['order_number'];
} else {
$order_number = '1';

if (strtoupper(md5($this->config->get('twocheckout_secret') . $this->config->get('twocheckout_account') . $order_number . $this->request->post['total'])) == $this->request->post['key']) {
if ($this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false) == $this->request->post['total']) {
$this->model_checkout_order->confirm($this->request->post['cart_order_id'], $this->config->get('twocheckout_order_status_id'));// Ugh. Some one've faked the sum. What should we do? Probably drop a mail to the shop owner?
} else {
$this->model_checkout_order->confirm($this->request->post['cart_order_id'], $this->config->get('config_order_status_id'));

// We can't use $this->redirect() here, because of 2CO behavior. It fetches this page
// on behalf of the user and thus user (and his browser) see this as located at
// domain. So user's cookies are not here and he will see empty basket and probably other
// weird things.

echo '<html>' . "\n";
echo '<head>' . "\n";
echo ' <meta http-equiv="Refresh" content="0; url=' . $this->url->link('checkout/success') . '">' . "\n";
echo '</head>'. "\n";
echo '<body>' . "\n";
echo ' <p>Please follow <a href="' . $this->url->link('checkout/success') . '">link</a>!</p>' . "\n";
echo '</body>' . "\n";
echo '</html>' . "\n";
} else {
echo 'The response from can\'t be parsed. Contact site adimistrator, please!';



Mon Sep 26, 2011 6:55 am

Post by Lamiaa » Mon Oct 10, 2011 6:34 am

I have solved the problem 3 months ago and I wrote to thetitan72 a message with what I did and really worked , but it seems he found a solution :) any way my version s Version and I will copy and paste my message here may any one need a help:
n ur 2checkout account :
go to :
site management
at Approved URL put the follow ( I will divide it into 2 lines but u should put it n one line as it doesn't seem clear here when I put it n one line ):

but instead of limaregygifts put ur own site name


be sure u do the following at the same page in ur account at 2checkout :
Demo Setting : off
Direct Return : Given links back to my website
Secret Word : the same one in ur admin section in opencart under extensions - payment - 2checkout

at ur admin section in open cart be sure the following:
2Checkout Account ID: 2CO Account # at the right of the top of the page n ur 2checkout account.
Secret Word: the same one n ur 2checkout account
Test Mode: No
Order Status: complete
Status: enabled

then make a new product as a test not more than 5 $ then purchase with ur credit as any customer for test , and see what will happen. u will delete this product after the purchasing finish.
be sure the price not more than 5 $ , u may make less asI remember, as 2checkout allow u to make a test with this amount many times which will b back again n ur credit. if u made more than this amount with ur credit or same personal data with 2checkout they will allow u as one time and will send u a warning that they may block ur account with them if u tried anymore than 5 $ whether u want or not to transfer the amount in ur account for real, as purchasing by owners r not allowed and may considered as money laoundry .

I hope it can work with all



Sat Apr 02, 2011 11:53 am

Post by Arumaldo » Wed Nov 16, 2011 11:41 pm

I used ... t/callback and it gives me the following error:

Notice: Undefined index: cart_order_id in /home/content/33/3492533/html/librocafe/catalog/controller/payment/twocheckout.php on line 72Notice: Undefined index: order_number in /home/content/33/3492533/html/librocafe/catalog/controller/payment/twocheckout.php on line 75Notice: Undefined index: total in /home/content/33/3492533/html/librocafe/catalog/controller/payment/twocheckout.php on line 80Notice: Undefined index: key in /home/content/33/3492533/html/librocafe/catalog/controller/payment/twocheckout.php on line 80The response from can't be parsed. Contact site adimistrator, please!

Please help!!



Tue Aug 23, 2011 8:15 am

Post by arvind7421 » Sat Feb 11, 2012 8:29 pm

Hi all,

I am new to this forum and to site building as well...

I tried everything till yesterday to get 2checkout work for me but failed to get the return URL working.

But today when I found this thread...everything started falling into right place and now my site is accepting orders and payments via 2checkout....

All I did was to copy the entire twocheckout.php code on first page of this thread by thetitan72 ... 42#p206182
and option 1 in 2checkout profile page (Given links).

Thanks you all for this.




Fri Feb 10, 2012 8:17 pm

Post by rapidplanet » Mon Jun 24, 2013 1:35 am

Yes, finally got the solition thanks to thetitan72, this really works , and all the guys who support with this thread gave me really good support to fix my problem.

Thanks all :)

For types of embroidery designs



Sun Jun 23, 2013 1:52 pm

Post by mmreed » Fri Jul 18, 2014 1:51 am

why is this not fixed in the newest build!?!?!?

I have the current version of open cart and 2checkout will not work for me. Can someone help me with making the newest version work?



Thu Aug 04, 2011 8:46 pm
Who is online

Users browsing this forum: No registered users and 5 guests