下载php_sdk_v3 通过postman得到解密参数
解密获取微信平台证书
请求微信提供接口:https://api.mch.weixin.qq.com/hk/v3/transactions/jsapi
提示:Server error: `POST https://api.mch.weixin.qq.com/hk/v3/transactions/jsapi` resulted in a `500 Internal Server Error` response: {"code":"SYSTEM_ERROR","message":"系统繁忙,请稍后重试"} {"code":400,"msg":null}
同个问题
请问解决了吗,我这边是一样的问题
1900000109 这个商户号是境内的商户号 检查下商户号和接口是否对应
$instance = Builder::factory([]); $instance->chain('v3/transactions/jsapi')->post([ 'base_uri' => 'https://api.mch.weixin.qq.com/hk/', // 跨境(国内接入) 'json' => [ 'mchid' => '1900000109', 'appid' => 'wx8888888888888888', 'sub_mchid' => '1900000109', 'sp_mchid' => '1900000100', 'sp_appid' => 'wx8888888888888888', 'sub_appid' => 'wx8888888888888888', 'description' => 'image形象店-深圳腾大- QQ公仔', 'attach' => '自定义数据', 'out_trade_no' => '1217752501201407033233368018', 'goods_tag' => 'WXG', 'trade_type' => 'MICROPAY', 'limit_pay' => 'no_credit', 'merchant_category_code' => '1011', 'payer' => [ 'auth_code' => '120061098828009406', ], 'amount' => [ 'total' => 888, 'currency' => 'HKD', ], 'scene_info' => [ 'device_id' => '013467007045764', 'device_ip' => '128.0.0.1', 'payer_client_ip' => '128.0.0.1', 'operator_id' => '123145', 'store_info' => [ 'id' => '0001', 'name' => '腾讯大厦分店', 'address' => '广东省深圳市南山区科技中一道10000号', ], ], 'promotion_detail' => [[ 'cost_price' => 608800, 'receipt_id' => 'wx123', 'goods_detail' => [[ 'goods_id' => '商品编码', 'wxpay_goods_id' => '1001', 'goods_name' => 'iPhone6s 16G', 'quantity' => 1, 'price' => 528800, ],], ],], ]);
官方偷偷地把文档改了,5个月之前,'detail’字典还是’promotion_detail’, 你可以试试改成’promotion_detail’ 或者不添加*detail看看。
sample代码取自这里 https://github.com/TheNorthMemory/wechatpay-openapi/blob/master/src/V3/Transactions/Jsapi.php#L57-L67