Skip to main content

Django VR Payment Copy + Pay

Implementation of VR Payment Copy + Pay. The following doc explain how to set up the VR Payment Copy + Pay base tutorial.

Quick start

  1. Add "django_vr_payment" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'django_vr_payment', ]

  2. (optional) Include the vr-payment URLconf in your project urls.py like this::

    path('vr-payment/', include('django_vr_payment.urls')),

  3. Run python manage.py migrate to create the vr-payment models.

  4. Prepare a checkout:

    from django_vr_payment.wrapper import VRPaymentWrapper
    
    vr_payment_wrapper = VRPaymentWrapper()
    basic_payment = vr_payment_wrapper.create_checkout(amount=<Decimal>, payment_type=<VRPaymentBasicPayment.PAYMENT_TYPE>, merchant_transaction_id=<UNIQUE_ID>)
    
    # the checkout_id for the VR Payment Copy&Pay form can be obtained through `checkout_id`
    checkout_id_for_forms = basic_payment.checkout_id
    
  5. Pay via a payment form of your choice. A working example can be seen in VRPaymentBasicCheckoutView

  6. Get the payment status:

    On return to VR_PAYMENT_SHOPPER_RESULT_URL_NAME, the app tries to get the status of a checkout object. You can also query VR Payment yourself:

    from django_vr_payment.models import VRPaymentBasicPayment
    from django_vr_payment.wrapper import VRPaymentWrapper
    
    vr_payment_wrapper = VRPaymentWrapper()
    basic_payment = VRPaymentBasicPayment.objects.get(checkout_id=<CheckoutID>)
    
    # get 'initial' status querying the checkout api
    payment_status = vr_payment_wrapper.get_checkout_status(basic_payment)
    
    # or query transaction api either by vr_payment_checkout.payment_id or vr_payment_checkout.merchant_transaction_id
    payment_status = vr_payment_wrapper.get_transaction_by_merchant_transaction_id(basic_payment)
    

Copyright and license

Copyright 2020 Particulate Solutions GmbH, under MIT license.

Release files for django-vr-payment 0.2.9

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-vr-payment 0.2.9
File Size Uploaded
django_vr_payment-0.2.9.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-vr-payment 0.2.9
File Interpreter ABI Platform
django_vr_payment-0.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 49.6 kB

Release files / django_vr_payment-0.2.9.tar.gz

Download URL django_vr_payment-0.2.9.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
67aaa5923864c8dcad281d1d1f8fbb809ae0fe102aaf5d53e8aefd0e8f840eb4
BLAKE2b-256 checksum
How to use checksums
8998fac4c0fc7e9dfdd3e8abbc3b2962b6fb67a8af4df2a62e97ab353c90beb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.3

Release files / django_vr_payment-0.2.9-py3-none-any.whl

Download URL django_vr_payment-0.2.9-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2378b361810e2b30f5ec6b5acc2468eec437d2ba2f79d6fb2e50a0647811303
BLAKE2b-256 checksum
How to use checksums
1ef80260c7366d8566251c395d29d90687cf28402dbea3e56ba8f5aade641483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.3

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 release files

0.2.8

1 release file

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

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