This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Django module for using https://www.payplug.com payment solution.

Documentation

The full documentation is at https://payplug_dj.readthedocs.org.

Quickstart

Install payplug-dj:

pip install payplug_dj

Then use it in a project, add:

'payplug_dj'

to your INSTALLED_APPS and set your PAYPLUG_API_KEY in your settings.py:

PAYPLUG_API_KEY = 'sk_test_XXXXxxxXXXX'

To use it in your application views:

from payplug_dj.models import Payment
from payplug_dj.signals import payment_return
from payplug_dj.signals import payment_cancel

payment = Payment.objects.create(
    email='mail@example.com,
    firstname='Alexandre',
    lastname='Norman',
    amount=12.45,
    currency='EUR',
    template_return='myapp/payment_return.html',
    template_cancel='myapp/payment_cancel.html',
)
payment.save()
payment.create_payment(
    metadata={
        'my_invoice_id': '2016-0002',
        'my_client_id': 142,
    }
)

payment_return.connect(PaymentOk)
payment_return.connect(PaymentCancelled)


def PaymentOk(sender, **kwargs):
    request = kwargs.get("request")
    payment = kwargs.get("payment")
    metadata = payment.get_payplug_metadata()

    # Set payment OK
    if payment.state == 'P':
        # Do something
        pass
    return

def PaymentCancelled(sender, **kwargs):
    # Do something
    return

payment.state could take one of this values:

  • ‘C’: Canceled
  • ‘P’: Paid
  • ‘R’: Refund
  • ‘W’: Wait for payment

Features

  • Allow to use Payplug payment solution from Django.

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-test.txt
(myenv) $ python runtests.py

Credits

Tools used in rendering this package:

History

0.1.0 (2016-02-01)

  • First release on PyPI.
Release History

Release History

0.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
payplug_dj-0.1.0-py2.py3-none-any.whl (10.9 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Mar 19, 2016
payplug_dj-0.1.0.tar.gz (20.0 kB) Copy SHA256 Checksum SHA256 Source Mar 19, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting