UNPKG

@nkhind/vivawallet-sdk

Version:
14 lines (13 loc) 807 B
import { MethodReturn } from '../types/Methods.types'; import { VivaPaymentOrderOptions, VivaPaymentOrderReturn } from '../types/VivaOrder.types'; import { VivawalletAPIInit } from '../types/Vivawallet.types'; import { VivaAuth } from '../vivabases/VivaAuth.class'; declare class VivaPayments extends VivaAuth { constructor(datas: VivawalletAPIInit); /** -------------------- PAYMENT -------------------- */ /** Make new VivaWallet order, return `orderCode` */ createOrder(orderData: VivaPaymentOrderOptions): MethodReturn<VivaPaymentOrderReturn | null, 'nodatas'>; /** Allow cancel operation on non-validate orders, return `true` if the order canceled successfully */ cancelOrder(orderCode: string): MethodReturn<void, 'alreadycanceled' | 'nodatas'>; } export default VivaPayments;