strapi-plugin-masterclass
Version:
48 lines (47 loc) • 1.25 kB
TypeScript
import type { Core } from '@strapi/strapi';
declare const paypalService: ({ strapi }: {
strapi: Core.Strapi;
}) => {
paypal_client_id: string;
paypal_client_secret: string;
brand_name: string;
return_url: string;
cancel_url: string;
production_mode: boolean;
isValidConfig(): boolean;
getPaypalAuth(): Promise<{
username: string;
password: string;
}>;
createCheckoutSession(params: any): Promise<{
error: boolean;
status: string;
msg: string;
data?: undefined;
checkout_session?: undefined;
total?: undefined;
} | {
data: any;
checkout_session: any;
total: number;
error?: undefined;
status?: undefined;
msg?: undefined;
}>;
getPaymentStatus(checkout_session: any): Promise<{
error: boolean;
status: string;
msg: string;
orderCaptured?: undefined;
} | {
orderCaptured: boolean;
error?: undefined;
status?: undefined;
msg?: undefined;
}>;
};
export default paypalService;
export type PaypalService = {
createCheckoutSession: (params: any) => Promise<any>;
getPaymentStatus: (params: any) => Promise<any>;
};