Integrating Stripe with Django oscar.

811 views
Skip to first unread message

SammyJ

unread,
Jul 2, 2018, 10:58:20 AM7/2/18
to django-oscar
Hi guys, I am trying to integrate stripe with my ecommerce site built with Django oscar.
So far I used the stripe.js and elements and the keys after signing up and am able to accept payments and also track them in the stripe dashboard.
The problem is how do I let Django oscar know that the transaction is complete?Which model should I update for this?
I tried extending the handle_payment method and giving the source, but it doesn't seem to work.

Can anyone help?

Thanks

SammyJ

unread,
Jul 16, 2018, 1:47:19 AM7/16/18
to django-oscar
Well I have found a way to integrate the Stripe payments gateway with Django Oscar:
I have answered my own question on stack overflow and the link to it is here, you can just check it out:

Cheung Ka Shing

unread,
May 20, 2019, 1:11:06 PM5/20/19
to django-oscar

Screenshot 2019-05-21 at 1.09.56 AM.png

You will need to override the PaymentDetailsView... however after I fork the checkout apps. There is no view that allows me to update the PaymentDetailsView.
Appreciate if you can advise ?

SammyJ

unread,
May 21, 2019, 12:50:19 PM5/21/19
to django-oscar
Well, you can create your own views.py file and then extend the PaymentDetailsView in here.

Cheung Ka Shing

unread,
May 22, 2019, 1:23:30 PM5/22/19
to django...@googlegroups.com
Thanks !

Now I have an issue saying ModuleNotFoundError: No module named facade

I have created facade.py with below structure…. Appreciate if you can help again. Thanks !





-- 
https://github.com/django-oscar/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 https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/1da92c57-1012-4283-b150-454db41da9e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Heather Dawe

unread,
Jun 16, 2019, 5:14:38 PM6/16/19
to django-oscar
Hi there, I am also getting this error, with the same file structure. Did you get any solution please? Many thanks :o)
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

Jacob Rockwell

unread,
May 25, 2020, 9:04:03 PM5/25/20
to django-oscar

Hi Heather and Cheung,

I'm sure you guys have figured this out by now but I thought I'd add the solution I found as reference for people of the future. The "ModuleNotFound" error is a python issue. In python 2.x you could import files in the same directory by name, while in python 3.x you need to import files in the same directory with a "." before. The import line for facade would be "from .facade import Facade". Hope this saves someone the day and a half it took me!

ek ekke

unread,
May 28, 2020, 6:00:46 PM5/28/20
to django-oscar
I've done everything in this post, I am not sure what my urls.py should look like so I've added:
url(r'^checkout/payment-details/', PaymentDetailsView, name="payment"),

But i get:

TypeError at /checkout/payment-details/

__init__() takes 1 positional argument but 2 were given

On checkout, not sure what I am missing?

Samir Shah

unread,
May 28, 2020, 11:11:23 PM5/28/20
to django-oscar
You're including the view incorrectly, it should be:

PaymentDetailsView.as_view()


ek ekke

unread,
May 29, 2020, 4:49:25 AM5/29/20
to django-oscar
Ah yes, thank you.
It still does not take payment, still getting the page that says I should implement a payment method.
Reply all
Reply to author
Forward
0 new messages