@unchainedshop/plugins
Version:
Official plugin collection for the Unchained Engine with payment, delivery, and pricing adapters
35 lines (34 loc) • 1.18 kB
TypeScript
export declare const GatewayObjectStatus: {
readonly waiting: "waiting";
readonly confirmed: "confirmed";
readonly cancelled: "cancelled";
readonly declined: "declined";
readonly authorized: "authorized";
readonly reserved: "reserved";
readonly refunded: "refunded";
readonly refundpending: "refundpending";
readonly 'partially-refunded': "partially-refunded";
readonly chargeback: "chargeback";
readonly error: "error";
readonly uncaptured: "_";
};
export type GatewayObjectStatus = (typeof GatewayObjectStatus)[keyof typeof GatewayObjectStatus];
export interface GatewayObject {
status: GatewayObjectStatus;
currency: string;
amount: number;
referenceId: string;
invoices: {
transactions: {
id: string;
}[];
}[];
}
export type TransactionObject = any;
declare const createPayrexxAPI: (instance: string, secret: string) => {
chargePreAuthorized(id: any, params: any): Promise<any>;
deleteReservation(id: any): Promise<any>;
getGateway(id: any): Promise<GatewayObject | null>;
createGateway(params: any): Promise<GatewayObject>;
};
export default createPayrexxAPI;