-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,52 @@ | ||
# REST based PayPal Payment Provider Integration for django-shop | ||
|
||
This integration only works for django-shop version 0.3 and above. | ||
|
||
This integrates the PayPal for django-shop version 0.9 and above. | ||
|
||
## Installation | ||
|
||
In ``settings.py`` add ``'shop_paypal'`` to ``INSTALLED_APPS``. | ||
for django-shop version 0.9.x: | ||
|
||
``` | ||
pip install djangoshop-paypal==0.1.4 | ||
``` | ||
|
||
for django-shop version 0.10.x: | ||
|
||
``` | ||
pip install djangoshop-paypal==0.2.0 | ||
``` | ||
|
||
## Configuration | ||
|
||
In ``settings.py`` of the merchant's project: | ||
|
||
Add ``'shop_paypal'`` to ``INSTALLED_APPS``. | ||
|
||
At [PayPal](https://paypal.com/) create a business account and apply for the vendor credentials. | ||
For a testing account add them as: | ||
|
||
``` | ||
SHOP_PAYPAL = { | ||
'API_ENDPOINT': 'https://api.sandbox.paypal.com', | ||
'MODE': 'sandbox', | ||
'CLIENT_ID': '<client-id-as-delivered-by-PayPal>', | ||
'CLIENT_SECRET': '<client-secret-as-delivered-by-PayPal>', | ||
} | ||
``` | ||
|
||
In ``settings.py`` add | ||
and for production: | ||
|
||
``` | ||
SHOP_PAYPAL = { | ||
'API_ENDPOINT': 'https://api.sandbox.paypal.com', # or 'https://api.paypal.com' | ||
'MODE': 'sandbox', # 'sandbox' or 'live' | ||
'API_ENDPOINT': 'https://api.paypal.com', | ||
'MODE': 'live', | ||
'CLIENT_ID': '<client-id-as-delivered-by-PayPal>', | ||
'CLIENT_SECRET': '<client-secret-as-delivered-by-PayPal>', | ||
} | ||
``` | ||
|
||
In ``settings.py`` add ``'shop_paypal.payment.PaymentModifier'`` to ``SHOP_CART_MODIFIERS``. | ||
Add ``'shop_paypal.modifiers.PaymentModifier'`` to the list of ``SHOP_CART_MODIFIERS``. | ||
|
||
In ``settings.py`` add ``'shop_paypal.payment.OrderWorkflowMixin'`` to ``SHOP_ORDER_WORKFLOWS``. | ||
Add ``'shop_paypal.payment.OrderWorkflowMixin'`` to the list of ``SHOP_ORDER_WORKFLOWS``. | ||
|
||
This will add a list item for PayPal to the select fields, when chosing the payment method. | ||
When rendering the payment method form, "PayPal" shall appear in the list of possible payments. |