Git Product home page Git Product logo

Comments (5)

mbrochh avatar mbrochh commented on July 22, 2024

At least that is what the comments say...

from django-shop.

bmihelac avatar bmihelac commented on July 22, 2024

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.

mbrochh avatar mbrochh commented on July 22, 2024

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.

AdrianRibao avatar AdrianRibao commented on July 22, 2024

+1 to this

from django-shop.

alesdotio avatar alesdotio commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.