add qr_code print
This commit is contained in:
parent
a100af05de
commit
7c2a8eaa25
3 changed files with 159 additions and 2 deletions
|
|
@ -86,6 +86,10 @@ class BookingClient:
|
|||
|
||||
try:
|
||||
data = booking.json().get("data", {})
|
||||
# here
|
||||
order_list_with_qr = booking.json().get("included", [])
|
||||
qr_code=order_list_with_qr[0]["attributes"]["code"]
|
||||
print(qr_code)
|
||||
print(booking.text)
|
||||
except (ValueError, JSONDecodeError):
|
||||
if "Bad Request" in booking.text and "400" in booking.text:
|
||||
|
|
@ -110,7 +114,6 @@ class BookingClient:
|
|||
|
||||
try:
|
||||
customer = checkout.json().get("default", {}).get("customer", {})
|
||||
print(checkout.text)
|
||||
except (ValueError, JSONDecodeError):
|
||||
print(f"❌ Invalid JSON response from checkout form: {checkout.text}")
|
||||
# print(f"❌ Invalid JSON response from checkout form: {checkout.text[:200]}")
|
||||
|
|
@ -133,7 +136,6 @@ class BookingClient:
|
|||
)
|
||||
|
||||
if final.ok:
|
||||
print(final.text)
|
||||
print("✅ Reservation successful!")
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue