simple-paypal-sdk
Version:
Simple PayPal SDK for Node.js.
22 lines (17 loc) • 506 B
TypeScript
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>
}