Get stripe invoice obj correctly
This commit is contained in:
parent
d8482c52f9
commit
9d21181073
1 changed files with 3 additions and 2 deletions
|
@ -1693,9 +1693,10 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
inv_url = None
|
||||
if hosting_order.subscription_id:
|
||||
stripe_obj = stripe.Invoice.list(
|
||||
subscription=hosting_order.subscription_id
|
||||
subscription=hosting_order.subscription_id,
|
||||
count=0
|
||||
)
|
||||
inv_url = stripe_obj[0].data.hosted_invoice_url
|
||||
inv_url = stripe_obj.data[0].hosted_invoice_url
|
||||
elif hosting_order.stripe_charge_id:
|
||||
stripe_obj = stripe.Charge.retrieve(
|
||||
hosting_order.stripe_charge_id
|
||||
|
|
Loading…
Reference in a new issue