feat(payment): support Indonesia QRIS checkout
This commit is contained in:
@@ -44,13 +44,24 @@ export function PaymentMethodSelector({
|
||||
}: PaymentMethodSelectorProps) {
|
||||
if (!config.showPaymentMethodSelector) return null;
|
||||
const isCompact = density === "compact";
|
||||
const ezpayDisplayName = config.ezpayDisplayName ?? "GCash";
|
||||
const configuredPaymentMethods = PAYMENT_METHODS.map((method) =>
|
||||
method.channel === "ezpay"
|
||||
? {
|
||||
...method,
|
||||
title: ezpayDisplayName,
|
||||
logoSrc:
|
||||
ezpayDisplayName === "GCash" ? method.logoSrc : undefined,
|
||||
}
|
||||
: method,
|
||||
);
|
||||
|
||||
const paymentMethods =
|
||||
config.initialPayChannel === "ezpay"
|
||||
? [...PAYMENT_METHODS].sort((a, b) =>
|
||||
? [...configuredPaymentMethods].sort((a, b) =>
|
||||
a.channel === "ezpay" ? -1 : b.channel === "ezpay" ? 1 : 0,
|
||||
)
|
||||
: PAYMENT_METHODS;
|
||||
: configuredPaymentMethods;
|
||||
|
||||
return (
|
||||
<section
|
||||
|
||||
Reference in New Issue
Block a user