change: 支付宝手机网站支付快捷方式由 wap 改为 h5 (#934)

This commit is contained in:
yansongda 2024-01-21 17:09:41 +08:00 committed by GitHub
parent 39227bff44
commit 013b5769ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 22 additions and 31 deletions

View File

@ -17,7 +17,7 @@
- change: 查询API方法由 `find` 改为 `query`,同时参数只支持 array(#897)
- change: cancel/close 的 API 参数只支持 array不再支持 string(#900, #901)
- change: 微信合单支付去掉独立的 `combine_app_id`,`combine_mch_id` 配置,复用其它配置(#909)
- change: 手机网站支付快捷方式由 wap 改为 h5(#911, #915, #916)
- change: 手机网站支付快捷方式由 wap 改为 h5(#911, #915, #916, #934)
- change: `Pay` 类对外方法由所改变,如果您有自行扩展相关插件,请检查(#926)
- change(internal): 按场景对 支付宝/微信/银联 插件进行分类 && 插件代码优化(#894, #909, #913, #922)
- change(internal): 将 支付/微信/银联 shortcut 从 plugin 文件夹独立出来(#895, #904, #905, #933)

View File

@ -14,7 +14,7 @@ use Yansongda\Pay\Plugin\Alipay\V2\FormatPayloadBizContentPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Agreement\ClosePlugin as AgreementClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\App\ClosePlugin as AppClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Authorization\ClosePlugin as AuthorizationClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\ClosePlugin as WapClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\ClosePlugin as H5ClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Mini\ClosePlugin as MiniClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Pos\ClosePlugin as PosClosePlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Scan\ClosePlugin as ScanClosePlugin;
@ -129,11 +129,11 @@ class CloseShortcut implements ShortcutInterface
];
}
protected function wapPlugins(): array
protected function h5Plugins(): array
{
return [
StartPlugin::class,
WapClosePlugin::class,
H5ClosePlugin::class,
FormatPayloadBizContentPlugin::class,
AddPayloadSignaturePlugin::class,
AddRadarPlugin::class,

View File

@ -18,8 +18,8 @@ use Yansongda\Pay\Plugin\Alipay\V2\Pay\App\QueryRefundPlugin as AppQueryRefundPl
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Authorization\QueryPlugin as AuthorizationQueryPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Authorization\QueryRefundPlugin as AuthorizationQueryRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Face\QueryPlugin as FaceQueryPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\QueryPlugin as WapQueryPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\QueryRefundPlugin as WapQueryRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\QueryPlugin as H5QueryPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\QueryRefundPlugin as H5QueryRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Mini\QueryPlugin as MiniQueryPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Mini\QueryRefundPlugin as MiniQueryRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Pos\QueryPlugin as PosQueryPlugin;
@ -156,11 +156,11 @@ class QueryShortcut implements ShortcutInterface
];
}
protected function wapPlugins(): array
protected function h5Plugins(): array
{
return [
StartPlugin::class,
WapQueryPlugin::class,
H5QueryPlugin::class,
FormatPayloadBizContentPlugin::class,
AddPayloadSignaturePlugin::class,
AddRadarPlugin::class,
@ -200,16 +200,7 @@ class QueryShortcut implements ShortcutInterface
protected function refundPlugins(): array
{
return [
StartPlugin::class,
WebQueryRefundPlugin::class,
FormatPayloadBizContentPlugin::class,
AddPayloadSignaturePlugin::class,
AddRadarPlugin::class,
VerifySignaturePlugin::class,
ResponsePlugin::class,
ParserPlugin::class,
];
return $this->refundWebPlugins();
}
protected function refundAppPlugins(): array
@ -282,11 +273,11 @@ class QueryShortcut implements ShortcutInterface
];
}
protected function refundWapPlugins(): array
protected function refundH5Plugins(): array
{
return [
StartPlugin::class,
WapQueryRefundPlugin::class,
H5QueryRefundPlugin::class,
FormatPayloadBizContentPlugin::class,
AddPayloadSignaturePlugin::class,
AddRadarPlugin::class,

View File

@ -15,7 +15,7 @@ use Yansongda\Pay\Plugin\Alipay\V2\Fund\Transfer\RefundPlugin as FundTransferRef
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Agreement\RefundPlugin as AgreementRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\App\RefundPlugin as AppRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Authorization\RefundPlugin as AuthorizationRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\RefundPlugin as WapRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\H5\RefundPlugin as H5RefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Mini\RefundPlugin as MiniRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Pos\RefundPlugin as PosRefundPlugin;
use Yansongda\Pay\Plugin\Alipay\V2\Pay\Scan\RefundPlugin as ScanRefundPlugin;
@ -130,11 +130,11 @@ class RefundShortcut implements ShortcutInterface
];
}
protected function wapPlugins(): array
protected function h5Plugins(): array
{
return [
StartPlugin::class,
WapRefundPlugin::class,
H5RefundPlugin::class,
FormatPayloadBizContentPlugin::class,
AddPayloadSignaturePlugin::class,
AddRadarPlugin::class,

View File

@ -153,9 +153,9 @@ class CloseShortcutTest extends TestCase
], $result);
}
public function testWap()
public function testH5()
{
$result = $this->shortcut->getPlugins(['_action' => 'wap']);
$result = $this->shortcut->getPlugins(['_action' => 'h5']);
self::assertEquals([
StartPlugin::class,

View File

@ -178,9 +178,9 @@ class QueryShortcutTest extends TestCase
], $result);
}
public function testWap()
public function testH5()
{
$result = $this->shortcut->getPlugins(['_action' => 'wap']);
$result = $this->shortcut->getPlugins(['_action' => 'h5']);
self::assertEquals([
StartPlugin::class,
@ -322,9 +322,9 @@ class QueryShortcutTest extends TestCase
], $result);
}
public function testRefundWap()
public function testRefundH5()
{
$result = $this->shortcut->getPlugins(['_action' => 'refund_wap']);
$result = $this->shortcut->getPlugins(['_action' => 'refund_h5']);
self::assertEquals([
StartPlugin::class,

View File

@ -154,9 +154,9 @@ class RefundShortcutTest extends TestCase
], $result);
}
public function testWap()
public function testH5()
{
$result = $this->shortcut->getPlugins(['_action' => 'wap']);
$result = $this->shortcut->getPlugins(['_action' => 'h5']);
self::assertEquals([
StartPlugin::class,