fix(payment): show selector only for Philippines

This commit is contained in:
2026-07-20 16:23:18 +08:00
parent 9920f97029
commit f44db8d8b2
5 changed files with 54 additions and 7 deletions
@@ -27,7 +27,11 @@ describe("usePaymentMethodSelection", () => {
it("forces Stripe when payment method selection is unavailable", () => {
const onChange = vi.fn();
renderHarness(root, {
config: { canChoosePaymentMethod: false, initialPayChannel: "stripe" },
config: {
canChoosePaymentMethod: false,
initialPayChannel: "stripe",
showPaymentMethodSelector: false,
},
currentPayChannel: "ezpay",
onChange,
});
@@ -40,6 +44,7 @@ describe("usePaymentMethodSelection", () => {
const config = {
canChoosePaymentMethod: true,
initialPayChannel: "ezpay",
showPaymentMethodSelector: true,
} as const;
renderHarness(root, {
config,
@@ -59,13 +64,21 @@ describe("usePaymentMethodSelection", () => {
it("preserves an explicit return channel and pauses while payment is busy", () => {
const onChange = vi.fn();
renderHarness(root, {
config: { canChoosePaymentMethod: true, initialPayChannel: "ezpay" },
config: {
canChoosePaymentMethod: true,
initialPayChannel: "ezpay",
showPaymentMethodSelector: true,
},
currentPayChannel: "stripe",
requestedPayChannel: "stripe",
onChange,
});
renderHarness(root, {
config: { canChoosePaymentMethod: false, initialPayChannel: "stripe" },
config: {
canChoosePaymentMethod: false,
initialPayChannel: "stripe",
showPaymentMethodSelector: false,
},
currentPayChannel: "ezpay",
isPaymentBusy: true,
onChange,