Payment process and redirect as a result of RedirectRequired exception

345 views
Skip to first unread message

g...@guysteven.co.nz

unread,
Nov 27, 2014, 2:19:21 PM11/27/14
to django...@googlegroups.com
The submit method in PaymentDetailsView contemplates that handle_payment may raise a RedirectRequired exception and a comment cites PayPal and 3DS as examples where this may be required.

I haven't found any code where this is in fact what happens. Can anyone point me in the direction of code where the customer is redirected to an external site for payment as a result of a RedirectRequired exception, or can anyone explain how the remaining code in submit gets executed if the user is redirected at that point in the method.

David Winterbottom

unread,
Nov 27, 2014, 6:25:00 PM11/27/14
to django-oscar
On Thu, Nov 27, 2014 at 7:19 PM, <g...@guysteven.co.nz> wrote:
The submit method in PaymentDetailsView contemplates that handle_payment may raise a RedirectRequired exception and a comment cites PayPal and 3DS as examples where this may be required.

I haven't found any code where this is in fact what happens. Can anyone point me in the direction of code where the customer is redirected to an external site for payment as a result of a RedirectRequired exception, or can anyone explain how the remaining code in submit gets executed if the user is redirected at that point in the method.

​You're right. There aren't many examples of that functionality in a public repo. Here's one example but it's quite old:

Several private Tangent projects were using that functionality.​ When you redirect the customer away, you normally need to implement two new views for the payment gateway to redirect the customer back to (a success and a cancel view). The paypal extension provides examples of these: 

These can either subclass PaymentDetailsView or the OrderPlacementMixin in order to access the functionality required to place an order.

Hope that's useful.



 

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/8eea28b5-b7d3-46d1-b57e-d9ad7f6cc9c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

g...@guysteven.co.nz

unread,
Nov 29, 2014, 3:39:17 AM11/29/14
to django...@googlegroups.com
thankyou, the gocardless example gave me the direction I needed.
Reply all
Reply to author
Forward
0 new messages