Skip to content

Commit

Permalink
added missing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Feb 7, 2017
1 parent 69ad4f6 commit bb46b5b
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions README.md
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.

0 comments on commit bb46b5b

Please sign in to comment.