大额券遇到概率更大,需要多放10多张才能正常发放,这样会占用大量非必要资金
mmpaymkttransfers/send_coupon有库存却遭遇返回“代金券批次可用预算不足?长期使用https://api.mch.weixin.qq.com/mmpaymkttransfers/send_coupon接口进行发放立减金,今年年初左右开始出现这个问题,服务商后台立减金库存还有(有3-5个),但依旧调用返回“代金券批次可用预算不足”,导致无法及时发放。 [图片] 这是刚刚调用遇到的情况,附上日志,一些数据做了修改 [ 2021-07-12T14:50:38+08:00 ] [ log ] 发放卡券请求参数:{"coupon_stock_id":15670666,"openid_count":"1","partner_trade_no":"HoT2RR","openid":"dvI8","nonce_str":"yi3nhjzsi"} [ log ] 发放卡券返回:{"return_code":"SUCCESS","return_msg":[],"appid":"123","mch_id":"123","device_info":[],"nonce_str":"yi3g7bzsi","result_code":"FAIL","err_code":"STOCK_AMOUNT_NOT_ENOUGH","err_code_des":"代金券批次可用预算不足","coupon_stock_id":"15670666","resp_count":"1","success_count":"0","failed_count":"1","openid":"123","ret_code":"FAIL","ret_msg":"代金券批次可用预算不足","partner_trade_no":"MS20210712145038HoT2RR"} --------------------------------------------------------------- [ 2021-07-12T14:51:01+08:00 ] [ log ] 发放卡券请求参数:{"coupon_stock_id":15670666,"openid_count":"1","partner_trade_no":"01fqnoii","openid":"dvI8","nonce_str":"n8gjlz28jyxq"} [ log ] 发放卡券返回:{"return_code":"SUCCESS","return_msg":[],"appid":"123","mch_id":"123","device_info":[],"nonce_str":"n8gjlzbq","result_code":"FAIL","err_code":"STOCK_AMOUNT_NOT_ENOUGH","err_code_des":"代金券批次可用预算不足","coupon_stock_id":"15670666","resp_count":"1","success_count":"0","failed_count":"1","openid":"123","ret_code":"FAIL","ret_msg":"代金券批次可用预算不足","partner_trade_no":"MS20210712145101fqnoii"} --------------------------------------------------------------- [ 2021-07-12T14:51:27+08:00 ] [ log ] 发放卡券请求参数:{"coupon_stock_id":15670666,"openid_count":"1","partner_trade_no":"7Ta87uk","openid":"dvI8","nonce_str":"8p7utyqi"} [ log ] 发放卡券返回:{"return_code":"SUCCESS","return_msg":[],"appid":"123","mch_id":"123","device_info":[],"nonce_str":"8p7uuryqi","result_code":"FAIL","err_code":"STOCK_AMOUNT_NOT_ENOUGH","err_code_des":"代金券批次可用预算不足","coupon_stock_id":"15670666","resp_count":"1","success_count":"0","failed_count":"1","openid":"123","ret_code":"FAIL","ret_msg":"代金券批次可用预算不足","partner_trade_no":"MS20210712145127Ta87uk"} --------------------------------------------------------------- [ 2021-07-12T14:53:19+08:00 ] [ log ] 发放卡券请求参数:{"coupon_stock_id":15670666,"openid_count":"1","partner_trade_no":"145319khDZlP","openid":"dvI8","nonce_str":"87n7xh3"} [ log ] 发放卡券返回:{"return_code":"SUCCESS","return_msg":[],"appid":"123","mch_id":"123","device_info":[],"nonce_str":"87nnc93","result_code":"FAIL","err_code":"STOCK_AMOUNT_NOT_ENOUGH","err_code_des":"代金券批次可用预算不足","coupon_stock_id":"15670666","resp_count":"1","success_count":"0","failed_count":"1","openid":"123","ret_code":"FAIL","ret_msg":"代金券批次可用预算不足","partner_trade_no":"MS20210712145319khDZlP"} -
2021-07-12我也是这样,太僵硬了
发布模板消息,同一个accesstoken时好时坏的问题。我用for循环写了个循环调用发送微信公众号模板功能做为测试。经过测试经常出现{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hints: [EjGBigaCe-lAmPRA!]"} 的问题。 神奇的是,同一样accesstoken,在5次调用中,两次失败。 我们系统的accesstoken是由统一获取调度的,每一次获取token时都会根据expir_time检查下有效性。所以不存在token无效的问题,而且为什么有的行,有的不行呢? 报文格式:"token:"+access_tokne+"||"+返回消息; 报文如下: token:32_3ILiluV7RyHmcxMkUNFPuOygQTBu3B1zTQEZhGLO7ue1tkEQNxiG5Y4KShO_O6PTVgIoJ1-XNPGrzBhePWPl6ig508eX6uXz8DRYAISgrpu4r5n76EEM4GVxaHOAax3MvOm74KyRDPQ9VfljVSZiAAAROV||{"errcode":0,"errmsg":"ok","msgid":1296381152311394305} token:32_3ILiluV7RyHmcxMkUNFPuOygQTBu3B1zTQEZhGLO7ue1tkEQNxiG5Y4KShO_O6PTVgIoJ1-XNPGrzBhePWPl6ig508eX6uXz8DRYAISgrpu4r5n76EEM4GVxaHOAax3MvOm74KyRDPQ9VfljVSZiAAAROV||{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hints: [EjGBigaCe-lAmPRA!]"} token:32_3ILiluV7RyHmcxMkUNFPuOygQTBu3B1zTQEZhGLO7ue1tkEQNxiG5Y4KShO_O6PTVgIoJ1-XNPGrzBhePWPl6ig508eX6uXz8DRYAISgrpu4r5n76EEM4GVxaHOAax3MvOm74KyRDPQ9VfljVSZiAAAROV||{"errcode":40001,"errmsg":"invalid credential, access_token is invalid or not latest hints: [EjGB0qLnRa-414NGa!]"} token:32_3ILiluV7RyHmcxMkUNFPuOygQTBu3B1zTQEZhGLO7ue1tkEQNxiG5Y4KShO_O6PTVgIoJ1-XNPGrzBhePWPl6ig508eX6uXz8DRYAISgrpu4r5n76EEM4GVxaHOAax3MvOm74KyRDPQ9VfljVSZiAAAROV||{"errcode":0,"errmsg":"ok","msgid":1296381159424933892} token:32_3ILiluV7RyHmcxMkUNFPuOygQTBu3B1zTQEZhGLO7ue1tkEQNxiG5Y4KShO_O6PTVgIoJ1-XNPGrzBhePWPl6ig508eX6uXz8DRYAISgrpu4r5n76EEM4GVxaHOAax3MvOm74KyRDPQ9VfljVSZiAAAROV||{"errcode":0,"errmsg":"ok","msgid":1296381161975070723} ¥¥这是今早的记录,惨不忍睹啊。。 [图片]
2020-07-22