We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ad8339 commit 675ed45Copy full SHA for 675ed45
fundraising/views.py
@@ -156,7 +156,9 @@ def manage_donations(request, hero):
156
def update_card(request):
157
donation = get_object_or_404(Donation, id=request.POST["donation_id"])
158
try:
159
- customer = stripe.Customer.retrieve(donation.stripe_customer_id)
+ customer = stripe.Customer.retrieve(
160
+ donation.stripe_customer_id, expand=["subscriptions"]
161
+ )
162
subscription = customer.subscriptions.retrieve(donation.stripe_subscription_id)
163
subscription.source = request.POST["stripe_token"]
164
subscription.save()
0 commit comments