Get invoice correctly

This commit is contained in:
PCoder 2020-02-01 12:20:13 +05:30
parent 918d2b17e1
commit d8482c52f9

View file

@ -1693,7 +1693,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
inv_url = None
if hosting_order.subscription_id:
stripe_obj = stripe.Invoice.list(
hosting_order.subscription_id
subscription=hosting_order.subscription_id
)
inv_url = stripe_obj[0].data.hosted_invoice_url
elif hosting_order.stripe_charge_id: