yansongda/pay
A popular PHP payment library for Laravel and other frameworks, integrating Alipay and WeChat Pay with a clean API. Supports common payment flows, refunds, queries, callbacks/notifications, and flexible configuration for multi-app and sandbox use.
WechatConfigVirtualPay 配置类(appKey、sandboxAppKey、offerId、encodingAesKey、callbackToken)VirtualShortcut 用于客户端签名场景WechatTrait::getWechatVirtualPaySignature() 和 getWechatVirtualSessionSignature() 方法Wechat::success() 支持 ['_action' => 'virtual'] 参数返回虚拟支付成功响应Wechat::URL_VIRTUAL 常量(https://api.weixin.qq.com)mergeCommonPlugins 方法 (#1173)VirtualShortcut 插件数组包含非 PluginInterface 实现的问题access_token 参数的问题[@internal](https://github.com/internal) 和 [@coversNothing](https://github.com/coversNothing) 注解Yansongda\Pay\Service\AbstractServiceProvider 基类 (#1142)Yansongda\Pay\CertManager 类用于证书缓存管理 (#1142)AlipayTrait - 支付宝相关方法WechatTrait - 微信相关方法UnipayTrait - 银联相关方法DouyinTrait - 抖音相关方法PaypalTrait - PayPal 相关方法JsbTrait - 江苏银行相关方法StripeTrait - Stripe 相关方法ProviderConfigTrait - Provider 配置方法SupportServiceProviderTrait - ServiceProvider 支持方法AirwallexConfig 类型化配置 (#1140, #1155)Yansongda\Pay\Exception\NetworkException 异常类 (#1157)Yansongda\Pay\Plugin\Wechat\V3\Marketing\MchTransfer\* 重命名为 Yansongda\Pay\Plugin\Wechat\V3\Marketing\Transfer\* (#1139)AbstractServiceProvider 基类 (#1145)CertManager (#1163)CertManager 方法命名和错误码 (#1160)dev-guide Skill (#1164)Config.php 错误码误用 & Pay::config() 去重 (#1162)pr-review-provider skill 用于 Provider PR 代码审查 (#1149)src/Functions.php,所有辅助函数已迁移到对应的 Trait (#1142, #1143, #1144, #1145)tests/FunctionTest.php,测试已迁移到 Trait 测试 (#1142, #1143, #1144, #1145)src/Plugin/Wechat/StartPlugin.php,请使用 Yansongda\Artful\Plugin\StartPlugin 代替 (#1139)src/Plugin/Wechat/V3/Marketing/Transfer/ 目录(因微信支付 API 变更)(#1139)get_alipay_config()、get_wechat_config()、get_unipay_config() 函数,请使用 get_provider_config() 代替 (#1139)WechatConfig 中未使用的证书相关方法 (#1159)ResponsePlugin 插件去除不必要的返回参数(#996)StartPlugin 改为使用 yansongda/artful 中的插件(#993)get_wechat_config, get_alipay_config, get_unipay_config 方法已废弃,使用 get_provider_config 方法代替(#994)yansongda/artful 到最新版解决 http 配置不生效的问题(#974)yansongda/artful 到 v1.0.9 修复 JsonPacker 为空时 packer 错误的问题(#937)InvalidSignException(#903)DecryptException(#906)decrypt_wechat_contents 解密微信加密内容(#912)\Yansongda\Pay\Plugin\Wechat\Extend\Complaints\QueryDetailPlugin 自动解密用户手机号(#912)HttpClientFactoryInterface 方法用于工厂模式创建 http client(#921)条码支付综合前置平台-被扫支付 刷卡支付插件(#922)find 改为 query,同时参数只支持 array(#897)combine_app_id,combine_mch_id 配置,复用其它配置(#909)Pay 类对外方法由所改变,如果您有自行扩展相关插件,请检查(#926)parse 改为 guide(#896)ProviderInterface 的返回参数,增加了 Rocket 返回(#909)call() 方法重命名为 shortcut()(#914)mergeCommonPlugins 不再作为 AbstractProvider 的方法(#918)AbstractProvider 默认使用 HttpClientFactoryInterface 创建 http client(#921)artful API 请求框架(#926)\Yansongda\Pay\Provider\AbstractProvider::call 方法返回值类型错误问题(#834)destination 的类型约束去掉 array(#824)Yansongda\Pay\Direction\ArrayDirection 类(#818, #819)get_direction 方法获取 Direction 对象(#803)Exception::INVALID_PARSE 更改为 Exception::INVALID_DIRECTION(#804)shortcut 支持 _no_common_plugins 参数不使用通用插件(#771)$payload->has() 判断是否存在(#778)Find*Plugin 调整为 Query*Plugin(#756)info 调整为 debug(#755)?ResponseInterface $response 变更为 PackerInterface $packer, ?ResponseInterface $response(#754)__construct(JsonPacker $jsonPacker, XmlPacker $xmlPacker) 方法(#753)Parser 更名为 Direction(#770, #774)php-di/php-di 改为 hyperf/pimple(#786)& 时解析错误(#687)RadarPlugin, SignPlugin 已废弃,使用 RadarSignPlugin 代替(#678)SignPlugin 已废弃,使用 RadarSignPlugin 代替(#678)wechat_public_cert_path 配置(#674)wechat_public_cert_path 未配置时报错的问题(#674)get_alipay_config,get_wechat_config 返回类型由 Config 改为 array(#667)get_wechat_authorization 方法移除(#664)php-di/php-di 依赖。如果您使用的框架非 hyperf, laravel 或 没有指定 ContainerInterface,仍需手动安装 composer require php-di/php-diguzzlehttp/guzzle 依赖。如果没有指定 \Yansongda\Pay\Contract\HttpClientInterface 仍需手动安装 composer require guzzlehttp/guzzleyansongda/supports 到 ~v3.2.0php 最低版本到 7.4.0hyperf, laravel 框架,使用相应的 container 减少内存占用psr11,可手动传入 ContainerInterface 使用Pay::config(array $config = [], $container = null) 方法第二个参数增加为 $container,可手动传入 ContainerInterface/Closure。注意 Closure 需最终返回一个 ContainerInterface 的实例。How can I help you explore Laravel packages today?