diff --git a/hc/payments/views.py b/hc/payments/views.py index 84909472..69bfebbf 100644 --- a/hc/payments/views.py +++ b/hc/payments/views.py @@ -97,7 +97,8 @@ def create_plan(request): if "payment_method_nonce" in request.POST: result = braintree.PaymentMethod.create({ "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: @@ -153,7 +154,8 @@ def update_payment_method(request): result = braintree.PaymentMethod.create({ "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: