Private
Public Access
1
0

adding some tests on payments, not passing yet

This commit is contained in:
Sander Roosendaal
2019-01-15 17:31:46 +01:00
parent 4fb5673749
commit 60c7219134
9 changed files with 406 additions and 2530 deletions

View File

@@ -217,17 +217,22 @@ def create_subscription(rower,data):
"payment_method_nonce": nonce_from_the_client
})
print 'aap'
if result.is_success:
payment_method_token = result.payment_method.token
else:
return False,0
print 'noot'
result = gateway.subscription.create({
"payment_method_token": payment_method_token,
"plan_id": plan.external_id
})
if result.is_success:
print 'mies'
rower.paidplan = plan
rower.planexpires = result.subscription.billing_period_end_date
rower.teamplanexpires = result.subscription.billing_period_end_date