feat(payment): implement coffee tip plans and update payment flow
This commit is contained in:
@@ -21,15 +21,15 @@ describe("tip coffee configuration", () => {
|
||||
it("provides the configured plan and fallback price for each type", () => {
|
||||
expect(getTipCoffeeOption("small")).toMatchObject({
|
||||
amountCents: 499,
|
||||
planId: "tip_coffee_small",
|
||||
planId: "tip_coffee_usd_4_99",
|
||||
});
|
||||
expect(getTipCoffeeOption("medium")).toMatchObject({
|
||||
amountCents: 999,
|
||||
planId: "tip_coffee_medium",
|
||||
planId: "tip_coffee_usd_9_99",
|
||||
});
|
||||
expect(getTipCoffeeOption("large")).toMatchObject({
|
||||
amountCents: 1999,
|
||||
planId: "tip_coffee_large",
|
||||
planId: "tip_coffee_usd_19_99",
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -17,19 +17,19 @@ const TIP_COFFEE_OPTIONS: Record<TipCoffeeType, TipCoffeeOption> = {
|
||||
type: "small",
|
||||
amountCents: 499,
|
||||
fallbackName: "Small Coffee",
|
||||
planId: "tip_coffee_small",
|
||||
planId: "tip_coffee_usd_4_99",
|
||||
},
|
||||
medium: {
|
||||
type: "medium",
|
||||
amountCents: 999,
|
||||
fallbackName: "Medium Coffee",
|
||||
planId: "tip_coffee_medium",
|
||||
planId: "tip_coffee_usd_9_99",
|
||||
},
|
||||
large: {
|
||||
type: "large",
|
||||
amountCents: 1999,
|
||||
fallbackName: "Large Coffee",
|
||||
planId: "tip_coffee_large",
|
||||
planId: "tip_coffee_usd_19_99",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user