Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

🛠️ Potential Solutions

🧐 Assumptions

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

  • Do not show sodexo, cheque gourmet and ticket restaurant brands in adding a new credit card option

  • Do not display card components for sodexo, cheque gourmet and ticket restaurant

  • Iframe loading is indifferent to card component details (can be shown before loading the iframe)

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.

✅ Proposed Solution

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

The change needed to add the flags is just a change in the paycomet-credit-card-form.tsx file. To do this, you need to create a component to add the flags and call it after paymentJetId is enabled, as it defines when the form is ready to be displayed to the user.

 src/utils/launchdarkly/flags.ts
/**
 * This flag retrieve all accepted cards types.
 */
 ACCEPTED-CARDS-TYPES = 'accepted-cards-types',
 payment-method/index.tsx
const acceptedCardsFeatureFlag = useFlag(
    LaunchDarklyFlag.ACCEPTED_CARDS
);

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

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

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

To configure the feature flag correctly, it is necessary to enable the feature flag and configure the variations to add the values ​​of the accepted card types. For example:

Variations

["MASTERCARD", "VISA", "AMEX"]

📈 Metrics

Reduce the abandonment rate in the payment process by 11.8%.

KPI = (Paycomet Error 102) / All Payments * 100

Error 102: Operation not permitted for card type.

🧑‍🚒 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

NOT show icons for accepted credit card types for sodexo

  • When selecting the credit card payment method

  • Not show the card details

NOT show icons for accepted credit card types for cheque gourmet

  • When selecting the credit card payment method

  • Not show the card details

NOT show icons for accepted credit card types for ticket restaurant

  • When selecting the credit card payment method

  • Not show the card details

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.