25 lines
609 B
TypeScript
25 lines
609 B
TypeScript
import { PaymentMethodsResponse } from '@interfaces';
|
|
import { apiClient } from '@services';
|
|
|
|
export const getAllPaymentMethodsApi = async () => {
|
|
return await apiClient.get<PaymentMethodsResponse>('/payments/options');
|
|
};
|
|
|
|
export interface VerifyPaymentPayload {
|
|
gatewayOrderId: string;
|
|
gatewayPaymentId: string;
|
|
gatewaySignature: string;
|
|
}
|
|
|
|
export interface VerifyPaymentResponse {
|
|
success: boolean;
|
|
message: string;
|
|
}
|
|
|
|
export const verifyPaymentApi = async (payload: VerifyPaymentPayload) => {
|
|
return await apiClient.post<VerifyPaymentResponse>(
|
|
'/payments/process',
|
|
payload,
|
|
);
|
|
};
|