import { StandardResponse } from '@jolibox/types'; import type { IPlaceOrderJoliCoinParamas, IJoliCoinProductInfo, IJolicoinPaymentContext } from './joli-coin'; import type { IPlaceOrderJoliCoinIAPParamas, IJolicoinPaymentIAPContext } from './jolicoin-iap'; import type { IPlaceOrderResponse } from './type'; type PaymentStatus = 'INIT' | 'PENDING' | 'SUCCESS' | 'FAILED'; import { UserPaymentError, InternalPaymentError } from '@jolibox/common'; type IPlaceOrderParams = IPlaceOrderJoliCoinParamas | IPlaceOrderJoliCoinIAPParamas; type IOrderProductInfo = IJoliCoinProductInfo | IJolicoinPaymentIAPContext; type IOrderPaymentContext = IJolicoinPaymentContext | IJolicoinPaymentIAPContext; declare const createPaymentError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError, createPaymentInternalError: (errMsg: string, errNo: number, extra?: Record) => UserPaymentError | InternalPaymentError; export { createPaymentError, createPaymentInternalError }; export declare abstract class BasePaymentRegister { private _orderId; private _orderStatus; startPayment: (params: T) => Promise>; cancelOrder: (orderId: string) => Promise; protected generateCallbackUrl: () => string; abstract placeOrder(params: T): Promise>>; abstract generatePaymentContext(): IOrderPaymentContext; abstract pay(): Promise>; get orderId(): string | null; get status(): PaymentStatus; }