Comments (5)
At least that is what the comments say...
from django-shop.
The reason that order is not completed in payment backend is because ThankYouView
would not work otherwise (get_order_from_request
returns last order that is NOT completed).
In my opinion order should be completed when customer pay for it (indeed even if he closes the browser on 3rd party backend without waiting to be redirected back to shop).
For this to work, I propose that get_finished_url
method in payment api have order
argument and that it redirects to thank_you_for_your_order
urlname with order ID. ThankYouView
could display processed order and empty the cart.
from django-shop.
Hmm.. I have a 'Pay on advance' backend that sets the status to CONFIRMED only. I always override the ThankYouView and teach it not to set any status. As you said, setting of the status should be done by payment backends only.
I do this because I want to give the admin the chance to set the status to CONFIRMED and then SHIPPED / COMPLETED manually in the backend once the payment has arrived on his bank account.
But you raised an interesting issue here that I was not aware of. I have another backend for 'Pay on delivery'. That backend does set the status to COMPLETED and indeed, this causes trouble in the ThankYouView because if a customer first buys something with Pay in advance and right after that starts another transfer with Pay on delivery the ThankYouView would indeed select the wrong order. Duh. Thank god that I don't need the order in my ThankYouView.
This is quite messy. We need a solution for this. Your suggestion sounds good but we need to make sure that customers cannot see order details of other customers by messing with the URL...
from django-shop.
+1 to this
from django-shop.
change order status in api was addressed in d3bad93
thankyouview showing incorrect order fixed in a3140f9 (maybe we should make a test for this)
from django-shop.
Related Issues (20)
- Overridden AdminSite
- Supporting filter_backends option for ProductRetrieveView
- OperationalError at / no such table: cms_urlconfrevision HOT 1
- "Can not add/subtract money in different currencies." HOT 4
- Decoupling Django Shop from Django CMS HOT 11
- Is there a way to checkout without billing or shipping addresses? HOT 1
- Bug with endless scrolling when there are has offset HOT 6
- Missing phonenumber option in link plugin
- Cannot install: No module named weakref
- Clear Cart functionality (aka delete all items in Cart at once)
- pipenv run ./manage.py initialize_shop_demo [ERROR] HOT 2
- Django 3.2 HOT 2
- filterChanged() not working
- Is project still active? HOT 2
- An admin for model "User" has to be registered to be referenced by FolderAdmin.autocomplete_fields HOT 2
- Multi-Tenancy Doc is not finished
- error while installation HOT 1
- Install error while parsing `--sequential` requirements HOT 2
- Problem with css variables HOT 2
- Django-shop elasticsearch bug "Unexpected queryset model" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-shop.