- 微信商户号恢复支付功能时提示当前操作用户较多,请稍后再试
微信商户号恢复支付功能时提示当前操作用户较多,请稍后再试 [图片] [图片] [图片]
2022-10-18 - 使用微信服务商下关联微信商户添加代金券时提示“可用商户不符合规则”
如题 "{\"code\":\"INVALID_REQUEST\",\"message\":\"可用商户不符合规则,请检查\"}"
2021-05-20 - 微信支付 v3接口 创建的换购券如何计算金额
如题
2021-03-29 - 微信小程序 addCard 是否支持v3接口创建的卡券
如题
2021-03-19 - 微信商户 服务商 信息接口
如题,是否有这样的接口
2021-03-18 - “创建代金券批次API”创建的代金券,“激活代金券批次API”之后状态仍然是unactivated
public function stocksCard() { $gzh_id = config('database.gzh_id'); $xcx_id = config('database.xcx_id'); // 商户相关配置 $merchantId = config('database.mch_id'); $merchantSerialNumber = config('database.mch_ser_num'); $merchantPrivateKey = PemUtil::loadPrivateKey(ADDON_PATH.DS.'wxcard'.DS.'public'.DS.'cert1'.DS.'apiclient_key.pem'); // 商户私钥 // 微信支付平台配置 $wechatpayCertificate = PemUtil::loadCertificate(ADDON_PATH.DS.'wxcard'.DS.'public'.DS.'cert1'.DS.'apiclient_cert.pem'); // 微信支付平台证书 // 构造一个WechatPayMiddleware $wechatpayMiddleware = WechatPayMiddleware::builder() ->withMerchant($merchantId, $merchantSerialNumber, $merchantPrivateKey) // 传入商户相关配置 ->withWechatPay([ $wechatpayCertificate ]) // 可传入多个微信支付平台证书,参数类型为array ->build(); // 将WechatPayMiddleware添加到Guzzle的HandlerStack中 $stack = GuzzleHttp\HandlerStack::create(); $stack->push($wechatpayMiddleware, 'wechatpay'); // 创建Guzzle HTTP Client时,将HandlerStack传入 $client = new GuzzleHttp\Client(['handler' => $stack]); // 接下来,正常使用Guzzle发起API请求,WechatPayMiddleware会自动地处理签名和验签 try { $resp = $client->request('GET', "https://api.mch.weixin.qq.com/v3/marketing/favor/stocks", [ // 注意替换为实际URL 'query' => [ 'offset' => 0, 'limit' => 10, 'stock_creator_mchid' => $merchantId, ], 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ], ]); // echo $resp->getStatusCode().' '.$resp->getReasonPhrase()."\n"; // echo $resp->getBody()."\n"; return $resp->getBody(); } catch (RequestException $e) { // // 进行错误处理 // echo $e->getMessage()."\n"; // if ($e->hasResponse()) { // echo $e->getResponse()->getStatusCode().' '.$e->getResponse()->getReasonPhrase()."\n"; // echo $e->getResponse()->getBody(); // } // return; return $e->getResponse()->getBody(); } } [图片] 查询结果
2021-03-17 - “创建代金券批次API”创建的代金券不显示在卡包中
如题 创建代金券批次API(https://api.mch.weixin.qq.com/v3/marketing/favor/coupon-stocks)接口创建的卡券没有显示在卡包中
2021-03-16 - 微信小程序 核销卡券 流程
微信小程序中核销“创建商家券API”(https://api.mch.weixin.qq.com/v3/marketing/busifavor/stocks)创建的卡券 微信小程序文档中没有选择卡券的接口
2021-03-16 - 调用【创建代金券批次API】,返回NO_AUTH
商户号:1518669531 wechatpay-guzzle-middleware调用创建代金券api接口(https://api.mch.weixin.qq.com/v3/marketing/favor/coupon-stocks),时返回报错: Client error: `POST https://api.mch.weixin.qq.com/v3/marketing/favor/coupon-stocks` resulted in a `403 Forbidden` response: {"code":"NO_AUTH","message":"你配置的信息需要开通特殊权限"} 403 Forbidden {"code":"NO_AUTH","message":"你配置的信息需要开通特殊权限"} 请求参数: array(9) { ["stock_name"] => string(6) "测试" ["belong_merchant"] => string(10) "1518669531" ["available_begin_time"] => string(25) "2021-03-16T16:43:16+08:00" ["available_end_time"] => string(25) "2021-04-08T16:43:16+08:00" ["stock_use_rule"] => array(5) { ["max_amount"] => int(10) ["max_coupons"] => int(10) ["max_coupons_per_user"] => int(2) ["natural_person_limit"] => bool(true) ["prevent_api_abuse"] => bool(true) } ["coupon_use_rule"] => array(2) { ["available_merchants"] => array(1) { [0] => string(10) "1518669531" } ["fixed_normal_coupon"] => array(2) { ["coupon_amount"] => int(1) ["transaction_minimum"] => int(100) } } ["no_cash"] => bool(true) ["stock_type"] => string(6) "NORMAL" ["out_request_no"] => string(24) "1518669531_20210315_9465" } 请求代码: public function test() { $gzh_id = config('database.gzh_id'); $xcx_id = config('database.xcx_id'); // 商户相关配置 $merchantId = config('database.mch_id'); $merchantSerialNumber = config('database.mch_ser_num'); $merchantPrivateKey = PemUtil::loadPrivateKey(ADDON_PATH.DS.'wxcard'.DS.'public'.DS.'cert1'.DS.'apiclient_key.pem'); // 商户私钥 // 微信支付平台配置 $wechatpayCertificate = PemUtil::loadCertificate(ADDON_PATH.DS.'wxcard'.DS.'public'.DS.'cert1'.DS.'apiclient_cert.pem'); // 微信支付平台证书 // 构造一个WechatPayMiddleware $wechatpayMiddleware = WechatPayMiddleware::builder() ->withMerchant($merchantId, $merchantSerialNumber, $merchantPrivateKey) // 传入商户相关配置 ->withWechatPay([ $wechatpayCertificate ]) // 可传入多个微信支付平台证书,参数类型为array ->build(); // 将WechatPayMiddleware添加到Guzzle的HandlerStack中 $stack = GuzzleHttp\HandlerStack::create(); $stack->push($wechatpayMiddleware, 'wechatpay'); // 创建Guzzle HTTP Client时,将HandlerStack传入 $client = new GuzzleHttp\Client(['handler' => $stack]); $json = [ 'stock_name' => '测试', 'belong_merchant' => $merchantId, 'available_begin_time' => date(DATE_RFC3339, time()+(24*3600)), 'available_end_time' => date(DATE_RFC3339, time()+(24*24*3600)), 'stock_use_rule' => [ 'max_amount' => 10, 'max_coupons' => 10, 'max_coupons_per_user' => 2, 'natural_person_limit' => true, 'prevent_api_abuse' => true, ], 'coupon_use_rule' => [ 'available_merchants' => [ $merchantId, ], 'fixed_normal_coupon' => [ 'coupon_amount' => 1, 'transaction_minimum' => 100, ], ], 'no_cash' => true, 'stock_type' => 'NORMAL', 'out_request_no' => $merchantId.'_'.date('Ymd').'_'.Random::numeric(4), ]; dump($json); // 接下来,正常使用Guzzle发起API请求,WechatPayMiddleware会自动地处理签名和验签 try { $resp = $client->request('POST', 'https://api.mch.weixin.qq.com/v3/marketing/favor/coupon-stocks', [ // 注意替换为实际URL // JSON请求体 'json' => $json, 'headers' => [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ], ]); echo $resp->getStatusCode().' '.$resp->getReasonPhrase()."\n"; echo $resp->getBody()."\n"; // return $resp->getBody(); } catch (RequestException $e) { // // 进行错误处理 echo $e->getMessage()."\n"; if ($e->hasResponse()) { echo $e->getResponse()->getStatusCode().' '.$e->getResponse()->getReasonPhrase()."\n"; echo $e->getResponse()->getBody(); } return; // return $e->getResponse()->getBody(); } }
2021-03-15 - send-coupon始终提示“缺少必传参数send-coupon-params”
wxml <send-coupon bindcustomevent="getcoupon" sign="{{card.sign}}" send_coupon_merchant="{{card.send_coupon_merchant}}" send_coupon_params="{{card.send_coupon_params}}" send-coupon-params="{{card.send_coupon_params}}">领取</send-coupon> js getcoupon: function (params) { console.log(params); }
2021-03-10