Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Debits is a Python Django package for accepting payments in Internet (currently PayPal is supported). It has great subscription payments support, as well as support for regular payments.
Support for the following advanced features:
- support for both regular and recurring transactions
- support for imitating a subscription payment with any number of manual payments for any paid duration placed whenever the customer wants
- automatic disallowing duplicate payments of the same invoice
- support for automatic cancellation of old subscription as soon as a new subscription is placed by the customer
- sending reminder emails, with customizable templates
- trial period without registering at the payment processor (such as PayPal) site and without asking a credit card
- subscription period and trial period can be any numbers of days, weeks, months, years (subject to payment processor limitations)
- very customizable, for example the example application shipped with the project shows the following features
- several pricing plans
- easy subscription and unsubscription
- switching between pricing plans at any time (subject to PayPal limitations)
- calculation and automatic adjustment of the remaining time to the due payment when upgrading to a more costly plan
All possible kinds of transaction
States of services
Instant payment notifications
See Email reminders
Prolonging payment interface
For a manual recurring payment, when the user is prompted to pay he will be directed (for example, by an email link) to
settings.PROLONG_PAYMENT_VIEW with transaction ID as the argument defined like
#!python PROLONG_PAYMENT_VIEW = 'main:prolong_payment' url(r'^prolong-payment/([0-9]+)$', views.prolong_payment),
It is a responsibility of a particular software project to provide this page. This page usually should list all available payment processors, flexible payment period, and the possibility to switch to recurring payments.
Note that the software displaying this page should check user permission.
Upgrading plans in the test application
round(x) = floor(x + 0.5)
When we upgrade a plan, we divide either the due payment period or the free period in the subscription by the coefficient of price change. After this we apply the function round to the number of days.
When downgrading a plan, the difference paid in advance is lost. (Don't forget to say it in your terms and conditions).
The testing application also serves as a "template" explaining what structure real applications should have.
See also Testing application.