mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-25 19:54:43 +01:00
15 lines
470 B
TypeScript
15 lines
470 B
TypeScript
|
import apiClient from './api-client';
|
||
|
import { AxiosResponse } from 'axios';
|
||
|
import { CartItems, PaymentConfirmation } from '../models/payment';
|
||
|
|
||
|
export default class PaymentAPI {
|
||
|
static async confirm (stp_payment_method_id: string, cart_items: CartItems): Promise<PaymentConfirmation> {
|
||
|
const res: AxiosResponse = await apiClient.post(`/api/payment/confirm`, {
|
||
|
payment_method_id: stp_payment_method_id,
|
||
|
cart_items
|
||
|
});
|
||
|
return res?.data;
|
||
|
}
|
||
|
}
|
||
|
|