Rule 2 - Physical Payment Amount Limit
For orders subsequent to the first, if the total value equals or exceeds €50, only online payment methods will be allowed. The threshold value of €50 is configurable and can be adjusted as necessary.
Feature toggle and configuration:
Create a new setting in the OpsPortal (DOP) that will allow each restaurant to set the limit.
Identification of Subsequent Orders and Application of Limit:
Trigger the
getUserOrders
when the payment method screen loads.The response includes all past orders of the user and a count of these orders.
Sample response of a user with 2 previous orders:
{ "data": { "userOrders": { "count": 2, "resumeAfter": null, "orders": [ /* ... */ ], "__typename": "OrderListResponse" } }
If the count is greater than or equal to 1, indicating at least one previous order and the order value is greater than €50 then physical payment options should not be displayed.