小程序
小游戏
企业微信
微信支付
扫描小程序码分享
昨天开通了虚拟支付,今天调用报错 requestVirtualPayment OFFER_NOT_INIT
errCode: -15008 errMsg: "requestVirtualPayment:fail OFFER_NOT_INIT" errno: -15008
在小程序后台也没看到哪里需要再审核或者提交资料的地方了啊?
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
支付参数
{"mode":"short_series_goods","signData":"{\"offerId\":\"1450513993\",\"outTradeNo\":\"202604180953592020\",\"productId\":\"854435933618\",\"goodsPrice\":5,\"activitySellingPrice\":5,\"buyQuantity\":1,\"currencyType\":\"CNY\",\"env\":1}","paySig":"6ab739cf9f4ba1da14968ffba400ba71ce75ce9cc8087be1731b0f347f3102bf","signature":"47a4d6c00a3ff96585b5bce81e29b0568c3903ebde18388384425945608d41c1","showToast":false}
请求时间 2026-04-18 09:54:02
小程序APPID wxa8135bfc3d5f797b
商户号 1450513993
服务端调用凭证的获取方式
async accessToken() { const { AppID, AppSecret } = await this.getApplet(); const memkey = `wxsp_at_` + AppID; let accessToken = await this.ctx.service.memcache.get(memkey); if (typeof accessToken === 'undefined') { const APP_URL = 'https://api.weixin.qq.com/cgi-bin/stable_token'; const res = await this.ctx.curl(APP_URL, { method: 'post', dataType: 'json', contentType: 'json', data: { grant_type: 'client_credential', appid: AppID, secret: AppSecret, }, }); const data = res.data; if (this.ctx.helper.isEmpty(data) || this.ctx.helper.isEmpty(data.access_token)) { await this.ctx.service.log.insert({ user_id: 0, item_type: 'getAccessToken', action: 'POST', remarks: JSON.stringify(res.data), more_details: '{}', item_id: 0, success: 400, }); this.ctx.returnError('获取 access_token 失败'); } accessToken = data.access_token; await this.ctx.service.memcache.set(memkey, accessToken, 60 * 10); } return accessToken; }
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
本回答由AI生成,可能已过期、失效或不适用于当前情形,请谨慎参考
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
支付参数
{"mode":"short_series_goods","signData":"{\"offerId\":\"1450513993\",\"outTradeNo\":\"202604180953592020\",\"productId\":\"854435933618\",\"goodsPrice\":5,\"activitySellingPrice\":5,\"buyQuantity\":1,\"currencyType\":\"CNY\",\"env\":1}","paySig":"6ab739cf9f4ba1da14968ffba400ba71ce75ce9cc8087be1731b0f347f3102bf","signature":"47a4d6c00a3ff96585b5bce81e29b0568c3903ebde18388384425945608d41c1","showToast":false}请求时间 2026-04-18 09:54:02
小程序APPID wxa8135bfc3d5f797b
商户号 1450513993
服务端调用凭证的获取方式
async accessToken() { const { AppID, AppSecret } = await this.getApplet(); const memkey = `wxsp_at_` + AppID; let accessToken = await this.ctx.service.memcache.get(memkey); if (typeof accessToken === 'undefined') { const APP_URL = 'https://api.weixin.qq.com/cgi-bin/stable_token'; const res = await this.ctx.curl(APP_URL, { method: 'post', dataType: 'json', contentType: 'json', data: { grant_type: 'client_credential', appid: AppID, secret: AppSecret, }, }); const data = res.data; if (this.ctx.helper.isEmpty(data) || this.ctx.helper.isEmpty(data.access_token)) { await this.ctx.service.log.insert({ user_id: 0, item_type: 'getAccessToken', action: 'POST', remarks: JSON.stringify(res.data), more_details: '{}', item_id: 0, success: 400, }); this.ctx.returnError('获取 access_token 失败'); } accessToken = data.access_token; await this.ctx.service.memcache.set(memkey, accessToken, 60 * 10); } return accessToken; }