1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
react-native-alipay/index.d.ts
2020-07-08 10:21:49 +08:00

64 lines
1.7 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 支付宝端支付
* 支付宝回调结果, 详情见 https://docs.open.alipay.com/204/105301
*/
export interface AliOrderResult {
/**
* 长度64商户网站唯一订单号 70501111111S001111119
*/
out_trade_no: string;
/**
* 长度64该交易在支付宝系统中的交易流水号。最长64位。 2014112400001000340011111118
*/
trade_no: string;
/**
* 长度32支付宝分配给开发者的应用Id。 2014072300007148
*/
app_id: string;
/**
* 长度9 该笔订单的资金总额单位为RMB-Yuan。取值范围为[0.01,100000000.00],精确到小数点后两位。 9.00
*/
total_amount: number;
/**
* 长度16收款支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字 20886894
*/
seller_id: string;
/**
* 长度16处理结果的描述信息来自于code返回结果的描述 success
*/
msg: string;
/**
* 长度16编码格式 utf-8
*/
charset: string;
/**
* 长度32时间 2016-10-11 17:43:36
*/
timestamp: string;
/**
* 长度16结果码 具体见公共错误码
*/
code: string;
}
export const Alipay: {
/**
* @param payInfo 支付详情
* @param result 支付宝回调结果
*/
alipay: (payInfo: string, callback?: (result: AliOrderResult) => void) => void;
/**
* 设置支付宝跳转Scheme仅 iOS
* @param scheme scheme = `ap` + `APPID`
*/
setAlipayScheme: (scheme: string) => void;
/**
* 设置支付宝沙箱环境,仅 Android
* @param isSandBox
*/
setAlipaySandbox: (isSandbox: boolean) => void;
};
export default Alipay;