feat: 新增地址选择插件及订阅消息等多项功能优化
- 新增地址选择插件,支持地图位置选择并返回地址和经纬度 - 新增微信订阅消息发送功能,支持审核结果、提现通知等场景 - 新增订单支付状态查询、提现收款人姓名保存等接口 - 新增服务区域管理,支持按省市区划分并同步到信息发布 - 新增资金流水和营收报表导出功能 - 新增可用优惠券查询、订单退款拆分处理等功能 - 优化后台角标显示、首页数据统计、UI配置下发等 - 修复订单支付并发问题、地区管理逻辑等
这个提交包含在:
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Shortcut\Wechat;
|
||||
|
||||
use Yansongda\Artful\Contract\ShortcutInterface;
|
||||
use Yansongda\Artful\Exception\InvalidParamsException;
|
||||
use Yansongda\Artful\Plugin\AddPayloadBodyPlugin;
|
||||
use Yansongda\Artful\Plugin\ParserPlugin;
|
||||
use Yansongda\Artful\Plugin\StartPlugin;
|
||||
use Yansongda\Pay\Exception\Exception;
|
||||
use Yansongda\Pay\Plugin\Wechat\AddRadarPlugin;
|
||||
use Yansongda\Pay\Plugin\Wechat\ResponsePlugin;
|
||||
use Yansongda\Pay\Plugin\Wechat\V3\AddPayloadSignaturePlugin;
|
||||
use Yansongda\Pay\Plugin\Wechat\V3\Marketing\MchTransfer\CreatePlugin;
|
||||
use Yansongda\Pay\Plugin\Wechat\V3\Marketing\MchTransfer\QueryPlugin;
|
||||
use Yansongda\Pay\Plugin\Wechat\V3\VerifySignaturePlugin;
|
||||
use Yansongda\Supports\Str;
|
||||
|
||||
/**
|
||||
* 商家转账快捷方式(yansongda/pay v3.7 内置了 MchTransfer 插件但未注册 Shortcut,这里补齐)
|
||||
*
|
||||
* 用法:
|
||||
* Pay::wechat($config)->mchTransfer([...]); // 发起转账
|
||||
* Pay::wechat($config)->mchTransfer(['_action' => 'query', 'out_bill_no' => ...]); // 查询
|
||||
*
|
||||
* 说明:该文件属于 epay 插件内置 SDK 的补丁,插件升级后需重新确认是否存在。
|
||||
*/
|
||||
class MchTransferShortcut implements ShortcutInterface
|
||||
{
|
||||
/**
|
||||
* @throws InvalidParamsException
|
||||
*/
|
||||
public function getPlugins(array $params): array
|
||||
{
|
||||
$method = Str::camel($params['_action'] ?? 'default').'Plugins';
|
||||
|
||||
if (method_exists($this, $method)) {
|
||||
return $this->{$method}();
|
||||
}
|
||||
|
||||
throw new InvalidParamsException(
|
||||
Exception::PARAMS_SHORTCUT_ACTION_INVALID,
|
||||
"不支持的 action 参数 [{$method}],可用:默认(发起转账)、query(查询)"
|
||||
);
|
||||
}
|
||||
|
||||
protected function defaultPlugins(): array
|
||||
{
|
||||
return $this->createPlugins();
|
||||
}
|
||||
|
||||
protected function createPlugins(): array
|
||||
{
|
||||
return [
|
||||
StartPlugin::class,
|
||||
CreatePlugin::class,
|
||||
AddPayloadBodyPlugin::class,
|
||||
AddPayloadSignaturePlugin::class,
|
||||
AddRadarPlugin::class,
|
||||
VerifySignaturePlugin::class,
|
||||
ResponsePlugin::class,
|
||||
ParserPlugin::class,
|
||||
];
|
||||
}
|
||||
|
||||
protected function queryPlugins(): array
|
||||
{
|
||||
return [
|
||||
StartPlugin::class,
|
||||
QueryPlugin::class,
|
||||
AddPayloadSignaturePlugin::class,
|
||||
AddRadarPlugin::class,
|
||||
VerifySignaturePlugin::class,
|
||||
ResponsePlugin::class,
|
||||
ParserPlugin::class,
|
||||
];
|
||||
}
|
||||
|
||||
protected function cancelPlugins(): array
|
||||
{
|
||||
return [
|
||||
StartPlugin::class,
|
||||
\Yansongda\Pay\Plugin\Wechat\V3\Marketing\MchTransfer\CancelPlugin::class,
|
||||
AddPayloadSignaturePlugin::class,
|
||||
AddRadarPlugin::class,
|
||||
VerifySignaturePlugin::class,
|
||||
ResponsePlugin::class,
|
||||
ParserPlugin::class,
|
||||
];
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户