Merged code from siarheipuhach/dynamicweb

This commit is contained in:
M.Ravi 2017-07-01 15:18:44 +02:00
commit c8cf166571
66 changed files with 372 additions and 419 deletions

View file

@ -137,22 +137,10 @@ class StripeUtils(object):
id=id)
@handleStripeError
def make_payment(self, user, amount, token):
def make_payment(self, customer, amount, token):
charge = self.stripe.Charge.create(
amount=amount, # in cents
currency=self.CURRENCY,
customer=customer
)
return charge
@handleStripeError
def create_plan(self, amount, name, id):
self.stripe.Plan.create(
amount=amount,
interval=self.INTERVAL,
name=name,
currency=self.CURRENCY,
id=id)