使用的是uniapp官网的示例,急急急 大神们看到请帮我解惑
var orderInfo = {
"clientId": "", //客户端id
"orderId": "", //订单id
"userAction": "continue", // paynow/continue
"currency":"USD", // 币种
"environment":"sandbox", //运行环境 sandbox/live
};
uni.getProvider({
service: 'payment',
success: function (res) {
console.log(res.provider)
if (~res.provider.indexOf('paypal')) {
uni.requestPayment({
"provider": "paypal",
"orderInfo": orderInfo,
success: function (res) {
var rawdata = JSON.parse(res.rawdata);
console.log("orderId:" + rawdata.orderId);
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
});
}
}
});
小小昭
- 发布:2023-07-17 16:46
- 更新:2023-07-17 16:46
- 阅读:178
0 个回复