@bitcoin-suisse/pay
Version:
Bitcoin Suisse Pay plugin for crypto payments
61 lines (60 loc) • 1.47 kB
TypeScript
interface CryptoPaymentsConfig {
/**
* ID of the terminal
*/
terminalId: string;
/**
* Auth-key
*/
auth: string;
/**
* Adding this instead of amount and fromCurrency directs to specific payments request
*/
paymentId?: string;
/**
* Payment amount (not valid if paymentId is added)
*/
amount?: number;
/**
* Currency (abbriviation e.g. EUR, USD, CHF) (not valid if paymentId is added)
*/
fromCurrency?: string;
/**
* Platform specific callback (avoid querstrings in URL)
*/
paymentCallbackUrl?: string;
/**
* 'en' (default), 'de', 'fr', 'it'
*/
language?: 'en' | 'de' | 'fr' | 'it';
/**
* Append target HTMLElement
*/
target?: HTMLElement | null;
/**
* Adds a reference note to the payment request
*/
referenceId?: string;
}
export declare class CryptoPayments {
private frame;
private config;
private data;
private promise;
private resolver;
private rejecter;
private endpointUrl;
constructor(config: CryptoPaymentsConfig);
private validateConfig;
private createIframe;
private createUrl;
create(): Promise<any>;
private resolve;
private reject;
onMessageFromSandbox(event: {
data: string;
}): void;
static style: string;
static styleDisabled: string;
}
export {};