UNPKG

simple-paypal-sdk

Version:
22 lines (17 loc) 506 B
export type Environment = 'sandbox' | 'production' export interface PayPalOptions { clientId: string clientSecret: string environment?: Environment } export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' export interface ExecuteOptions { method?: HttpMethod url: string headers?: Record<string, string | number | boolean> body?: any } export default class PayPal { constructor (options?: PayPalOptions) execute<T = any> (options: ExecuteOptions): Promise<T> }