From 071da2b126e64099a58b6badb66fbafd8e93df35 Mon Sep 17 00:00:00 2001 From: yansongda Date: Sat, 6 Jan 2024 17:47:08 +0800 Subject: [PATCH] =?UTF-8?q?change(internal):=20=E8=B0=83=E6=95=B4=20?= =?UTF-8?q?=E9=93=B6=E8=81=94=20=E6=8F=92=E4=BB=B6=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + .../{ => Open}/AddPayloadSignaturePlugin.php | 2 +- src/Plugin/Unipay/{ => Open}/CallbackPlugin.php | 2 +- src/Plugin/Unipay/{ => Open}/Pay/H5/PayPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/CancelPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/PosPlugin.php | 2 +- .../{ => Open}/Pay/QrCode/PosPreAuthPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/QueryPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/RefundPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/ScanFeePlugin.php | 2 +- .../Unipay/{ => Open}/Pay/QrCode/ScanPlugin.php | 2 +- .../{ => Open}/Pay/QrCode/ScanPreAuthPlugin.php | 2 +- .../{ => Open}/Pay/QrCode/ScanPreOrderPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/Web/CancelPlugin.php | 2 +- src/Plugin/Unipay/{ => Open}/Pay/Web/PayPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/Web/QueryPlugin.php | 2 +- .../Unipay/{ => Open}/Pay/Web/RefundPlugin.php | 2 +- .../Unipay/{ => Open}/ResponseHtmlPlugin.php | 2 +- src/Plugin/Unipay/{ => Open}/StartPlugin.php | 2 +- .../Unipay/{ => Open}/VerifySignaturePlugin.php | 2 +- src/Provider/Unipay.php | 8 ++++---- src/Shortcut/Unipay/CancelShortcut.php | 10 +++++----- src/Shortcut/Unipay/H5Shortcut.php | 8 ++++---- src/Shortcut/Unipay/PosShortcut.php | 10 +++++----- src/Shortcut/Unipay/QueryShortcut.php | 10 +++++----- src/Shortcut/Unipay/RefundShortcut.php | 10 +++++----- src/Shortcut/Unipay/ScanShortcut.php | 14 +++++++------- src/Shortcut/Unipay/WebShortcut.php | 8 ++++---- .../{ => Open}/AddPayloadSignaturePluginTest.php | 6 +++--- .../Unipay/{ => Open}/CallbackPluginTest.php | 4 ++-- .../{Pay/Web => Open/Pay/H5}/PayPluginTest.php | 8 ++++---- .../{ => Open}/Pay/QrCode/CancelPluginTest.php | 4 ++-- .../Unipay/{ => Open}/Pay/QrCode/PosPluginTest.php | 4 ++-- .../{ => Open}/Pay/QrCode/PosPreAuthPluginTest.php | 4 ++-- .../{ => Open}/Pay/QrCode/QueryPluginTest.php | 4 ++-- .../{ => Open}/Pay/QrCode/RefundPluginTest.php | 4 ++-- .../{ => Open}/Pay/QrCode/ScanFeePluginTest.php | 4 ++-- .../{ => Open}/Pay/QrCode/ScanPluginTest.php | 4 ++-- .../Pay/QrCode/ScanPreAuthPluginTest.php | 4 ++-- .../Pay/QrCode/ScanPreOrderPluginTest.php | 4 ++-- .../Unipay/{ => Open}/Pay/Web/CancelPluginTest.php | 4 ++-- .../{Pay/H5 => Open/Pay/Web}/PayPluginTest.php | 8 ++++---- .../Unipay/{ => Open}/Pay/Web/QueryPluginTest.php | 4 ++-- .../Unipay/{ => Open}/Pay/Web/RefundPluginTest.php | 4 ++-- .../Unipay/{ => Open}/ResponseHtmlPluginTest.php | 4 ++-- tests/Plugin/Unipay/{ => Open}/StartPluginTest.php | 4 ++-- .../{ => Open}/VerifySignaturePluginTest.php | 4 ++-- tests/Provider/UnipayTest.php | 6 +++--- tests/Shortcut/Unipay/CancelShortcutTest.php | 10 +++++----- tests/Shortcut/Unipay/H5ShortcutTest.php | 8 ++++---- tests/Shortcut/Unipay/PosShortcutTest.php | 10 +++++----- tests/Shortcut/Unipay/QueryShortcutTest.php | 10 +++++----- tests/Shortcut/Unipay/RefundShortcutTest.php | 10 +++++----- tests/Shortcut/Unipay/ScanShortcutTest.php | 14 +++++++------- tests/Shortcut/Unipay/WebShortcutTest.php | 8 ++++---- 55 files changed, 140 insertions(+), 139 deletions(-) rename src/Plugin/Unipay/{ => Open}/AddPayloadSignaturePlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/CallbackPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/H5/PayPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/CancelPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/PosPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/PosPreAuthPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/QueryPlugin.php (96%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/RefundPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanFeePlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPreAuthPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPreOrderPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/Web/CancelPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/Web/PayPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/Pay/Web/QueryPlugin.php (96%) rename src/Plugin/Unipay/{ => Open}/Pay/Web/RefundPlugin.php (97%) rename src/Plugin/Unipay/{ => Open}/ResponseHtmlPlugin.php (96%) rename src/Plugin/Unipay/{ => Open}/StartPlugin.php (98%) rename src/Plugin/Unipay/{ => Open}/VerifySignaturePlugin.php (97%) rename tests/Plugin/Unipay/{ => Open}/AddPayloadSignaturePluginTest.php (95%) rename tests/Plugin/Unipay/{ => Open}/CallbackPluginTest.php (98%) rename tests/Plugin/Unipay/{Pay/Web => Open/Pay/H5}/PayPluginTest.php (95%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/CancelPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/PosPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/PosPreAuthPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/QueryPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/RefundPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanFeePluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPreAuthPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/QrCode/ScanPreOrderPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/Web/CancelPluginTest.php (94%) rename tests/Plugin/Unipay/{Pay/H5 => Open/Pay/Web}/PayPluginTest.php (95%) rename tests/Plugin/Unipay/{ => Open}/Pay/Web/QueryPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/Pay/Web/RefundPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/ResponseHtmlPluginTest.php (93%) rename tests/Plugin/Unipay/{ => Open}/StartPluginTest.php (94%) rename tests/Plugin/Unipay/{ => Open}/VerifySignaturePluginTest.php (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03793787a..f8e8f9551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - change(internal): 将 `call()` 方法重命名为 `shortcut()`(#914) - change(internal): `mergeCommonPlugins` 不再作为 `AbstractProvider` 的方法(#918) - change(internal): `AbstractProvider` 默认使用 `HttpClientFactoryInterface` 创建 http client(#921) +- change(internal): 调整 银联 插件文件夹结构(#923) ## v3.5.3 diff --git a/src/Plugin/Unipay/AddPayloadSignaturePlugin.php b/src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php similarity index 97% rename from src/Plugin/Unipay/AddPayloadSignaturePlugin.php rename to src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php index efd425278..a8eeb0172 100644 --- a/src/Plugin/Unipay/AddPayloadSignaturePlugin.php +++ b/src/Plugin/Unipay/Open/AddPayloadSignaturePlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay; +namespace Yansongda\Pay\Plugin\Unipay\Open; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/CallbackPlugin.php b/src/Plugin/Unipay/Open/CallbackPlugin.php similarity index 97% rename from src/Plugin/Unipay/CallbackPlugin.php rename to src/Plugin/Unipay/Open/CallbackPlugin.php index 7403f08ac..c9a735761 100644 --- a/src/Plugin/Unipay/CallbackPlugin.php +++ b/src/Plugin/Unipay/Open/CallbackPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay; +namespace Yansongda\Pay\Plugin\Unipay\Open; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/H5/PayPlugin.php b/src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/H5/PayPlugin.php rename to src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php index cd1242a4f..510a23d74 100644 --- a/src/Plugin/Unipay/Pay/H5/PayPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/H5/PayPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\H5; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\H5; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/CancelPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/CancelPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php index a7c65cb74..5983df476 100644 --- a/src/Plugin/Unipay/Pay/QrCode/CancelPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/CancelPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/PosPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/PosPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/PosPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/PosPlugin.php index e887b819c..0944a182d 100644 --- a/src/Plugin/Unipay/Pay/QrCode/PosPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/PosPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/PosPreAuthPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/PosPreAuthPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/PosPreAuthPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/PosPreAuthPlugin.php index 2bb922b4d..5f6b5bb90 100644 --- a/src/Plugin/Unipay/Pay/QrCode/PosPreAuthPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/PosPreAuthPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/QueryPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/QueryPlugin.php similarity index 96% rename from src/Plugin/Unipay/Pay/QrCode/QueryPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/QueryPlugin.php index e870ecdf0..b8a6692a7 100644 --- a/src/Plugin/Unipay/Pay/QrCode/QueryPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/QueryPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/RefundPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/RefundPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php index 29786662b..83e94f1d7 100644 --- a/src/Plugin/Unipay/Pay/QrCode/RefundPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/RefundPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/ScanFeePlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/ScanFeePlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/ScanFeePlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/ScanFeePlugin.php index e15c93a51..f6089e314 100644 --- a/src/Plugin/Unipay/Pay/QrCode/ScanFeePlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/ScanFeePlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/ScanPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/ScanPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/ScanPlugin.php index bf4eb7a22..99970866d 100644 --- a/src/Plugin/Unipay/Pay/QrCode/ScanPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/ScanPreAuthPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPreAuthPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/ScanPreAuthPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/ScanPreAuthPlugin.php index fce92d971..afd9363c5 100644 --- a/src/Plugin/Unipay/Pay/QrCode/ScanPreAuthPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPreAuthPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/QrCode/ScanPreOrderPlugin.php b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPreOrderPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/QrCode/ScanPreOrderPlugin.php rename to src/Plugin/Unipay/Open/Pay/QrCode/ScanPreOrderPlugin.php index 5bcb646f3..4c4c9425f 100644 --- a/src/Plugin/Unipay/Pay/QrCode/ScanPreOrderPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/QrCode/ScanPreOrderPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\QrCode; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/Web/CancelPlugin.php b/src/Plugin/Unipay/Open/Pay/Web/CancelPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/Web/CancelPlugin.php rename to src/Plugin/Unipay/Open/Pay/Web/CancelPlugin.php index 076f82b11..5accf3051 100644 --- a/src/Plugin/Unipay/Pay/Web/CancelPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/Web/CancelPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\Web; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\Web; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/Web/PayPlugin.php b/src/Plugin/Unipay/Open/Pay/Web/PayPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/Web/PayPlugin.php rename to src/Plugin/Unipay/Open/Pay/Web/PayPlugin.php index 7dbfeecaa..58ac16165 100644 --- a/src/Plugin/Unipay/Pay/Web/PayPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/Web/PayPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\Web; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\Web; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/Web/QueryPlugin.php b/src/Plugin/Unipay/Open/Pay/Web/QueryPlugin.php similarity index 96% rename from src/Plugin/Unipay/Pay/Web/QueryPlugin.php rename to src/Plugin/Unipay/Open/Pay/Web/QueryPlugin.php index 7a1f3a9a8..e13e4df05 100644 --- a/src/Plugin/Unipay/Pay/Web/QueryPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/Web/QueryPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\Web; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\Web; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/Pay/Web/RefundPlugin.php b/src/Plugin/Unipay/Open/Pay/Web/RefundPlugin.php similarity index 97% rename from src/Plugin/Unipay/Pay/Web/RefundPlugin.php rename to src/Plugin/Unipay/Open/Pay/Web/RefundPlugin.php index 83958e081..8e8a41ffa 100644 --- a/src/Plugin/Unipay/Pay/Web/RefundPlugin.php +++ b/src/Plugin/Unipay/Open/Pay/Web/RefundPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay\Pay\Web; +namespace Yansongda\Pay\Plugin\Unipay\Open\Pay\Web; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Plugin/Unipay/ResponseHtmlPlugin.php b/src/Plugin/Unipay/Open/ResponseHtmlPlugin.php similarity index 96% rename from src/Plugin/Unipay/ResponseHtmlPlugin.php rename to src/Plugin/Unipay/Open/ResponseHtmlPlugin.php index d8c99e24e..6e46e30fc 100644 --- a/src/Plugin/Unipay/ResponseHtmlPlugin.php +++ b/src/Plugin/Unipay/Open/ResponseHtmlPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay; +namespace Yansongda\Pay\Plugin\Unipay\Open; use Closure; use GuzzleHttp\Psr7\Response; diff --git a/src/Plugin/Unipay/StartPlugin.php b/src/Plugin/Unipay/Open/StartPlugin.php similarity index 98% rename from src/Plugin/Unipay/StartPlugin.php rename to src/Plugin/Unipay/Open/StartPlugin.php index 98a17556c..6702dd1ca 100644 --- a/src/Plugin/Unipay/StartPlugin.php +++ b/src/Plugin/Unipay/Open/StartPlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay; +namespace Yansongda\Pay\Plugin\Unipay\Open; use Closure; use Yansongda\Pay\Contract\ConfigInterface; diff --git a/src/Plugin/Unipay/VerifySignaturePlugin.php b/src/Plugin/Unipay/Open/VerifySignaturePlugin.php similarity index 97% rename from src/Plugin/Unipay/VerifySignaturePlugin.php rename to src/Plugin/Unipay/Open/VerifySignaturePlugin.php index 6e1ad83ad..780cbee6c 100644 --- a/src/Plugin/Unipay/VerifySignaturePlugin.php +++ b/src/Plugin/Unipay/Open/VerifySignaturePlugin.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Yansongda\Pay\Plugin\Unipay; +namespace Yansongda\Pay\Plugin\Unipay\Open; use Closure; use Yansongda\Pay\Contract\PluginInterface; diff --git a/src/Provider/Unipay.php b/src/Provider/Unipay.php index aa0883627..fe4d8812c 100644 --- a/src/Provider/Unipay.php +++ b/src/Provider/Unipay.php @@ -17,11 +17,11 @@ use Yansongda\Pay\Pay; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\CallbackPlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\CallbackPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Pay\Rocket; use Yansongda\Supports\Collection; use Yansongda\Supports\Str; diff --git a/src/Shortcut/Unipay/CancelShortcut.php b/src/Shortcut/Unipay/CancelShortcut.php index eb3ee40e7..53e09cda1 100644 --- a/src/Shortcut/Unipay/CancelShortcut.php +++ b/src/Shortcut/Unipay/CancelShortcut.php @@ -9,16 +9,16 @@ use Yansongda\Pay\Exception\InvalidParamsException; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\CancelPlugin as QrCodeCancelPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\Web\CancelPlugin as webCancelPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\CancelPlugin as QrCodeCancelPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\Web\CancelPlugin as webCancelPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\AddPayloadSignaturePlugin as QraAddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\Pos\CancelPlugin as QraPosCancelQueryPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\StartPlugin as QraStartPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\VerifySignaturePlugin as QraVerifySignaturePlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; use Yansongda\Supports\Str; class CancelShortcut implements ShortcutInterface diff --git a/src/Shortcut/Unipay/H5Shortcut.php b/src/Shortcut/Unipay/H5Shortcut.php index e10e6bf38..968824dbb 100644 --- a/src/Shortcut/Unipay/H5Shortcut.php +++ b/src/Shortcut/Unipay/H5Shortcut.php @@ -7,11 +7,11 @@ use Yansongda\Pay\Contract\ShortcutInterface; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\H5\PayPlugin; -use Yansongda\Pay\Plugin\Unipay\ResponseHtmlPlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\H5\PayPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\ResponseHtmlPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; class H5Shortcut implements ShortcutInterface { diff --git a/src/Shortcut/Unipay/PosShortcut.php b/src/Shortcut/Unipay/PosShortcut.php index ea5153157..6cd265438 100644 --- a/src/Shortcut/Unipay/PosShortcut.php +++ b/src/Shortcut/Unipay/PosShortcut.php @@ -9,16 +9,16 @@ use Yansongda\Pay\Exception\InvalidParamsException; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\PosPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\PosPreAuthPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\PosPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\PosPreAuthPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\AddPayloadSignaturePlugin as QraAddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\Pos\PayPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\StartPlugin as QraStartPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\VerifySignaturePlugin as QraVerifySignaturePlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; use Yansongda\Supports\Str; class PosShortcut implements ShortcutInterface diff --git a/src/Shortcut/Unipay/QueryShortcut.php b/src/Shortcut/Unipay/QueryShortcut.php index 0d0afe194..e18e0b99c 100644 --- a/src/Shortcut/Unipay/QueryShortcut.php +++ b/src/Shortcut/Unipay/QueryShortcut.php @@ -9,17 +9,17 @@ use Yansongda\Pay\Exception\InvalidParamsException; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\QueryPlugin as QrCodeQueryPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\Web\QueryPlugin as WebQueryPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\QueryPlugin as QrCodeQueryPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\Web\QueryPlugin as WebQueryPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\AddPayloadSignaturePlugin as QraAddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\Pos\QueryPlugin as QraPosQueryPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\Pos\QueryRefundPlugin as QraPosQueryRefundPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\StartPlugin as QraStartPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\VerifySignaturePlugin as QraVerifySignaturePlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; use Yansongda\Supports\Str; class QueryShortcut implements ShortcutInterface diff --git a/src/Shortcut/Unipay/RefundShortcut.php b/src/Shortcut/Unipay/RefundShortcut.php index 0e4440ec3..ad170aaec 100644 --- a/src/Shortcut/Unipay/RefundShortcut.php +++ b/src/Shortcut/Unipay/RefundShortcut.php @@ -9,16 +9,16 @@ use Yansongda\Pay\Exception\InvalidParamsException; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\RefundPlugin as QrCodeRefundPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\Web\RefundPlugin as OnlineGatewayRefundPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\RefundPlugin as QrCodeRefundPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\Web\RefundPlugin as OnlineGatewayRefundPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\AddPayloadSignaturePlugin as QraAddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\Qra\Pos\RefundPlugin as QraPosRefundPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\StartPlugin as QraStartPlugin; use Yansongda\Pay\Plugin\Unipay\Qra\VerifySignaturePlugin as QraVerifySignaturePlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; use Yansongda\Supports\Str; class RefundShortcut implements ShortcutInterface diff --git a/src/Shortcut/Unipay/ScanShortcut.php b/src/Shortcut/Unipay/ScanShortcut.php index 3a08cd0c1..8dc5d38fa 100644 --- a/src/Shortcut/Unipay/ScanShortcut.php +++ b/src/Shortcut/Unipay/ScanShortcut.php @@ -9,14 +9,14 @@ use Yansongda\Pay\Exception\InvalidParamsException; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\ScanFeePlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\ScanPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\ScanPreAuthPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\QrCode\ScanPreOrderPlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; -use Yansongda\Pay\Plugin\Unipay\VerifySignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\ScanFeePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\ScanPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\ScanPreAuthPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\QrCode\ScanPreOrderPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\VerifySignaturePlugin; use Yansongda\Supports\Str; class ScanShortcut implements ShortcutInterface diff --git a/src/Shortcut/Unipay/WebShortcut.php b/src/Shortcut/Unipay/WebShortcut.php index fbf598f6c..88aecf5b2 100644 --- a/src/Shortcut/Unipay/WebShortcut.php +++ b/src/Shortcut/Unipay/WebShortcut.php @@ -7,11 +7,11 @@ use Yansongda\Pay\Contract\ShortcutInterface; use Yansongda\Pay\Plugin\ParserPlugin; use Yansongda\Pay\Plugin\Unipay\AddPayloadBodyPlugin; -use Yansongda\Pay\Plugin\Unipay\AddPayloadSignaturePlugin; use Yansongda\Pay\Plugin\Unipay\AddRadarPlugin; -use Yansongda\Pay\Plugin\Unipay\Pay\Web\PayPlugin; -use Yansongda\Pay\Plugin\Unipay\ResponseHtmlPlugin; -use Yansongda\Pay\Plugin\Unipay\StartPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\AddPayloadSignaturePlugin; +use Yansongda\Pay\Plugin\Unipay\Open\Pay\Web\PayPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\ResponseHtmlPlugin; +use Yansongda\Pay\Plugin\Unipay\Open\StartPlugin; class WebShortcut implements ShortcutInterface { diff --git a/tests/Plugin/Unipay/AddPayloadSignaturePluginTest.php b/tests/Plugin/Unipay/Open/AddPayloadSignaturePluginTest.php similarity index 95% rename from tests/Plugin/Unipay/AddPayloadSignaturePluginTest.php rename to tests/Plugin/Unipay/Open/AddPayloadSignaturePluginTest.php index 625ffd316..124b13546 100644 --- a/tests/Plugin/Unipay/AddPayloadSignaturePluginTest.php +++ b/tests/Plugin/Unipay/Open/AddPayloadSignaturePluginTest.php @@ -1,11 +1,11 @@ '', 'bizType' => '2', 'accessType' => '1', - 'merId' => '777290058167151', 'currencyCode' => '156', + 'merId' => '777290058167151', 'channelType' => '5', 'signMethod' => '01', 'txnType' => '3', @@ -68,8 +68,8 @@ public function testNormal() 'signature' => '', 'bizType' => '000201', 'accessType' => '0', - 'merId' => '777290058167151', 'currencyCode' => '156', + 'merId' => '777290058167151', 'channelType' => '07', 'signMethod' => '01', 'txnType' => '01', diff --git a/tests/Plugin/Unipay/Pay/QrCode/CancelPluginTest.php b/tests/Plugin/Unipay/Open/Pay/QrCode/CancelPluginTest.php similarity index 94% rename from tests/Plugin/Unipay/Pay/QrCode/CancelPluginTest.php rename to tests/Plugin/Unipay/Open/Pay/QrCode/CancelPluginTest.php index 6285eccdc..a77510d0f 100644 --- a/tests/Plugin/Unipay/Pay/QrCode/CancelPluginTest.php +++ b/tests/Plugin/Unipay/Open/Pay/QrCode/CancelPluginTest.php @@ -1,9 +1,9 @@ '', 'bizType' => '2', 'accessType' => '1', - 'currencyCode' => '156', 'merId' => '777290058167151', + 'currencyCode' => '156', 'channelType' => '5', 'signMethod' => '01', 'txnType' => '3', @@ -68,8 +68,8 @@ public function testNormal() 'signature' => '', 'bizType' => '000201', 'accessType' => '0', - 'currencyCode' => '156', 'merId' => '777290058167151', + 'currencyCode' => '156', 'channelType' => '07', 'signMethod' => '01', 'txnType' => '01', diff --git a/tests/Plugin/Unipay/Pay/Web/QueryPluginTest.php b/tests/Plugin/Unipay/Open/Pay/Web/QueryPluginTest.php similarity index 94% rename from tests/Plugin/Unipay/Pay/Web/QueryPluginTest.php rename to tests/Plugin/Unipay/Open/Pay/Web/QueryPluginTest.php index 064f5ebd1..b5bad1c50 100644 --- a/tests/Plugin/Unipay/Pay/Web/QueryPluginTest.php +++ b/tests/Plugin/Unipay/Open/Pay/Web/QueryPluginTest.php @@ -1,9 +1,9 @@