Skip to main content

PayPal Payment Provider Integration for django-shop

Project description

REST based PayPal Payment Provider Integration for django-shop

This integrates PayPal for django-shop version 1.0 and above.

Installation

for django-shop version 1.0.x:

pip install djangoshop-paypal<1.1

Configuration

In settings.py of the merchant's project:

Add 'shop_paypal' to INSTALLED_APPS.

At PayPal 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-provided-by-PayPal>',
    'CLIENT_SECRET': '<client-secret-as-provided-by-PayPal>',
    'PURCHASE_DESCRIPTION': "Thanks for purchasing at My Shop",
}

and for production:

SHOP_PAYPAL = {
    'API_ENDPOINT': 'https://api.paypal.com',
    'MODE': 'live',
    'CLIENT_ID': '<client-id-as-provided-by-PayPal>',
    'CLIENT_SECRET': '<client-secret-as-provided-by-PayPal>',
    'PURCHASE_DESCRIPTION': "Thanks for purchasing at My Shop",
}

Add 'shop_paypal.modifiers.PaymentModifier' to the list of SHOP_CART_MODIFIERS.

Add 'shop_paypal.payment.OrderWorkflowMixin' to the list of SHOP_ORDER_WORKFLOWS.

When rendering the payment method form, "PayPal" shall appear in the list of possible payments.

Successful payments are redirected onto the just created order detail page.

If a payment was rejected by PayPal, djangoshop-paypal redirects onto the CMS page with the ID shop-cancel-payment, so make sure that such a page exists.

Changes

1.0

  • Adopted ver django-SHOP version 1.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangoshop-paypal-1.0.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file djangoshop-paypal-1.0.tar.gz.

File metadata

  • Download URL: djangoshop-paypal-1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for djangoshop-paypal-1.0.tar.gz
Algorithm Hash digest
SHA256 38a5570eac6d80846c4abe6fcb1933418b036120e778bd7cfa7f008a7474b320
MD5 a5e9fc7691db2d9720934bbe645d709a
BLAKE2b-256 19de054ea8e40c6ec9a6c1c98aa1212549a8a7a9a3e734e41e1a1bbf81fbcb66

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page