Coen
unread,Apr 19, 2012, 12:28:47 PM4/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to djang...@googlegroups.com
Hello group,
I'm new to django-shop and like it! I got quite far. But now I'm stuck. :/
In my shop, when a payment is successful the payment backend calls confirm_payment(order, amount, transaction_id, save=True). The first time this works fine. There is only one cart-item in the db. If there are more than one carts I get this error:
MultipleObjectsReturned at /shop/pay/ideal/report/
get() returned more than one MyCart -- it returned 2! Lookup parameters were {'user': None}
/shop/pay/ideal/report/?transaction_id=### is requested ul by the bank to indicate the transaction is finished.
All cart objects have user_id null. Because I don't let users login. But with multiple carts in de db the django-shop payment api can't get the cart_object by user:
/Library/Python/2.6/site-packages/django_shop-0.0.13.dev0-py2.6.egg/shop/payment/api.py in confirm_payment
cart_object = Cart.objects.get(user=order.user)
cart_object.empty()
How can I keep track of transaction-user-cart relationships without having my customers to login? Or am I missing something else?
All help and suggestions are appreciated!
/C