diff --git a/app/frontend/src/javascript/api/stripe.ts b/app/frontend/src/javascript/api/stripe.ts index 9a0fbcd41..ffca1f3af 100644 --- a/app/frontend/src/javascript/api/stripe.ts +++ b/app/frontend/src/javascript/api/stripe.ts @@ -4,7 +4,7 @@ import { CartItems, IntentConfirmation, PaymentConfirmation, UpdateCardResponse export default class StripeAPI { static async confirm (stp_payment_method_id: string, cart_items: CartItems): Promise { - const res: AxiosResponse = await apiClient.post(`/api/payments/confirm_payment`, { + const res: AxiosResponse = await apiClient.post(`/api/stripe/confirm_payment`, { payment_method_id: stp_payment_method_id, cart_items }); @@ -12,13 +12,13 @@ export default class StripeAPI { } static async setupIntent (user_id: number): Promise { - const res: AxiosResponse = await apiClient.get(`/api/payments/setup_intent/${user_id}`); + const res: AxiosResponse = await apiClient.get(`/api/stripe/setup_intent/${user_id}`); return res?.data; } // TODO, type the response static async confirmPaymentSchedule (setup_intent_id: string, cart_items: CartItems): Promise { - const res: AxiosResponse = await apiClient.post(`/api/payments/confirm_payment_schedule`, { + const res: AxiosResponse = await apiClient.post(`/api/stripe/confirm_payment_schedule`, { setup_intent_id, cart_items }); @@ -26,7 +26,7 @@ export default class StripeAPI { } static async updateCard (user_id: number, stp_payment_method_id: string): Promise { - const res: AxiosResponse = await apiClient.post(`/api/payments/update_card`, { + const res: AxiosResponse = await apiClient.post(`/api/stripe/update_card`, { user_id, payment_method_id: stp_payment_method_id, });