UNPKG

node-ecpay-aio

Version:

A production-ready ECPay AIO SDK for Node.js with TypeScript support.

36 lines (35 loc) 1.39 kB
import { InvoiceParams } from '../types'; export declare function generateCheckMacValue(params: any, hashKey: string, hashIV: string): string; export declare function generateRedirectPostForm(endpoint: string, params: object): string; export declare function getEncodedInvoice(invoice?: InvoiceParams): InvoiceParams | undefined; export declare function getCurrentUnixTimestampOffset(seconds?: number): number; export declare function postRequest<T>(config: { apiUrl: string; params: {}; responseEncoding?: 'utf8' | 'Big5'; }): Promise<T>; export declare function placeOrderRequest(config: { aioBaseUrl: string; apiUrl: string; params: {}; }): Promise<string>; export declare function getQueryStringFromParams(data: {}, sort?: boolean): string; export declare function fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T; }; export declare function parseIntegerFileds(input: any, fields: string[]): any; export declare function getCurrentTaipeiTimeString(config?: { timestamp?: number; format?: 'Datetime' | 'Date' | 'Serial'; }): string; export declare function isValidReceivedCheckMacValue(data: { CheckMacValue: string; }, hashKey: string, hashIV: string): boolean; export interface TimeDetail { year: string; month: string; day: string; hour: string; minute: string; second: string; }