Skip to content

Commit

Permalink
change: 支付宝手机网站支付快捷方式由 wap 改为 h5
Browse files Browse the repository at this point in the history
  • Loading branch information
yansongda committed Jan 21, 2024
1 parent 39227bf commit 869e96c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 31 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/Shortcut/Alipay/CloseShortcut.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
23 changes: 7 additions & 16 deletions src/Shortcut/Alipay/QueryShortcut.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/Shortcut/Alipay/RefundShortcut.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/Shortcut/Alipay/CloseShortcutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions tests/Shortcut/Alipay/QueryShortcutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tests/Shortcut/Alipay/RefundShortcutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 869e96c

Please sign in to comment.