return redirect(new_bill.pay_url)
oplata_check(bill_id=new_bill.bill_id)
def oplata_check(bill_id):
status = p2p.check(bill_id=bill_id).status
while status == "WAITING":
print(status)
if status != "WAITING":
p2p.reject(bill_id=bill_id)
sleep(5)
status = p2p.check(bill_id=bill_id).status