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

Newbie

Posts

Joined
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 www.nochex.com for details.

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

Newbie

Posts

Joined
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 "http://www.myweb.com/index.php?route=pa ... t/callback" Not working ..
In 1.5.1.1
Last edited by pirate on Sat Oct 01, 2011 5:10 am, edited 1 time in total.

New member

Posts

Joined
Sat Sep 03, 2011 1:28 pm

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

Same problem here. Please some help! thanks!

Newbie

Posts

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

Newbie

Posts

Joined
Mon Sep 26, 2011 6:55 am

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

Why no one replying ?

New member

Posts

Joined
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:
<?php
class ControllerPaymentTwoCheckout extends Controller {
protected function index() {
$this->data['button_confirm'] = $this->language->get('button_confirm');

$this->load->model('checkout/order');

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

$this->data['action'] = 'https://www.2checkout.com/2co/buyer/purchase';

$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';
}

$this->render();
}

public function callback() {
$this->load->model('checkout/order');

$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 2checkout.com
// 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";
exit();
} else {
echo 'The response from 2checkout.com can\'t be parsed. Contact site adimistrator, please!';
}
}
}
?>

Newbie

Posts

Joined
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 1.4.9.5 and I will copy and paste my message here may any one need a help:
"''''''''
n ur 2checkout account :
go to :
account
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 ):

http://www.limaregygifts.com/
index.php?route=payment/twocheckout/callback

but instead of limaregygifts put ur own site name

http://www.****************.com/index.php?route=payment/twocheckout/callback

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

Newbie

Posts

Joined
Sat Apr 02, 2011 11:53 am

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

I used http://www.mystore.com/index.php?route= ... 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 2checkout.com can't be parsed. Contact site adimistrator, please!


Please help!!

Newbie

Posts

Joined
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 http://forum.opencart.com/viewtopic.php ... 42#p206182
and option 1 in 2checkout profile page (Given links).

Thanks you all for this.

cheers

Newbie

Posts

Joined
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 http://www.embroiderydesignszone.com


Newbie

Posts

Joined
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?

Newbie

Posts

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

Users browsing this forum: Bing [Bot] and 6 guests