forked from GithubBackups/healthchecks
Most recent payment method is the default payment method.
This commit is contained in:
parent
e80b30c3fc
commit
dbaae9c2b7
@ -97,7 +97,8 @@ def create_plan(request):
|
|||||||
if "payment_method_nonce" in request.POST:
|
if "payment_method_nonce" in request.POST:
|
||||||
result = braintree.PaymentMethod.create({
|
result = braintree.PaymentMethod.create({
|
||||||
"customer_id": sub.customer_id,
|
"customer_id": sub.customer_id,
|
||||||
"payment_method_nonce": request.POST["payment_method_nonce"]
|
"payment_method_nonce": request.POST["payment_method_nonce"],
|
||||||
|
"options": {"make_default": True}
|
||||||
})
|
})
|
||||||
|
|
||||||
if not result.is_success:
|
if not result.is_success:
|
||||||
@ -153,7 +154,8 @@ def update_payment_method(request):
|
|||||||
|
|
||||||
result = braintree.PaymentMethod.create({
|
result = braintree.PaymentMethod.create({
|
||||||
"customer_id": sub.customer_id,
|
"customer_id": sub.customer_id,
|
||||||
"payment_method_nonce": request.POST["payment_method_nonce"]
|
"payment_method_nonce": request.POST["payment_method_nonce"],
|
||||||
|
"options": {"make_default": True}
|
||||||
})
|
})
|
||||||
|
|
||||||
if not result.is_success:
|
if not result.is_success:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user