Skip to main content

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.2.x:

pip install djangoshop-paypal<1.3

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.

Metadata

Release files for djangoshop-paypal 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangoshop-paypal 1.2
File Size Uploaded Provenance Actions
djangoshop-paypal-1.2.tar.gz 6.1 kB Without provenance Details for djangoshop-paypal-1.2.tar.gz

Release files / djangoshop-paypal-1.2.tar.gz

Download URL djangoshop-paypal-1.2.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
602f2eceaa05fd75cc6ad504a4354e7698003b31354a63c849a308ab719aa669
BLAKE2b-256 checksum
How to use checksums
b446946817cee0d29948717735ab51978da8d60b526f1bc982421f62ddd5600e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

Security for djangoshop-paypal 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page