Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

🛠️ Potential Solutions

...

🧐 Assumptions

  • The assumptions is that we will only add the brands of credit cards in the add new credit card option.

Solution #1 - Map cards accepted in whitelabel-app

The first solution is to add a mapper just to the frontend to obtain the types of cards accepted for payment and directly obtain these values ​​that will be displayed, as there are few changes, changing accepted cards is something that changes very infrequently, we would not have problems with changes in these fields.

Solution #2 - Get accepted cards in the launch-darkly

In this solution we would have the flexibility of a more dynamic change, but we would be linking the feature to the feature flag and adding another flag to the system.

Solution #3 - Get accepted cards in the backend

In this solution we created a more robust solution to store the types of cards accepted and retrieve them. This may involve adding the types of cards accepted to the database.

...

Expand
titlepayment-method/index.tsx
Code Block
const acceptedCardsFeatureFlag = useFlag(
    LaunchDarklyFlag.ACCEPTED_CARDS
);

const creditTypeAccepted = () => {
  const mappedAcceptedCards = acceptedCardsFeatureFlag.map((cardType) => {
    return (
      <Icon .... >
    )
  })
  
  if(sodexo) {
    return <iconSodexo>
  }
  
  if(chequeGourmet){
    return <iconChequeGourmet>
  }
  
  if(ticketRestaurant){
    return <iconTicketRestaurant>
  }
  
  return (
    <>
      <h3>Card Details</h3>
      {mappedAcceptedCards()}
    </>
  );
};

return (
  <>
    <PaymentMethodSelect>
    ...
    </PaymentMethodSelect>
    {isAddCardOpen && creditTypeAccepted()}
  </>
)

...

Info

List here potential challenges that have come across the opportunity definition or from the potential solutions so far.

💰 Cost

Info

Describe any additional cost this solution may imply.

Info

The types of payments for "sodexo, restaurant ticket and cheque gourmet" must be shown only one of them and not the credit cards.

🎛️ Configuration

Feature Flag

accepted-cards-types

...

KPI = (Payment Page + Dropoff) / Payment Page * 100

🧑‍🚒 QA Plan

...

Test Scenario

Result

Screenshots

Show icons for accepted credit card types

  • When selecting the credit card payment method

  • The accepted credit card brands are to be shown

Show icons for accepted credit card types for sodexo

  • When selecting the credit card payment method

  • The sodexo brands are to be shown

Show icons for accepted credit card types for cheque gourmet

  • When selecting the credit card payment method

  • The cheque gourmet brands are to be shown

cheque.png

Show icons for accepted credit card types for ticket restaurant

  • When selecting the credit card payment method

  • The ticket restaurant brands are to be shown

endered.png

⚠️ Call-outs

...