Versions Compared

Key

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

...

  1. Platform wide change, this should work on every market;

  2. This should affect delivery orders only.

Identify Payment Methods as Online or Physical Payment

We should identify on both Frontend (WhitelabelApp) and in the backend (Payment Service). The main implementation and first barrier should be the frontend (hidding the Physical Payments from the payment methods dropdown). In other hand, the backend should grant that, even somehow the Frontend allow the Physical Payment, it will be blocked.

...

  1. Create a new method to verify if a payment type is online or not. This method should grant that cash will always be considered false regardless the configuration. (as you can see, there’s no configuration for cash in the table above, that represents the state/payment/constats.ts file)

Feature Flag

We should create a new Feature Flag on Launch Darkly with the following definitions:

...

Code Block
{
  "limit_first_order": {
    "active": true,
    "amount": 20,
    "amount_in_cents": 2000
  },
  "limit_total_amount": {
    "active": true,
    "amount": 50,
    "amount_in_cents": 5000
  },
  "limit_last_delivery_failed": {
    "active": false,
    "reasons_to_limit": {
      "customer_absence": true,
      "reason2": false,
      "reason3": true
    }
  }
}

Rule 1 - First Order Physical Payment Limit

For the first order with a value >= X €, only online payment will be allowed, where X is configurable. The initial intention is to set it to 20 €.

...

When this count is 0, we don’t show Physical Payments.

Rule 2 - Physical Payment Amount Limit

For subsequent orders with a value >= X €, only online payment will be allowed, where X is configurable. The initial intention is to set it to 50 euros.

...

  1. Create feature flag for this limit

  2. Evaluate when creating PaymetMethods


Rule 3 - Repeated Delivery Failure
Status
colourRed
titleBlocked

If the last order was paid in Physical Payments and there was a delivery failure (e.g. a joke order), the next order will only allow online payment

...