#1194 detect order rejection

This commit is contained in:
rootzoll 2020-07-15 14:36:56 +02:00
parent 61a752f2ec
commit a96e8f82cf

View file

@ -345,13 +345,13 @@ def shopOrder(shopUrl, hostid, servicename, torTarget, duration, msatsFirst, msa
loopCount+=1
print("# Loop {0}".format(loopCount))
order = apiGetOrder(session, shopUrl, orderid)
if order['status'] == "R":
raise BlitzError("Subscription Rejected",order)
if len(order['ln_invoices']) > 0 and order['ln_invoices'][0]['payment_request'] is not None:
break
if loopCount > 30:
raise BlitzError("timeout on getting invoice", order)
raise BlitzError("test error",order)
# get data from now complete order
paymentRequestStr = order['ln_invoices'][0]['payment_request']
bridge_id = order['item_details'][0]['product']['id']