Versions Compared

Key

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

...

Paycomet

Key

Description

Modal Title

Modal Message

Modal CTA

Screen

102

error.PAYMENT.2.001

Operation not allowed for the credit card type

Payment Declined

Your card does not support this payment type at the moment. Please, contact your bank or try another payment method.

"Change Payment Method”

image-20241001-045844.png

130

error.PAYMENT.2.100

Represents an error related to credit/debit card transactions.

Payment Declined"

Your card does not support this payment type at the moment. Please, contact your bank or try another payment method."

"Change Payment Method”

image-20241001-050256.png

111

error.PAYMENT.2.100.001

The payment transaction was rejected because the user informed an invalid card CVV.

Payment Declined"

The payment transaction was declined. Please check the card name, card number, CVV, expire date and try again.

"Review Card Details”

Screenshot 2024-10-02 at 08.26.26.png

115

error.PAYMENT.2.101.001

The payment transaction was rejected because card issuer could not validate card owner's identity.

Payment Declined"

“Sorry, we were unable to “The transaction was rejected because the card issuer could not verify the cardholder's identity. Please authorize payment and try again.”Try again and authorize the transaction with the card issuer in order to proceed”

"Go Back”Back and Try Again”

Screenshot 2024-10-02 at 09.56.53.png

1367

error.PAYMENT.2.101.002

Represents an error when In-Flight offline payments are rejected.

An example of occurrence is when the same card has several payments in "flight" at the time and one is finalized, the rest might be denied.

Payment Failed

Sorry, we are unable to process this payment. Please verify the payment in your bank platform or use another payment method.

"Go Back And and Try Again”

image-20241001-050417.pngImage RemovedScreenshot 2024-10-09 at 01.02.59.pngImage Added

1192

error.PAYMENT.2.102.002

Represents an error when the user's IP address is not from an allowed country.

Ex.: Iberia payments only allowed from Spain and Portugal.

Payment Declined"

“It seems you are ordering 're connecting from a different location than our restaurants. Please, update your delivery address or choose the nearest restaurant and try againcountry, and we're unable to process your order. ”

"Change Your Location or Restaurant”image-20241001-050459.pngImage RemovedGo Back”

Screenshot 2024-10-15 at 10.22.01.pngImage Added

1202

error.PAYMENT.2.102.003

Represents an error when the number of failed attempts from the same user has been exceeded.

Order Attempts Exceeded"

“You have exceeded the number of attempts to place an order. Please try again laterin X minutes.”

(30min for Paycomet)

"Go Back and Try Again Later”

Screenshot 2024-10-02 at 08.29.26.pngImage RemovedScreenshot 2024-10-15 at 10.22.40.pngImage Added

1196?

PAYMENT.2.102.005

Authorization from different country than card issuer, not allowed

“Payment Declined”

“Your payment was declined because it was attempted from a country not allowed by your card issuer“Unfortunately, payments from different country than card issuer are not allowed on this platform. Please use a different card issued in the same country or contact your bank for helpchange your payment method.”

“Change Payment Method”

Screenshot 2024-10-02 at 10.19.24.pngImage RemovedScreenshot 2024-10-09 at 01.07.27.pngImage Added

Old Methods

Until that migration starts, we will deprecate the methods mapErrorsWithCodes and parseGraphQLErrorCodes to prevent the creation of new error flows using the "old" approach, encouraging the adoption of the new model.

...

Expand
titleErrorDialogComponent details
Code Block
const ErrorDialogComponent: UseErrorDialogHook<P>[0] = useCallback(
    ({
      buttonLabel = formatMessage({ id: 'okay' }),
      heading = formatMessage({ id: 'somethingWrong' }),
      image,
      ...rest
    }) => {
      ...
      const pendingRbiError = delve(pendingData as T, 'error', null);

      ...

      const modalAppearanceEvent = isRBIError(pendingRbiError)
        ? undefined
        : modalAppearanceEventMessageOverride.current || modalAppearanceEventMessage;

      const errorEventMessage = isRBIError(pendingRbiError)
        ? undefined
        : errorEventMessageOverride.current;

      return (
        <Dialog
          heading={title || heading}
          body={dialogBody}
          image={image}
          onDismiss={dismissDialog}
          actions={actions}
          modalAppearanceEventMessage={modalAppearanceEvent}
          errorEventMessage={errorEventMessage}
          aria-label="error"
          {...rest}
        />
      );
    },
    ...
  );

How to use the new error

...

modal?

After all these changes, when it’s needed to use the new error modelmodal:

import the useErrorModal:

...