adding some tests on payments, not passing yet
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user