@hyperse/paypal-node-sdk
Version:
NodeJS SDK for PayPal Checkout APIs
37 lines (36 loc) • 1.2 kB
TypeScript
import paypalhttp from '@paypal/paypalhttp';
/**
* Base class for PayPal Environments
* Documentation
*
* @see {@link https://github.com/hyperse-io/paypal-node-sdk/tree/main/src/core/PayPalEnvironment.ts}
*/
export declare class PayPalEnvironment extends paypalhttp.Environment {
clientId: string;
clientSecret: string;
webUrl: string;
/**
* @param clientId - The client id for this environment
* @param clientSecret - The client secret
* @param baseUrl - The base url to execute requests
* @param webUrl -The web url to authorize user's consent
*/
constructor(clientId: string, clientSecret: string, baseUrl: string, webUrl: string);
/**
* Authorization header string for basic authentication with the current client id and secret
* @return - The authorization header value
*/
authorizationString(): string;
}
/**
* Sandbox Environment
*/
export declare class SandboxEnvironment extends PayPalEnvironment {
constructor(clientId: string, clientSecret: string);
}
/**
* Live Environment
*/
export declare class LiveEnvironment extends PayPalEnvironment {
constructor(clientId: string, clientSecret: string);
}