I don't know if this is a common issue, If I set up something wrong or there's a glitch somewhere, but on one of my client's site I use OpenCart with Paypal.
My client got a confirmation from Paypal that a payment was done, but OpenCart shows no sign of a placed order. The customer shows up under "Customer", but there are no orders to be found.
Am I doing something wrong, or did the customer "forget" to go back to the website after using the Paypal terminal?
My client got a confirmation from Paypal that a payment was done, but OpenCart shows no sign of a placed order. The customer shows up under "Customer", but there are no orders to be found.
Am I doing something wrong, or did the customer "forget" to go back to the website after using the Paypal terminal?
Nope.
I just looked and couldn't see it at first.
When you first go to the page, you expect all of the orders to be shown, and the filter thing to filter that list down; you don't expect it to reveal a whole load of other orders.
That's why i, and i expect many others didn't even realise this feature was there.
Thanks for letting me know though; if i get another order that doesn't show i'll use this.
I just looked and couldn't see it at first.
When you first go to the page, you expect all of the orders to be shown, and the filter thing to filter that list down; you don't expect it to reveal a whole load of other orders.
That's why i, and i expect many others didn't even realise this feature was there.
Thanks for letting me know though; if i get another order that doesn't show i'll use this.
Just throwing this out there-- I wonder if it has to do anything with the db naming scheme, mentioned by Qphoria here:
http://forum.opencart.com/viewtopic.php?f=20&t=5452
Though looking back it looks like 1.2.8 wasn't happy with the old way either
http://forum.opencart.com/viewtopic.php?f=20&t=5452
Though looking back it looks like 1.2.8 wasn't happy with the old way either

Qphoria didn't post in that topic you linked to.
I don't think that the name makes any difference at all.
I have a feeling that the problem lies with the client configuration at the paypal website, not with the opencart system.
After not getting an email, i looked through my paypal settings and found that it was still redirecting to an old confirmation page, so i changed it.
I don't know why, but i can't seem to replicate the error though.
I don't think that the name makes any difference at all.
I have a feeling that the problem lies with the client configuration at the paypal website, not with the opencart system.
After not getting an email, i looked through my paypal settings and found that it was still redirecting to an old confirmation page, so i changed it.
I don't know why, but i can't seem to replicate the error though.
Has there been any updates about this? I see no orders, even incomplete ones on the site, though when I checked the database they were there.
Go to Customers>Order.RaymondBeaudoin wrote:Has there been any updates about this? I see no orders, even incomplete ones on the site, though when I checked the database they were there.
In the Status dropdown, select 'No status orders', then press filter.
It's not an easy find

Can some one put this into there payment/paypal.php controller?
Tell me if it works?
Code: Select all
<?php
class ControllerPaymentPPStandard extends Controller {
protected function index() {
$this->data['button_confirm'] = $this->language->get('button_confirm');
$this->data['button_back'] = $this->language->get('button_back');
if (!$this->config->get('pp_standard_test')) {
$this->data['action'] = 'https://www.paypal.com/cgi-bin/webscr';
} else {
$this->data['action'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
}
$this->load->model('checkout/order');
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$this->data['business'] = $this->config->get('pp_standard_email');
$this->data['item_name'] = html_entity_decode($this->config->get('config_store'));
$this->data['currency_code'] = $order_info['currency'];
$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency'], $order_info['value'], FALSE);
$this->data['first_name'] = $order_info['payment_firstname'];
$this->data['last_name'] = $order_info['payment_lastname'];
$this->data['address1'] = $order_info['payment_address_1'];
$this->data['address2'] = $order_info['payment_address_2'];
$this->data['city'] = $order_info['payment_city'];
$this->data['zip'] = $order_info['payment_postcode'];
$payment_address = $this->customer->getAddress($this->session->data['payment_address_id']);
$this->data['country'] = $payment_address['iso_code_2'];
$this->load->library('encryption');
$encryption = new Encryption($this->config->get('config_encryption'));
$this->data['notify_url'] = $this->url->http('payment/pp_standard/callback&order_id=' . $encryption->encrypt(urlencode($this->session->data['order_id'])));
$this->data['email'] = $order_info['email'];
$this->data['invoice'] = $this->session->data['order_id'] . ' - ' . $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
$this->data['lc'] = $this->language->getCode();
if (!$this->config->get('pp_standard_transaction')) {
$this->data['paymentaction'] = 'authorization';
} else {
$this->data['paymentaction'] = 'sale';
}
$this->data['return'] = $this->url->https('checkout/success');
$this->data['cancel_return'] = $this->url->https('checkout/payment');
$this->data['back'] = $this->url->https('checkout/payment');
$this->id = 'payment';
$this->template = $this->config->get('config_template') . 'payment/pp_standard.tpl';
$this->render();
}
public function callback() {
$this->load->library('encryption');
$encryption = new Encryption($this->config->get('config_encryption'));
if (isset($this->request->get['order_id'])) {
$order_id = $encryption->decrypt(urldecode($this->request->get['order_id']));
} else {
$order_id = 0;
}
$this->load->model('checkout/order');
$order_info = $this->model_checkout_order->getOrder($order_id);
if ($order_info) {
$request = 'cmd=_notify-validate';
foreach ($this->request->post as $key => $value) {
$request .= '&' . $key . '=' . urlencode(stripslashes($value));
}
$header = 'POST /cgi-bin/webscr HTTP/1.0' . "\r\n";
$header .= 'Content-Type: application/x-www-form-urlencoded' . "\r\n";
$header .= 'Content-Length: ' . strlen(utf8_decode($request)) . "\r\n\r\n";
if (!$this->config->get('pp_standard_test')) {
$fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 30);
} else {
$fp = fsockopen('www.sandbox.paypal.com', 80, $errno, $errstr, 30);
}
if ($fp) {
fputs($fp, $header . $request);
while (!feof($fp)) {
$response = fgets($fp, 1024);
if (strcmp($response, 'VERIFIED') == 0) {
$this->model_checkout_order->confirm($order_id, $this->config->get('config_order_status_id'));
switch($this->request->post['payment_status']){
case 'Completed':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_id'), '', TRUE);
break;
case 'Canceled_Reversal':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_canceled_reversal_id'), '', TRUE);
break;
case 'Denied':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_denied_id'), '', TRUE);
break;
case 'Failed':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_failed_id'), '', TRUE);
break;
case 'Pending':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_pending_id'), '', TRUE);
break;
case 'Refunded':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_refunded_id'), '', TRUE);
break;
case 'Reversed':
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_reversed_id'), '', TRUE);
break;
default:
$this->model_checkout_order->update($order_id, $this->config->get('pp_standard_order_status_unspecified_id'), '', TRUE);
break;
}
}
}
fclose($fp);
}
}
}
}
?>
OpenCart®
Project Owner & Developer.
You mean pp_standard.php? Is this a v1.3.0 problem or an earlier problem.
Honestly after reading all the posts scattered around, I still don't know what the problem is. I have my 1.3.0 cart running without problem using paypal standard.
I have a php debugger ide that I use and I've stepped through what I could and saw no issue. Is it a problem on the IPN callback?
Honestly after reading all the posts scattered around, I still don't know what the problem is. I have my 1.3.0 cart running without problem using paypal standard.
I have a php debugger ide that I use and I've stepped through what I could and saw no issue. Is it a problem on the IPN callback?
Who is online
Users browsing this forum: Semrush [Bot] and 76 guests