import { PayStatic, PayStaticConfig } from "../base"; export declare class RequestBase { /** * 支付宝分配给开发者的应用ID * example: 2014072300007148 */ app_id: string; /** * 接口名称 * example: alipay.trade.page.pay */ method: string; /** * 仅支持JSON * example: JSON */ format?: string; /** * HTTP/HTTPS开头字符串 * example: https://m.alipay.com/Gk8NF23 */ return_url?: string; /** * 请求使用的编码格式,如utf-8,gbk,gb2312等 * example: utf-8 */ charset: string; /** * 商户生成签名字符串所使用的签名算法类型,目前支持RSA2和RSA,推荐使用RSA2 * example: RSA2 */ sign_type: string; /** * 商户请求参数的签名串,详见签名 * example: 详见示例 */ sign: string; /** * 发送请求的时间,格式"yyyy-MM-dd HH:mm:ss" * example: 2014-07-24 03:07:50 */ timestamp: string; /** * 调用的接口版本,固定为:1.0 * example: 1.0 */ version: string; /** * 支付宝服务器主动通知商户服务器里指定的页面http/https路径。 * example: http://api.test.alipay.net/atinterface/receive_notify.htm */ notify_url?: string; /** * 详见应用授权概述 */ app_auth_token?: string; /** * 请求参数的集合,最大长度不限,除公共参数外所有请求参数都必须放在这个参数中传递,具体参照各产品快速接入文档 */ biz_content: string; } export declare class Request { } export declare class Response { /** * 网关返回码,详见文档 * example: 40004 */ code: string; /** * 网关返回码描述,详见文档 * example: Business Failed */ msg: string; /** * 业务返回码,参见具体的API接口文档 * example: ACQ.TRADE_HAS_SUCCESS */ sub_code?: string; /** * 业务返回码描述,参见具体的API接口文档 * example: 交易已被支付 */ sub_msg?: string; } export declare type NotifyType = { notify_time: string; notify_id: string; notify_type: string; }; export declare const Method: { alipayTradeAdvanceConsult: string; alipayTradeAppPay: string; alipayTradeCancel: string; alipayTradeClose: string; alipayTradeCreate: string; alipayTradeFastpayRefundQuery: string; alipayTradeOrderSettle: string; alipayTradeOrderinfoSync: string; alipayTradePagePay: string; alipayTradePageRefund: string; alipayTradePay: string; alipayTradePrecreate: string; alipayTradeQuery: string; alipayTradeRefund: string; alipayTradeWapPay: string; alipayFundTransToaccountTransfer: string; }; export declare class AliPayBase { app_id: string; sign_type?: string; notify_url: string; rsaPrivatePath: string; rsaPublicPath: string; } export declare class AliPayStatic extends PayStatic { static success: string; static host: string; static sandboxHost: string; static sign_type: string; static config(opt: PayStaticConfig & { sign_type?: string; }): void; static getSignObj(data: any, opt: { app_id: string; rsaPrivate: string; method: string; sign_type?: string; notify_url?: string; return_url?: string; app_auth_token?: string; withHost?: boolean; }): string; static rsaSign(data: Object, privateKey: string, signType?: string): string; static stringify(data: any): { str: string; encodeStr: string; }; static encrypt(str: any, privateKey: any, signType?: string): any; static signVerify(str: any, sign: any, publicKey: any, signType?: string): any; static request(opt: { data: any; pubReq: RequestBase; host?: string; method?: string; notThrowErr?: boolean; resDataKey?: string; originalResult?: boolean; }): Promise; static errorHandler(rs: Response): void; } /** 1、ALIPAY_USERID:支付宝账号对应的支付宝唯一用户号。以2088开头的16位纯数字组成。 2、ALIPAY_LOGONID:支付宝登录号,支持邮箱和手机号格式。 */ export declare const PayeeType: { AlipayUserId: string; AlipayLoginId: string; };