Post by buschschwick » Mon Sep 17, 2007 5:37 am

Okay so I saw one person address this and I tried to look around a bit to find the solution and couldn't really come up with one, so sorry if this has already been talked about...

But I just recieved and order (a rather large one in fact) and it showed up in my PayPal but no where on my Store site. Not even the customer, nor the order.

I can't even decide what the products are because the paypal invoice is obviously different and just says 1 (name of store) and then the amount.

Is it because the user did not fully click through all of the continue buttons? Or is a paypal module bug?

I switched from OS Commerce to this one because I was getting the same kind of happenings (payments but no orders on the site.)

PLEASE PLEASE any help would be greatly appreciated and or the simple, it will be updated in the next version will suffice. I just really love this cart and want it to work for me because it has everything I need!

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by Daniel » Mon Sep 17, 2007 5:55 am

You might have to contact your customer to find out what he ordered. Sorry but the system deletes that temperay order after so long.

PayPal should have sent your site a callback to say the order is complete. From what I have heard on the internet and in these forums it could be your host blocking the port on your web server that confirms the callback. GoDaddy is one of the hosts with the port blocking problem.

I have also or that sometimes it can take upto 7 hours for PayPal to send the callback. Unfortantly on my last release I had set the order class to delete orders old than 1 hour that had not been confirmed.

I think you are the first one to bring this problem to my attention.

Have you taken any other orders with opencart that were succesful?

If you want to PM me perhaps I can use my PayPal sand box account to do some testing with your site.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by d77 » Mon Sep 17, 2007 6:25 am

daniel, does the current version have a one hour limit? where can i change that to allow for any lag in the paypal callback?

User avatar
d77
Active Member

Posts

Joined
Sat Apr 14, 2007 8:04 am

Post by Daniel » Tue Sep 18, 2007 5:01 am

Change the save method in library/cart/order.php to:

Code: Select all

	function save($reference) {
		$sql   = "select * from order_data where reference = '?'";
		$order = $this->database->getRow($this->database->parse($sql, $reference));
		
		if (!$order) {
			$sql = "insert into order_data set reference = '?', data = '?', expire = '?'";
			$this->database->query($this->database->parse($sql, $reference, serialize($this->data), time() + 60 * 60 * 24 * 30));
		} else {
			$sql = "update order_data set data = '?', expire = '?' where reference = '?'";
			$this->database->query($this->database->parse($sql, serialize($this->data), time() + 60 * 60 * 24 * 30, $reference));
		}
	}

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by buschschwick » Tue Sep 18, 2007 5:09 am

Awesome... but would this lag in paypal also halt OpenCart from creating the new user account for my shop as well?

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by luvz2drv » Tue Sep 18, 2007 6:24 am

the creating of the user has nothign to do with Paypal

that is handled by open cart

luvz2drv


Post by buschschwick » Tue Sep 18, 2007 11:22 am

Right so why did I get an order from Jane Doe from my website but they are not a registered user?

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by Daniel » Tue Sep 18, 2007 6:43 pm

buschschwick wrote: Right so why did I get an order from Jane Doe from my website but they are not a registered user?
This is getting more intreasting by the minute.

It maybe because they are using a differn't PayPal account to what the registered customer details are with on your store.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by buschschwick » Wed Sep 19, 2007 2:53 am

That would make sense, but here is the catch... The person that did order from us I know personally and they aren't in our customer database at all  ???

Humph.

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by Daniel » Thu Sep 20, 2007 4:44 am

buschschwick wrote: That would make sense, but here is the catch... The person that did order from us I know personally and they aren't in our customer database at all  ???

Humph.


What you have described is impossible. You need to chack if you have more than one database set up e.g. one test and one live. Make sure this customer is not using a an link to your web site aswell.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by buschschwick » Thu Sep 20, 2007 11:25 am

What do you mean a link to our website?

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by Daniel » Thu Sep 20, 2007 8:35 pm

buschschwick wrote: What do you mean a link to our website?
Sorry I ment old link.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by buschschwick » Fri Sep 21, 2007 9:45 am

hmmm i still dunna what an old link would do  :-\

New member

Posts

Joined
Sat Sep 15, 2007 7:06 am

Post by d77 » Fri Sep 21, 2007 10:39 am

an old link to a separate copy of the cart, if you've installed multiple or have multiple copies of the database installed.

User avatar
d77
Active Member

Posts

Joined
Sat Apr 14, 2007 8:04 am

Post by newperson » Thu Nov 08, 2007 10:08 pm

Daniel wrote: You might have to contact your customer to find out what he ordered. Sorry but the system deletes that temperay order after so long.

PayPal should have sent your site a callback to say the order is complete. From what I have heard on the internet and in these forums it could be your host blocking the port on your web server that confirms the callback. GoDaddy is one of the hosts with the port blocking problem.

I have also or that sometimes it can take upto 7 hours for PayPal to send the callback. Unfortantly on my last release I had set the order class to delete orders old than 1 hour that had not been confirmed.

I think you are the first one to bring this problem to my attention.

Have you taken any other orders with opencart that were succesful?

If you want to PM me perhaps I can use my PayPal sand box account to do some testing with your site.
Hi there,

I'm setting up open cart for a client and I have experienced the same problem mentioned in this thread. Also unfortunately, my client's host is godaddy.
Their server is PHP 4, so we've been using the previous version of OpenCart.

So I have two questions:

1. How would I go about asking godaddy to open the port for the call back?

2. Does this version (for php4) of OpenCart also have the same time limit issue of 1 hour?? If so, which is the file and code that needs to be updated to change that?

Thank you! Your help is much appreciated!

Newbie

Posts

Joined
Thu Oct 04, 2007 1:57 am

Post by tchemis » Tue Nov 13, 2007 11:04 pm

@newperson, Godaddy does allow you to run php5, you just need to add the following code to your .htaccess files

Code: Select all

AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
More information can be found in their extensive help section here: http://help.godaddy.com/article.php?art ... opic_id=77

IMPORTANT!: Godaddy does a cache on .htaccess, if you deleted or just uploaded your .htaccess file it will take approximately 1hour  for godaddy to apply the changes. This does not happen if you simply edit the file.

I suggest you try the latest version of OpenCart and, the suggestions above to see it they help out then.

Active Member

Posts

Joined
Tue Aug 21, 2007 9:23 am

Post by bruce » Mon Jan 14, 2008 6:37 pm

Hi All,

The best solution is a change to the work flow for payment gateways, such as PayPal that make callbacks.

Currently OpenCart makes the payment by:
  • posting to an external PayPal url with the return on successful payment set to checkout_process.
  • calling the process() method of the payment extension (but paypal does not have one)
  • clearing the cart and the redirecting the customer to checkout_success.
  • waiting for a callback from paypal to process the order (which may never come).
So... if paypal does not call back:
  • the cart is empty
  • the order is not created
  • the order data will expire after some time and disappear
  • I have the customer's money, but I don't know what they bought
What we want is:
  • the customer's money
  • the cart empty
  • the order created
  • the order status set to "pending"
I am proposing that OpenCart makes the payment by:
  • posting to the external PayPal url with the return on successful payment set to checkout_process (no change).
  • calling the process() method of the payment extension (add one to PayPal ***).
  • clearing the cart and the redirecting the customer to checkout_success.
  • waiting for a callback from paypal (which still may never come).
*** The new process() method creates the order and sets the order status to a new value (say "paid unconfirmed").

What we have now is:
  • the customer's money
  • the cart empty
  • the order created
  • the order status set to "paid unconfirmed"
Almost perfect. We are still waiting for a callback from paypal. But now all it has to do is change the order status from "paid unconfirmed" to "pending".

If paypal does not call back, we can simply reconcile any aged (say 2 days) "paid unconfirmed" orders, times and amounts with payment reports in PayPal and sort it all out in the admin interface by manually changing the order status to "pending" for matched payments.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by ron44 » Fri Jan 25, 2008 8:03 pm

Hi bruce,

            Could you tell us how we should go about implementing the changes you outlines for those of us who are n00bs at programming.

Thanks

Newbie

Posts

Joined
Fri Jan 25, 2008 8:00 pm

Post by Ghostie » Sun Jan 27, 2008 1:16 am

Hi all,

Exactly the same problem identified with my customer's site, but slightly difference cause:

Checkout - choose Paypal as option (only installed option!)

Get to Paypal page - choose to Pay via Paypal (i.e. log in and pay) - Result = complete order, db entry correct, no problem.
Get to Paypal page - choose to Pay via Paypal with Credit/Debit card (not log in) - Result = payment received from Paypal, but no order in db.

Thoughts?

Ghostie

Newbie

Posts

Joined
Sat Jan 05, 2008 1:00 am

Post by bruce » Mon Jan 28, 2008 12:49 pm

I have posted the code as a contribution.

http://www.opencart.com/contribution/in ... tion_id/33

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm
Who is online

Users browsing this forum: No registered users and 3 guests