Skip to main content

django-paypal2

提供paypal支付相关的view和方法

Quick start

  1. Install:

    pip install django_paypal2
  2. Add “paypal” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'paypal',
    ]
  3. Add paypal config to settings.py:

    PAYPAL = {
        "SERVER_URL": "http://localhost:8000", # current site host and port
        "sandbox": False,  # True or False
        "client_id": "xxx",
        "client_secret": "", # you can get id and secret from paypal
    }
  4. Include the polls URLconf in your project urls.py like this:

    url(r'^paypal/', include('paypal.urls')),
  5. Migrate db

  6. Create payment and redirect to paypal

    from paypal.models import PaypalPayment
    
    pp = PaypalPayment(description="sample pay")
    pp.add_item("sample", 'USD', float(amount))
    pp.reference_id = "your reference id"
    pp.save()
    return redirect('paypal_redirect', uid=pp.uid)

Metadata

Release files for django-paypal2 1.0.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 django-paypal2 1.0.2
File Size Uploaded Provenance Actions
django-paypal2-1.0.2.tar.gz 11.0 kB Without provenance Details for django-paypal2-1.0.2.tar.gz

Release files / django-paypal2-1.0.2.tar.gz

Download URL django-paypal2-1.0.2.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
af2b26b36ee3f4eef3b106de218392f49f5de5b0dc3d3fee54a916ace451dc33
BLAKE2b-256 checksum
How to use checksums
8d273a2084b378a7419da602fd3666fa57e0c6e7c79ee03b1b6522e9bc4d6888
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-paypal2 1.0.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