update sheep/platform/pay.js.

Signed-off-by: huppygo <huppygo@qq.com>
This commit is contained in:
huppygo
2025-02-11 16:00:36 +00:00
committed by Gitee
parent d91d8eb2db
commit 0c88f6c2af
+7 -5
View File
@@ -228,14 +228,17 @@ export default class SheepPay {
}); });
} }
// 支付宝支付(App TODO 芋艿:待接入【暂时没打包 app,所以没接入,一般人用不到】 // 支付宝支付(App
async alipay() { async alipay() {
let that = this; let that = this;
const { error, data } = await this.prepay(); const { code, data } = await this.prepay('alipay_app');
if (error === 0) { if (code !== 0) {
return;
}
uni.requestPayment({ uni.requestPayment({
provider: 'alipay', provider: 'alipay',
orderInfo: data.pay_data, //支付宝订单数据 orderInfo: data.displayContent, // 直接使用返回的支付参数
success: (res) => { success: (res) => {
that.payResult('success'); that.payResult('success');
}, },
@@ -248,7 +251,6 @@ export default class SheepPay {
}, },
}); });
} }
}
// 微信支付(App) TODO 芋艿:待接入:待接入【暂时没打包 app,所以没接入,一般人用不到】 // 微信支付(App) TODO 芋艿:待接入:待接入【暂时没打包 app,所以没接入,一般人用不到】
async wechatAppPay() { async wechatAppPay() {