提交 a2e37c27 作者: 王进

3.0.1

修复米大师支付扣费失败bug
上级 00dda62b
...@@ -132,8 +132,8 @@ class WechatSDK { ...@@ -132,8 +132,8 @@ class WechatSDK {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
(wx as any).requestMidasPayment({ (wx as any).requestMidasPayment({
...this.MidasPaymentParams, ...this.MidasPaymentParams,
success: async (data) => { success: async (response) => {
console.log("--SDK -> 支付成功:", data); console.log("--SDK -> 支付成功:", response);
let coinsResult = await this.getCoins({ ...this.SDKCOMMDATA, token: this.LoginData['token'], order_num: data.order_num }); let coinsResult = await this.getCoins({ ...this.SDKCOMMDATA, token: this.LoginData['token'], order_num: data.order_num });
if (coinsResult.code == 0 || coinsResult.code == 3012) { if (coinsResult.code == 0 || coinsResult.code == 3012) {
resolve({ order_code: 200, msg: '' }); resolve({ order_code: 200, msg: '' });
...@@ -161,6 +161,7 @@ class WechatSDK { ...@@ -161,6 +161,7 @@ class WechatSDK {
} }
} }
private getCoins = async (orderParams) => { // 通知服务端扣费 private getCoins = async (orderParams) => { // 通知服务端扣费
console.log('--通知扣费:', orderParams);
return await this.sdkRequest(Links.pay, orderParams) return await this.sdkRequest(Links.pay, orderParams)
} }
public createActiveShare = async (shareInfo) => { //动态消息 public createActiveShare = async (shareInfo) => { //动态消息
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论