Merge branch 'master' into task/3530/upgrade_to_django_1.11

This commit is contained in:
PCoder 2017-12-24 20:19:05 +01:00
commit 4069199252
18 changed files with 164 additions and 109 deletions

View file

@ -232,6 +232,17 @@ class StripeUtils(object):
)
return subscription_result
@handleStripeError
def unsubscribe_customer(self, subscription_id):
"""
Cancels a given subscription
:param subscription_id: The Stripe subscription id string
:return:
"""
sub = stripe.Subscription.retrieve(subscription_id)
return sub.delete()
@handleStripeError
def make_payment(self, customer, amount, token):
charge = self.stripe.Charge.create(