diff --git a/CHANGELOG.md b/CHANGELOG.md index dc294030c..cb7efb2d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/Shortcut/Alipay/CloseShortcut.php b/src/Shortcut/Alipay/CloseShortcut.php index b4af50a88..d29a4e6b9 100644 --- a/src/Shortcut/Alipay/CloseShortcut.php +++ b/src/Shortcut/Alipay/CloseShortcut.php @@ -14,7 +14,7 @@ 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 @@ protected function scanPlugins(): array ]; } - protected function wapPlugins(): array + protected function h5Plugins(): array { return [ StartPlugin::class, - WapClosePlugin::class, + H5ClosePlugin::class, FormatPayloadBizContentPlugin::class, AddPayloadSignaturePlugin::class, AddRadarPlugin::class, diff --git a/src/Shortcut/Alipay/QueryShortcut.php b/src/Shortcut/Alipay/QueryShortcut.php index b02f632c3..e09921d33 100644 --- a/src/Shortcut/Alipay/QueryShortcut.php +++ b/src/Shortcut/Alipay/QueryShortcut.php @@ -18,8 +18,8 @@ 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 @@ protected function scanPlugins(): array ]; } - 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 @@ protected function transferPlugins(): array 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 @@ protected function refundScanPlugins(): array ]; } - protected function refundWapPlugins(): array + protected function refundH5Plugins(): array { return [ StartPlugin::class, - WapQueryRefundPlugin::class, + H5QueryRefundPlugin::class, FormatPayloadBizContentPlugin::class, AddPayloadSignaturePlugin::class, AddRadarPlugin::class, diff --git a/src/Shortcut/Alipay/RefundShortcut.php b/src/Shortcut/Alipay/RefundShortcut.php index 0ef84bb31..0863fce28 100644 --- a/src/Shortcut/Alipay/RefundShortcut.php +++ b/src/Shortcut/Alipay/RefundShortcut.php @@ -15,7 +15,7 @@ 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 @@ protected function scanPlugins(): array ]; } - protected function wapPlugins(): array + protected function h5Plugins(): array { return [ StartPlugin::class, - WapRefundPlugin::class, + H5RefundPlugin::class, FormatPayloadBizContentPlugin::class, AddPayloadSignaturePlugin::class, AddRadarPlugin::class, diff --git a/tests/Shortcut/Alipay/CloseShortcutTest.php b/tests/Shortcut/Alipay/CloseShortcutTest.php index 82ce24ffb..b496ac280 100644 --- a/tests/Shortcut/Alipay/CloseShortcutTest.php +++ b/tests/Shortcut/Alipay/CloseShortcutTest.php @@ -153,9 +153,9 @@ public function testScan() ], $result); } - public function testWap() + public function testH5() { - $result = $this->shortcut->getPlugins(['_action' => 'wap']); + $result = $this->shortcut->getPlugins(['_action' => 'h5']); self::assertEquals([ StartPlugin::class, diff --git a/tests/Shortcut/Alipay/QueryShortcutTest.php b/tests/Shortcut/Alipay/QueryShortcutTest.php index 945d79726..86d98035a 100644 --- a/tests/Shortcut/Alipay/QueryShortcutTest.php +++ b/tests/Shortcut/Alipay/QueryShortcutTest.php @@ -178,9 +178,9 @@ public function testScan() ], $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 @@ public function testRefundScan() ], $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, diff --git a/tests/Shortcut/Alipay/RefundShortcutTest.php b/tests/Shortcut/Alipay/RefundShortcutTest.php index 06d92f83b..3ac072b35 100644 --- a/tests/Shortcut/Alipay/RefundShortcutTest.php +++ b/tests/Shortcut/Alipay/RefundShortcutTest.php @@ -154,9 +154,9 @@ public function testScan() ], $result); } - public function testWap() + public function testH5() { - $result = $this->shortcut->getPlugins(['_action' => 'wap']); + $result = $this->shortcut->getPlugins(['_action' => 'h5']); self::assertEquals([ StartPlugin::class,