ledc/wechat-custom-declare

微信支付清关报关(V2)

Maintainers

👁 ledccn

Package info

github.com/ledccn/wechat-custom-declare

pkg:composer/ledc/wechat-custom-declare

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v7.0.1 2024-11-19 05:30 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT e9c6297f541b63e4d9732f807c21c2842d940504

  • david <367013672.woop@qq.com>

This package is auto-updated.

Last update: 2026-06-19 11:46:22 UTC


README

安装

composer require ledc/wechat-custom-declare

使用说明

开箱即用,只需要传入一个配置,初始化一个实例即可:

use Ledc\WechatPayProfitSharing\Config;
use Ledc\WechatCustomDeclare\WechatCustom;

$config = [
 'mch_id' => 1360649000,
 'appid' => 1360649000,

 // 商户证书
 'private_key' => __DIR__ . '/certs/apiclient_key.pem',
 'certificate' => __DIR__ . '/certs/apiclient_cert.pem',

 // v3 API 秘钥
 'secret_key' => '43A03299A3C3FED3D8CE7B820Fxxxxx',

 // v2 API 秘钥
 'v2_secret_key' => '26db3e15cfedb44abfbb5fe94fxxxxx',

 // 平台证书:微信支付 APIv3 平台证书,需要使用工具下载
 // 下载工具:https://github.com/wechatpay-apiv3/CertificateDownloader
 'platform_certs' => [
 // 请使用绝对路径
 // '/path/to/wechatpay/cert.pem',
 ],
];

$wechatCustom = new WechatCustom(new Config($config));

在创建实例后,所有的方法都可以有IDE自动补全;例如:

// 订单附加信息提交接口
$wechatCustom->order();
// 订单附加信息查询接口
$wechatCustom->query();
// 订单附加信息重推接口
$wechatCustom->redeclare();

官方文档

捐赠

👁 reward