Versions Compared

Key

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

...

We currently send a single discount to the front end as the delivery discount, and we aim to display the service fee discount separately. Essentially, we want to show the original amount, crossed out, and place the word "free" next to it in a prominent highlight.

Solution

...

Add a new field in LaunchDarkly to store the discount value. For instance, if the 'serviceFee' is 300 cents, there will be a corresponding 'serviceFeeDiscount' field The field will be named serviceFeeDiscount with a value of 300 cents, indicating the intention to deduct the entire amountN cents that will discount the calculated serviceFeeby that amount in cents.

A second new field will be added in LaunchDarkly named serviceFee that if populated will override the calculation previously used the calculate the serviceFee.

Sequence diagram of solution flow

...