Deleting incomplete orders - Satchmo deleted a valid order!

29 views
Skip to first unread message

digicase

unread,
Jun 11, 2009, 10:42:23 PM6/11/09
to Satchmo users
Yesterday we had an issue where an order had been saved, and sent to
PayPal for payment. The payment was successful and PayPal sent back
IPN data for verification which was approved. However, in between the
payment being made and the IPN data sent from PayPal Satchmo had
deleted the order:

[Thu Jun 11 00:41:05 2009] [error] Thu, 11 Jun 2009 00:41:05
satchmo_store.shop.models INFO Deleting incomplete order #9614
from database

That mean that when the IPN data came and was verified a few minutes
later, the order status could not be updated as it had been deleted,
and there is no order now in Satchmo that matches the PayPal payment,
so we can't create an invoice from Satchmo.

[Thu Jun 11 00:43:25 2009] [error] Thu, 11 Jun 2009 00:43:25
root INFO PayPal IPN data verification was successful.
[Thu Jun 11 00:43:25 2009] [error] Thu, 11 Jun 2009 00:43:25
root ERROR Traceback (most recent call last):
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/src/satchmo-trunk/
satchmo/apps/payment/modules/paypal/views.py", line 166, in ipn
[Thu Jun 11 00:43:25 2009] [error] order = Order.objects.get
(pk=invoice)
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/webapps/django/lib/
python2.5/django/db/models/manager.py", line 93, in get
[Thu Jun 11 00:43:25 2009] [error] return self.get_query_set().get
(*args, **kwargs)
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/webapps/django/lib/
python2.5/django/db/models/query.py", line 342, in get
[Thu Jun 11 00:43:25 2009] [error] % self.model._meta.object_name)
[Thu Jun 11 00:43:25 2009] [error] DoesNotExist: Order matching query
does not exist.
[Thu Jun 11 00:43:25 2009] [error] Traceback (most recent call last):
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/src/satchmo-trunk/
satchmo/apps/payment/modules/paypal/views.py", line 166, in ipn
[Thu Jun 11 00:43:25 2009] [error] order = Order.objects.get
(pk=invoice)
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/webapps/django/lib/
python2.5/django/db/models/manager.py", line 93, in get
[Thu Jun 11 00:43:25 2009] [error] return self.get_query_set().get
(*args, **kwargs)
[Thu Jun 11 00:43:25 2009] [error] File "/home/x/webapps/django/lib/
python2.5/django/db/models/query.py", line 342, in get
[Thu Jun 11 00:43:25 2009] [error] % self.model._meta.object_name)
[Thu Jun 11 00:43:25 2009] [error] DoesNotExist: Order matching query
does not exist.

Why did Satchmo delete the order? I looked into the code and its a
function called by a signal that happens when the shopping cart
changes. There are several other 'Deleting incomplete order #xxxx' in
our logs. If an order has been sent to PayPal surely it should not be
deleted as then there is no reference in Satchmo.

Is this a bug, or can I safely remove this function and stop Satchmo
deleting orders?

Thanks,
Arthur

Chris Moffitt

unread,
Jun 11, 2009, 10:47:04 PM6/11/09
to satchm...@googlegroups.com
Which version of Satchmo are you using? This definitely sounds like a bug but it seems odd that it would be sporadic. I'm assuming you've had successful orders before but this one is the first you've noticed where it deleted the order.

-Chris

digicase

unread,
Jun 11, 2009, 10:54:37 PM6/11/09
to Satchmo users
We are using version 0.9-pre-SVN-1938

You are right, we have had many successful orders but this one is the
first we have noticed where Satchmo
deleted a valid order.

Chris Moffitt

unread,
Jun 11, 2009, 11:24:02 PM6/11/09
to satchm...@googlegroups.com
Is there anything else unique about this product or order? I'll have to dig around in this code a bit to figure out how this could happen. It definitely shouldn't do it.

-Chris

digicase

unread,
Jun 23, 2009, 4:13:46 AM6/23/09
to Satchmo users
Nothing unique about this, it was just a standard order on a product
that has been ordered several times before with no problem. All I know
is that Satchmo deletes an order if something about the shopping cart
changes. I'm not sure what changes cause Satchmo to delete an order
though?
Reply all
Reply to author
Forward
0 new messages