feat: 延期微信支付在微信内直接拉起
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 19m17s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 19m17s
- 微信支付下单带 app_type;拿到 pay_config 后与套餐购买一样拉起微信支付,继续支付同样处理 - 微信内打开时支付方式默认微信;取消支付保留同一请求号,再次确认不重复建单
This commit is contained in:
@@ -67,10 +67,11 @@ export const getSilenceErrorMessage = (error, fallback = '操作失败,请稍
|
||||
|
||||
export const isSilenceFeatureDisabled = (error) => Number(error?.code) === 1274;
|
||||
|
||||
/** 延期可用支付方式:资产允许的支付方式与 wechat、alipay 取交集,支付宝优先 */
|
||||
export const getSilencePaymentOptions = (allowedMethods) => {
|
||||
/** 延期可用支付方式:资产允许的支付方式与 wechat、alipay 取交集;微信内打开时微信优先,否则支付宝优先 */
|
||||
export const getSilencePaymentOptions = (allowedMethods, preferWechat = false) => {
|
||||
const allowed = Array.isArray(allowedMethods) ? allowedMethods : [];
|
||||
return SILENCE_PAYMENT_METHODS
|
||||
const order = preferWechat ? ['wechat', 'alipay'] : SILENCE_PAYMENT_METHODS;
|
||||
return order
|
||||
.filter((method) => allowed.includes(method))
|
||||
.map((value) => ({ value, label: SILENCE_PAYMENT_LABELS[value] }));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user