Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WL-app control the exhibition of physical payments

...

On Delivery time, the WL-App get the information about the restaurant, and in this data there are the values about cash limitation:

Zenuml sequence macro lite
uuid0e8d3881-8dc7-4d3e-b5a1-43d28be0d674
customContentId4902126077
updatedAt2024-07-25T17:43:31Z

...

  • With cash limitation data, the WL-App can validate if some rule is active and if need to hide physical payments;

  • This control is by each user;

    • In At the moment of payment, the WL-app can get the retrieves information of the last delivery order of user (getUserOrders), and there are the restaurant information with the limitation rules, so we need to create a logic with this information and in case some limitation is true the physical payment is hiddenabout the user's most recent delivery order using the getUserOrders function. This includes restaurant details and any applicable limitation rules. Based on this information, we need to implement logic that hides the physical payment option if any limitation is met.

      For example, if it is the first purchase of user of user's first home delivery typepurchase, we know this because which we can determine if the getUserOrders query return 0 order returns zero orders of this type, and the selected restaurant selected has a limitation rule that the first purchase need have a limit of must not exceed $30.00 , we know this because (as specified by the restaurant return this 's information of from Sanity, and we have the order value in this screen because there are the order with the total value at this moment. So with all this information), then the WL-app can check the current order value on this screen. If the order total exceeds the limit, the WL-app will hide the physical payment option.

      With all these details, the WL-app is able to hide or not the physical paymentscan effectively decide whether to display or hide the physical payment option.

image-20240529-170137.png

Consequences

  • Create a new field in Restaurant Document on Sanity to receive this information;

  • Create a new screen on DOP (FZ-Portal) to user can manipulate this information and to send to Sanity;

    • Use the Sanity Client Lib to get and save information on Sanity, this lib already available on DOP.

  • Create a new logic on WL-App in payment page to control the exhibition of according the information and limitation that get of Restaurant;

...