For developers
By Qliro
q1.lock()
to lock the frontend iframe and enable the synchronizing process.PUT /Orders/{id}.
q1.onOrderUpdated(function(order)…))
.q1.unlock()
.1
q1.lock()
Parameter | Type | Description | Mandatory |
callback | function | A function that takes an order (object) argument and calls unlock if the order is updated. | Yes |
1 2 3 4 5 6 7 8
q1.onOrderUpdated(function (order) { // if order reflects the local cart, use q1.unlock() if (order.totalPrice === localCart.totalPrice) { // exampel of how the order can be verified q1.unlock() } // else, don't do anything })
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ "totalPrice": 350, "orderItems": [ { "merchantReference": "RedHat", "pricePerItemIncVat": 100, "quantity": 3 }, { "merchantReference": "BlackHat", "pricePerItemIncVat": 50, "quantity": 1 } ] }
1
q1.unlock()