UNPKG

@adriantombu/paybox-system

Version:

A simple implementation of the Paybox System payment solution

25 lines (24 loc) 750 B
import { Document, Params, Request, Result, FormElement } from './types'; export * from './types'; export declare class Paybox implements Document { request: Request; sandbox: boolean; constructor(params: Params); static create(params: Params): Paybox; static getError(code: string): string; static isValid(result: Result, amount: number): boolean; static signatureIsValid(result: Result): boolean; form(): Promise<{ url: string; method: "GET" | "POST" | undefined; form: string; elements: FormElement[]; }>; private archivage; private formatAmount; private setReturnVars; private getTime; private computeHMAC; private getUrl; private getFormElements; }