wechatpay/wechatpay-guzzle-middleware 处于维护状态,言外之意就是,即将被放弃,建议用 wechatpay/wechatpay 新包。 另外 PemUtil::loadPrivateKey('./path/to/mch/private/key.pem'); 这是要加载私钥文件,新包内用 Rsa::from(‘file:///…'); 新包另配有IDE提示包 iwechatpay/openapi , 接口的数据描述例如:https://github.com/TheNorthMemory/wechatpay-openapi/blob/a21da30bc08dcb220151c3fc221cbc21f7ae6a29/src/V3/Pay/Transactions/Native.php#L18-L54 几乎就是cv操作了。 /** * Native下单(同步模式) * @param array $options * @link https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/pay/transactions/chapter3_3.shtml */ public function post(array $options = [ 'json' => [ 'appid' => 'wxd678efh567hg6787', 'mchid' => '1230000109', 'description' => 'Image形象店-深圳腾大-QQ公仔', 'attach' => '自定义数据', 'out_trade_no' => '1217752501201407033233368018', 'amount' => [ 'total' => 100, 'currency' => 'CNY', ], 'time_expire' => '2018-06-08T10:34:56+08:00', 'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php', 'goods_tag' => 'WXG', 'detail' => [ 'cost_price' => 608800, 'invoice_id' => '微信123', 'goods_detail' => [[ 'merchant_goods_id' => '商品编码', 'wechatpay_goods_id' => '1001', 'goods_name' => 'iPhoneX 256G', 'quantity' => 1, 'unit_price' => 828800, ],], ], 'scene_info' => [ 'payer_client_ip' => '14.23.150.211', 'device_id' => '013467007045764', 'store_info' => [ 'id' => '0001', 'name' => '腾讯大厦分店', 'area_code' => '440305', 'address' => '广东省深圳市南山区科技中一道10000号', ], ], ], ]): ResponseInterface;
获取微信支付二维码链接时,调用接口提示 400提示错误: [400] ClientException in RequestException.php line 113 Client error: `POST https://api.mch.weixin.qq.com/v3/pay/transactions/native` resulted in a `400 Bad Request` response 一下是请求参数: $resp = $client->request( 'POST', 'https://api.mch.weixin.qq.com/v3/pay/transactions/native', //请求URL [ // JSON请求体 'json' => [ "time_expire" => "2018-06-08T10:34:56+08:00", "amount" => [ "total" => 100, "currency" => "CNY", ], "mchid" => "1230000109", "description" => "Image形象店-深圳腾大-QQ公仔", "notify_url" => "https://www.weixin.qq.com/wxpay/pay.php", "out_trade_no" => "1217752501201407033233368018", "goods_tag" => "WXG", "appid" => "wxd678efh567hg6787", "attach" => "自定义数据说明", "detail" => [ "invoice_id" => "wx123", "goods_detail" => [ [ "goods_name" => "iPhoneX 256G", "wechatpay_goods_id" => "1001", "quantity" => 1, "merchant_goods_id" => "商品编码", "unit_price" => 828800, ], [ "goods_name" => "iPhoneX 256G", "wechatpay_goods_id" => "1001", "quantity" => 1, "merchant_goods_id" => "商品编码", "unit_price" => 828800, ], ], "cost_price" => 608800, ], "scene_info" => [ "store_info" => [ "address" => "广东省深圳市南山区科技中一道10000号", "area_code" => "440305", "name" => "腾讯大厦分店", "id" => "0001", ], "device_id" => "013467007045764", "payer_client_ip" => "14.23.150.211", ] ], 'headers' => [ 'Accept' => 'application/json' ] ]
2022-01-19谢邀,这个功能就跟ATM机,语音提示“注意周围环境,如果遇到问题请及时拨打客服电话或报警求助…”一个道理
ios每次打开小程序都会出现“XXX”读取了你的剪切板内容,怎么关闭提示啊?[图片] 试过别的小程序,有的会有的不会,是要在哪里设置呢?
2022-01-17这款sdk抹平了初始化参数普通商户及服务商之间的差异性,找到了共性,服务商也是商户,参数填对应的服务商参数即可;
请问有没有服务商微信支付SDKV3版本可用?请问服务商现在是否有可用的v3版本的SDK提供,我在wechatpay-apiv3/wechatpay-php说明中,没有看到服务商ID和服务商户号这样的参数?
2022-01-12不影响
服务商模式微信支付问题从已有微信支付的服务号内申请微信支付服务商,是否会影响这个服务号原本的微信支付的使用?
2022-01-07v2签名只支持一维的key/value结构,value如果是复杂结构形如list/map,统统转成标准json字符串,然后算签名
分账V2参与签名的字段有哪些?如果包括‘receivers’的话,数组该如何拼接签名字符串/secapi/pay/profitsharing v2 签名字段以及’receivers‘数组拼接方式是怎么样的呢?
2022-01-06require_once 'vendor/autoload.php'; use WeChatPay\Crypto\AesGcm; $json = json_decode('{...}'); $res = AesGcm::decrypt($json->resource->ciphertext, $apiv3Key, $json->resource->nonce, $json->resource->associated_data); print_r($res);
php native支付 回调解密一直返回false//数据包 {"id":"6b46b3e4-1e7c-59d5-84c3-93499c7b708d","create_time":"2022-01-05T15:51:10+08:00","resource_type":"encrypt-resource","event_type":"TRANSACTION.SUCCESS","summary":"支付成功","resource":{"original_type":"transaction","algorithm":"AEAD_AES_256_GCM","ciphertext":"MQN18lzceDWCj8tWzu1XH+ATWpfJQ8SPWs+PQEIyn6Nikk1F9L2kLxTYJ7LP/KMaG1HICkJKLwelVV90VXB16FdGLybUJrXkRQmGCdAutpB5JKiqz9aXPxleeqdMwcGP29y0ABYGwNp/k8pRtZSidtgofQb3zOJXlsMqM2FlTRKug3FsYfq4V780xSygMbzOGm5/mxOHvagCGByuU7mIcJCXiqELjidBPiLFE/KjN4P4VaxI9VGQTZRyUhAcl7dm2WVs060VU6aLF1dXN2WBV0iPtt6JsYRAPYH3aHS12GputZBobHked4yuxNZN6PIKwlmlMc4gd5imh/LrVvbJjfDH4TqmpSo9+wOC/gV/dhzMBBT88sSonSLoKWop5EfdNVDcDA2xbwrYHWHRhljmkLhBgtaLyogFb/ASVsfJRujabKJkPT+3vT5Bn9gfs7gnLDzW8I2HeJTfYCEoBjEkw6H0QW69x5r8xuEk50SJLDN9hNY2hSrxSWxTQaJ5jSgWvOmdMyJpOxRO/z4GhXNE0kmFWKkF+s46Pp+bYu8BR3Dyh85IZ9t46zInVHRbfJ5BmySsBn/fJMFvqTztl4D/mg==","associated_data":"transaction","nonce":"BUxpqQepKKZ9"}} //apiv3key 1518DB9E0CE59070DA92F7F319DF6A97 php版本7.3.4 解密一直返回false ciphertext base64_decode 也是一直乱码 请问这样的情况 是否是我apiv3key不正确
2022-01-05为 wechatpay-php 增加IDE提示的接口描述包 iwechatpay/openapi 介绍wechapay-php 开发包的辅助包 「示例文档不是很清晰」--> 你需要再安装一款开发包,如上。
查询最大分账比例API返回的结构不对?https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_7.shtml 用的APIv3接口规则 [图片] [图片] [图片] 还有就是请求示例文档不是很清晰,有没有详细点的文档,给我看晕了
2022-01-05很多时候,分开商户号可能是比较好的方案,比如,开通了H5/APP支付能力的,无法参加其他优惠费率等等,另外官方目前还没有“商户号回收”相应计划。
请问大家商户号可以合并吗??我的商户号很多几乎每一个APP和支付通道一个商户号 现在不下10个了 能不能统一合并到一个商户号里
2022-01-05https://github.com/wechatpay-apiv3/wechatpay-apache-httpclient 这个是官方源
请问github上com.github.wxpay项目是官方封装的吗?最近发现github上有个com.github.wxpay的微信支付SDK项目,不知道是否属于微信官方出品。 虽然对接了N次相关接口,但是还是想吐槽一下微信系接口真的很难对接了,不像a li简直太顺滑了!!希望吐槽有用吧
2021-12-31试试 https://www.npmjs.com/package/wechatpay-axios-plugin
V3签名验证错误用微信提供的证书签名,验签工具测试,都提示验签通过。但是请求接口一直报错,提示签名错误。不清楚什么原因。 我是用Node.js开发的 {"code":"SIGN_ERROR","detail":{"detail":{"issue":"sign not match"},"field":"signature","location":"authorization","sign_information":{"method":"POST","sign_message_length":282,"truncated_sign_message":"POST\n/v3/pay/transactions/app\n1640873114\nc20a1e033595b6ca346333741c23beb6\n{\"appid\"\n","url":"/v3/pay/transactions/app"}},"message":"签名错误,请检查后再试"} }
2021-12-30