-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Paypal Payment Gateway with Django [Not an issue] #12
Comments
ok after digging into sdk i realize i made few mistakes which i am correcting below and it will create the checkout page for specific order.
I will keep update if i implement something new in this code. I am still looking way to confirm the payment so we could start the product shipping and update the same on DB. BTW those many print statements are for you guys who wants to experiment with various other OrderRequest attributes and debug. It will give you comprehensive detail. |
Just wanted to inform I have successfully integrated Paypal with Django. I will update this thread soon... |
First of I apology If you think this is irrelevant. I take full responsibility. Second I want to create a tutorial about this new sdk integrating payment gateway in Django apps. However the doc is still in beta so i couldn't make it but I hope with your help i will complete this tutorial which will help community.
Install Packages
Create .env
Note:- You can get all above keys from Paypal Developer Account.
your_app/views.py
Just call handle_paypal on a Button Click and it will create an order then redirect to a approve link where user can make payment. On success payment it will redirect to return_url
Unfortunately this doesn't work and I believe the code which i wrote is really poor. I need your help to complete this tutorial. I read the doc but doc is not comprehensive. The very basic requirement of creating an order is to define purchase_unit detail, payer name, payer email, return_url and cancel_url. I understood how to define purchase_unit detail only as its described in doc. I also think these many imports might be not necessary.
The text was updated successfully, but these errors were encountered: