feat(payment): support Indonesia QRIS checkout
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
type PaymentAnalyticsContext,
|
||||
} from "@/lib/analytics";
|
||||
import { getPaymentMethodConfig } from "@/lib/payment/payment_method";
|
||||
import { useHasHydrated } from "@/hooks/use-has-hydrated";
|
||||
import { buildTipGiftPath } from "@/lib/tip/tip_gift";
|
||||
import {
|
||||
useActiveCharacter,
|
||||
@@ -50,11 +51,15 @@ export function TipScreen({
|
||||
const character = useActiveCharacter();
|
||||
const characterRoutes = useActiveCharacterRoutes();
|
||||
const userState = useUserState();
|
||||
const hasHydrated = useHasHydrated();
|
||||
const supportPrompt = useTipSupportPrompt();
|
||||
const paymentMethodConfig = getPaymentMethodConfig({
|
||||
countryCode: userState.currentUser?.countryCode,
|
||||
requestedPayChannel: initialPayChannel,
|
||||
});
|
||||
const renderedPaymentMethodConfig = hasHydrated
|
||||
? paymentMethodConfig
|
||||
: { ...paymentMethodConfig, showPaymentMethodSelector: false };
|
||||
const { payment, paymentDispatch } = usePaymentRouteFlow({
|
||||
catalog: "tip",
|
||||
characterId: character.id,
|
||||
@@ -281,7 +286,7 @@ export function TipScreen({
|
||||
</section>
|
||||
|
||||
<PaymentMethodSelector
|
||||
config={paymentMethodConfig}
|
||||
config={renderedPaymentMethodConfig}
|
||||
value={payment.payChannel}
|
||||
density="compact"
|
||||
disabled={isPaymentBusy}
|
||||
|
||||
Reference in New Issue
Block a user