Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加微信基础接口wx.requestCommonPayment(Object object) #16605

Open
sgssxf opened this issue Sep 27, 2024 · 3 comments
Open

添加微信基础接口wx.requestCommonPayment(Object object) #16605

sgssxf opened this issue Sep 27, 2024 · 3 comments
Labels
A-typings Area - TypeScript Typings 相关 T-weapp Target - 编译到微信小程序

Comments

@sgssxf
Copy link

sgssxf commented Sep 27, 2024

这个特性解决了什么问题?

发起通用支付,支持 B2b 支付类型

这个 API 长什么样?

Taro.requestCommonPayment(Object object)

@hanjin001
Copy link

支持微信(或其他)小程序的所有新 API 的,源码是通过 Object.keys(global) 赋值到 Taro 对象上的globalwxmy 这些。只是requestCommonPayment 暂时缺失 TS 类型而已(欢迎提PR),可以使用。可以用 // @ts-ignore 暂时忽略 TS 报错即可。

和这个 issue 类似 添加requestVirtualPayment ,属于同一类问题。

@sgssxf
Copy link
Author

sgssxf commented Sep 30, 2024

wx.requestCommonPayment在调用的时候组件名称参与签名运算,测试了用Taro.requestCommonPayment去调用,始终提示requestCommonPayment:fail webapi_wxa_createmidasorder:fail invalid pay signature,签名不正确

@hanjin001
Copy link

那用 wx.requestCommonPayment 调用呢?我感觉应该是调用参数不合符合要求的原因。
wx.requestCommonPaymentTaro.requestCommonPayment 应该表现一致。
因为源码中并没有对其做太多处理。
直接写 wx.requestCommonPayment 如果报 ts 错。可以用 // @ts-ignore 忽略

@TheKonka TheKonka added A-typings Area - TypeScript Typings 相关 T-weapp Target - 编译到微信小程序 labels Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typings Area - TypeScript Typings 相关 T-weapp Target - 编译到微信小程序
Projects
Status: Todo
Development

No branches or pull requests

3 participants