diff --git a/src/server/api/routers/payment.ts b/src/server/api/routers/payment.ts index 3dcf70d03..3706b5acf 100644 --- a/src/server/api/routers/payment.ts +++ b/src/server/api/routers/payment.ts @@ -41,6 +41,7 @@ export const paymentRouter = createTRPCRouter({ label: z.string().min(2, { message: "Payment label is required", }), + // TODO: Remove this. Currently exists so frontend doesn't break amount: z.string().min(2, { message: "Amount is required", }), @@ -65,8 +66,9 @@ export const paymentRouter = createTRPCRouter({ statementDescriptionIdentifier: input.label, note: `Payment for ${input.label}`, amountMoney: { - currency: input.currency, - amount: BigInt(parseFloat(input.amount) * 100), + // TODO: fix + currency: "AUD", + amount: BigInt(500), }, }) diff --git a/src/server/api/routers/user.ts b/src/server/api/routers/user.ts index 22aa6bef1..2dd677ef9 100644 --- a/src/server/api/routers/user.ts +++ b/src/server/api/routers/user.ts @@ -282,7 +282,7 @@ export const userRouter = createTRPCRouter({ if ( result.payment?.status === "COMPLETED" && result.payment?.referenceId === ctx.user.id && - result.payment.note?.includes("CFC Membership") + result.payment.note === `Payment for CFC Membership ${new Date().getFullYear()}` ) { // only update role if payment successful and user is not already a member if (currentUser.role === null) {