zhaque / django-subscription Goto Github PK
View Code? Open in Web Editor NEWSubscriptions or Recurring Billing App for django
Home Page: https://github.com/zhaque
License: Other
Subscriptions or Recurring Billing App for django
Home Page: https://github.com/zhaque
License: Other
PayPal's "trial period" feature should be used to charge less for first billing period on upgrade; the rebate should be equal to part of old subscription plan's billing period that is left unused.
To reproduce:
The result will be an exception that the value of trial unit has bigger length than the max_length accepted by the DB.
On the other hand, if sqlite3 is used, the result will be an entry with the 'None' string as a value instead of the null.
I did not use mysql yet, so I do not know, if there is some issue for this engine, too.
I worked on the upgrade to Django 1.10.5 and Python 3.5 but I am stock now. I get the above error and dont understand why the form is generated inside a template tag but I guess thats why its called shortcut? Any chance you can help?
#from django.views.generic.list_detail import object_list
from django.views.generic import TemplateView
from .models import Subscription, UserSubscription
_formclass = getattr(settings, 'SUBSCRIPTION_PAYPAL_FORM', 'paypal.standard.forms.PayPalPaymentsForm')
_formclass_dot = _formclass.rindex('.')
_formclass_module = __import__(_formclass[:_formclass_dot], {}, {}, [''])
PayPalForm = getattr(_formclass_module, _formclass[_formclass_dot+1:])
get_paypal_extra_args = Signal(providing_args=['user', 'subscription', 'extra_args'])
My WIP repository (django 1.10.5 and python 3.5) is here:
https://github.com/finnerds/django-paypal-subscription
I tried to add an example and make it more understandable for me what actually happens and how it could be used.
When UserSubscription expires, it is not deleted from database.
When user first cancels old UserSubscription and then upgrades or resubscribes, old UserSubscription does not get deleted.
UserSubscription model should get a "cancelled" BooleanField, so it can be reaped after expiration, deleted on upgrade, and properly reactivated ("uncancelled") on resubscription.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.