I can create a checkout item and get a status but how do I simulate tapping the card on the termainl to move my payment from PENDING to PAID?
def create_checkout(self, amount):
checkout = {
"checkout": {
"amount_money": {
"amount": amount,
"currency": "GBP"
},
"device_options": {
"device_id": self._config["device_id"],
},
},
"idempotency_key": str(uuid4()),
}
data = json.dumps(checkout)
j = req(f"{API_URL}/v2/terminals/checkouts",
data=data,
headers=self.HEADERS,
method="post")
id = j["checkout"]["id"]
return id
def get_checkout(self, checkout_id):
j = req(f"{API_URL}/v2/terminals/checkouts/{checkout_id}", headers=self.HEADERS)
status = j["checkout"]["status"]
return status