...
...
Repos that we’ll change:
Whitelabel: https://github.com/rbilabs/intl-whitelabel-app
...
Expand |
---|
title | frontend/src/pages/cart/payment/order-payment/paycomet-hosted-page-payment/paycomet-hosted-page-payment.tsx |
---|
|
Return the new values from the useOrderPayment hook Code Block |
---|
| const {
// ... rest of code
setIsPaycometNewMethodSelected,
isPaycometNewMethodSelected,
} = useOrderPayment({
enableOrderTimedFire,
onPriceOrder,
serverOrder,
}); |
Add a new condition for the paycomet form: I NEED TO VALIDATE THIS = WIP Code Block |
---|
| // Add a new condition here
{showAddPaymentMethod && showPaymentSodexo && showPaymentChequeGourmet && (
<ConditionalWrapper
condition={!paymentMethods.length}
wrapper={children => <AddNewCreditCardWrapper>{children}</AddNewCreditCardWrapper>}
>
<PaycometCreditCardHostedPaymentForm
rbiOrder={serverOrder}
onResult={onPaymentOutcome}
onChange={onChange}
paymentValues={paymentValues}
errors={errors}
isCheckoutErrorsModalOpenPaycomet={isCheckoutErrorsModalOpenPaycomet}
tpvToken={tpvToken}
onError={(errorMessageId: TLocalizationKey) => {
setShowAddPaymentMethod(false);
setIsPaymentError(false);
setIsCheckoutErrorsModalOpenPaycomet(true);
setErrorOnPreAuth({ messageId: errorMessageId, hasError: true });
}}
preAuthCallback={() => {
setIsPreauthLoading(true);
}}
/>
</ConditionalWrapper>
)} |
|
...