From 2d97a303d76ac693ecea111221eef913d45bf26f Mon Sep 17 00:00:00 2001 From: yansongda Date: Thu, 20 Apr 2023 20:29:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?change:=20=5Ftype=20=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=AE=9A=E4=B9=89=E4=B8=BA=E6=B8=A0=E9=81=93?= =?UTF-8?q?id=EF=BC=8C=E5=A6=82:=20=E5=B0=8F=E7=A8=8B=E5=BA=8Fid=EF=BC=8C?= =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7id=E7=AD=89=EF=BC=9B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20=5Faction=20=E4=B8=BA=E6=93=8D=E4=BD=9C=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E7=94=A8=E4=BA=8E=20shortcut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .php-cs-fixer.php | 2 ++ CHANGELOG.md | 1 + src/Exception/Exception.php | 2 +- src/Plugin/Alipay/Shortcut/QueryShortcut.php | 4 ++-- src/Plugin/Unipay/Shortcut/CancelShortcut.php | 4 ++-- src/Plugin/Unipay/Shortcut/PosShortcut.php | 4 ++-- src/Plugin/Unipay/Shortcut/QueryShortcut.php | 4 ++-- src/Plugin/Unipay/Shortcut/RefundShortcut.php | 4 ++-- src/Plugin/Unipay/Shortcut/ScanShortcut.php | 4 ++-- src/Plugin/Wechat/Papay/ApplyPlugin.php | 2 ++ src/Plugin/Wechat/Papay/ContractOrderPlugin.php | 2 ++ src/Plugin/Wechat/Papay/OnlyContractPlugin.php | 2 ++ src/Plugin/Wechat/Shortcut/CloseShortcut.php | 4 ++-- src/Plugin/Wechat/Shortcut/QueryShortcut.php | 4 ++-- tests/Plugin/Alipay/Shortcut/QueryShortcutTest.php | 10 +++++----- tests/Plugin/Unipay/Shortcut/CancelShortcutTest.php | 8 ++++---- tests/Plugin/Unipay/Shortcut/PosShortcutTest.php | 8 ++++---- tests/Plugin/Unipay/Shortcut/QueryShortcutTest.php | 8 ++++---- tests/Plugin/Unipay/Shortcut/RefundShortcutTest.php | 6 +++--- tests/Plugin/Unipay/Shortcut/ScanShortcutTest.php | 12 ++++++------ tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php | 6 +++--- tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php | 10 +++++----- tests/Provider/AlipayTest.php | 4 ++-- 23 files changed, 62 insertions(+), 53 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 188ec4afc..30db5bdf4 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,8 +7,10 @@ return (new PhpCsFixer\Config()) ->setUsingCache(false) + ->setRiskyAllowed(true) ->setRules([ '@PhpCsFixer' => true, + 'declare_strict_types' => true, 'single_line_comment_style' => ['comment_types' => ['hash']], 'general_phpdoc_annotation_remove' => ['annotations' => ['author'], 'case_sensitive' => false], 'global_namespace_import' => [ diff --git a/CHANGELOG.md b/CHANGELOG.md index cc0573569..7f5f0b1b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - change: ParserInterface 签名由 `?ResponseInterface $response` 变更为 `PackerInterface $packer, ?ResponseInterface $response`(#754) - change: \Yansongda\Pay\Plugin\Wechat\RadarSignPlugin 增加 `__construct(JsonPacker $jsonPacker, XmlPacker $xmlPacker)` 方法(#753) - change: 所有 `Parser` 更名为 `Direction`(#770, #774) +- change: '_type' 类型统一定义为渠道id,如: 小程序id,公众号id等;增加 '_action' 为操作类型用于 shortcut(#781) ## v3.2.14 diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index 9f38eb848..247c94d98 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -56,7 +56,7 @@ class Exception extends \Exception public const PLUGIN_ERROR = 4002; - public const SHORTCUT_MULTI_TYPE_ERROR = 4003; + public const SHORTCUT_MULTI_ACTION_ERROR = 4003; public const METHOD_NOT_SUPPORTED = 4004; diff --git a/src/Plugin/Alipay/Shortcut/QueryShortcut.php b/src/Plugin/Alipay/Shortcut/QueryShortcut.php index d3436a31e..f409dc21e 100644 --- a/src/Plugin/Alipay/Shortcut/QueryShortcut.php +++ b/src/Plugin/Alipay/Shortcut/QueryShortcut.php @@ -19,7 +19,7 @@ class QueryShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (isset($params['out_request_no'])) { return $this->refundPlugins(); @@ -29,7 +29,7 @@ public function getPlugins(array $params): array return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Query type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Query action [{$typeMethod}] not supported"); } protected function defaultPlugins(): array diff --git a/src/Plugin/Unipay/Shortcut/CancelShortcut.php b/src/Plugin/Unipay/Shortcut/CancelShortcut.php index ce27828cf..49bf5d087 100644 --- a/src/Plugin/Unipay/Shortcut/CancelShortcut.php +++ b/src/Plugin/Unipay/Shortcut/CancelShortcut.php @@ -17,13 +17,13 @@ class CancelShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Cancel type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Cancel action [{$typeMethod}] not supported"); } public function defaultPlugins(): array diff --git a/src/Plugin/Unipay/Shortcut/PosShortcut.php b/src/Plugin/Unipay/Shortcut/PosShortcut.php index aa4444dbc..b5caadd74 100644 --- a/src/Plugin/Unipay/Shortcut/PosShortcut.php +++ b/src/Plugin/Unipay/Shortcut/PosShortcut.php @@ -18,13 +18,13 @@ class PosShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Pos type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Pos action [{$typeMethod}] not supported"); } public function defaultPlugins(): array diff --git a/src/Plugin/Unipay/Shortcut/QueryShortcut.php b/src/Plugin/Unipay/Shortcut/QueryShortcut.php index e091988a2..3040663cb 100644 --- a/src/Plugin/Unipay/Shortcut/QueryShortcut.php +++ b/src/Plugin/Unipay/Shortcut/QueryShortcut.php @@ -17,13 +17,13 @@ class QueryShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Query type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Query action [{$typeMethod}] not supported"); } public function defaultPlugins(): array diff --git a/src/Plugin/Unipay/Shortcut/RefundShortcut.php b/src/Plugin/Unipay/Shortcut/RefundShortcut.php index a8b2a5b06..a23a57dbc 100644 --- a/src/Plugin/Unipay/Shortcut/RefundShortcut.php +++ b/src/Plugin/Unipay/Shortcut/RefundShortcut.php @@ -17,13 +17,13 @@ class RefundShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Refund type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Refund action [{$typeMethod}] not supported"); } public function defaultPlugins(): array diff --git a/src/Plugin/Unipay/Shortcut/ScanShortcut.php b/src/Plugin/Unipay/Shortcut/ScanShortcut.php index 31f13053d..eebb0dce4 100644 --- a/src/Plugin/Unipay/Shortcut/ScanShortcut.php +++ b/src/Plugin/Unipay/Shortcut/ScanShortcut.php @@ -20,13 +20,13 @@ class ScanShortcut implements ShortcutInterface */ public function getPlugins(array $params): array { - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Scan type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Scan action [{$typeMethod}] not supported"); } public function defaultPlugins(): array diff --git a/src/Plugin/Wechat/Papay/ApplyPlugin.php b/src/Plugin/Wechat/Papay/ApplyPlugin.php index 27080c38d..5443b00fe 100644 --- a/src/Plugin/Wechat/Papay/ApplyPlugin.php +++ b/src/Plugin/Wechat/Papay/ApplyPlugin.php @@ -1,5 +1,7 @@ combinePlugins(); } - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Query type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Query action [{$typeMethod}] not supported"); } protected function defaultPlugins(): array diff --git a/src/Plugin/Wechat/Shortcut/QueryShortcut.php b/src/Plugin/Wechat/Shortcut/QueryShortcut.php index 408519cb9..312f9b969 100644 --- a/src/Plugin/Wechat/Shortcut/QueryShortcut.php +++ b/src/Plugin/Wechat/Shortcut/QueryShortcut.php @@ -22,13 +22,13 @@ public function getPlugins(array $params): array return $this->combinePlugins(); } - $typeMethod = Str::camel($params['_type'] ?? 'default').'Plugins'; + $typeMethod = Str::camel($params['_action'] ?? 'default').'Plugins'; if (method_exists($this, $typeMethod)) { return $this->{$typeMethod}(); } - throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Query type [{$typeMethod}] not supported"); + throw new InvalidParamsException(Exception::SHORTCUT_MULTI_ACTION_ERROR, "Query action [{$typeMethod}] not supported"); } protected function defaultPlugins(): array diff --git a/tests/Plugin/Alipay/Shortcut/QueryShortcutTest.php b/tests/Plugin/Alipay/Shortcut/QueryShortcutTest.php index b5032e24e..5eb238f9d 100644 --- a/tests/Plugin/Alipay/Shortcut/QueryShortcutTest.php +++ b/tests/Plugin/Alipay/Shortcut/QueryShortcutTest.php @@ -34,22 +34,22 @@ public function testRefund() { self::assertEquals([ FastRefundQueryPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'refund'])); + ], $this->plugin->getPlugins(['_action' => 'refund'])); } public function testTransfer() { self::assertEquals([ TransCommonQueryPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'transfer'])); + ], $this->plugin->getPlugins(['_action' => 'transfer'])); } public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Query type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Query action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Unipay/Shortcut/CancelShortcutTest.php b/tests/Plugin/Unipay/Shortcut/CancelShortcutTest.php index fd9f010cf..d04bd2cba 100644 --- a/tests/Plugin/Unipay/Shortcut/CancelShortcutTest.php +++ b/tests/Plugin/Unipay/Shortcut/CancelShortcutTest.php @@ -32,15 +32,15 @@ public function testQrCode() { self::assertEquals([ \Yansongda\Pay\Plugin\Unipay\QrCode\CancelPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'qr_code'])); + ], $this->plugin->getPlugins(['_action' => 'qr_code'])); } public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Cancel type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Cancel action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Unipay/Shortcut/PosShortcutTest.php b/tests/Plugin/Unipay/Shortcut/PosShortcutTest.php index d517ff368..6d718e0b2 100644 --- a/tests/Plugin/Unipay/Shortcut/PosShortcutTest.php +++ b/tests/Plugin/Unipay/Shortcut/PosShortcutTest.php @@ -33,15 +33,15 @@ public function testPreAuth() { self::assertEquals([ PosPreAuthPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'pre_auth'])); + ], $this->plugin->getPlugins(['_action' => 'pre_auth'])); } public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Pos type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Pos action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Unipay/Shortcut/QueryShortcutTest.php b/tests/Plugin/Unipay/Shortcut/QueryShortcutTest.php index 811fe5b7c..75211f04b 100644 --- a/tests/Plugin/Unipay/Shortcut/QueryShortcutTest.php +++ b/tests/Plugin/Unipay/Shortcut/QueryShortcutTest.php @@ -32,15 +32,15 @@ public function testQrCode() { self::assertEquals([ \Yansongda\Pay\Plugin\Unipay\QrCode\QueryPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'qr_code'])); + ], $this->plugin->getPlugins(['_action' => 'qr_code'])); } public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Query type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Query action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Unipay/Shortcut/RefundShortcutTest.php b/tests/Plugin/Unipay/Shortcut/RefundShortcutTest.php index 60f6110cb..ae9125236 100644 --- a/tests/Plugin/Unipay/Shortcut/RefundShortcutTest.php +++ b/tests/Plugin/Unipay/Shortcut/RefundShortcutTest.php @@ -31,14 +31,14 @@ public function testQrCode() { self::assertEquals([ \Yansongda\Pay\Plugin\Unipay\QrCode\RefundPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'qr_code'])); + ], $this->plugin->getPlugins(['_action' => 'qr_code'])); } public function testFoo() { $this->expectException(InvalidParamsException::class); - $this->expectExceptionMessage('Refund type [fooPlugins] not supported'); + $this->expectExceptionMessage('Refund action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Unipay/Shortcut/ScanShortcutTest.php b/tests/Plugin/Unipay/Shortcut/ScanShortcutTest.php index f81d047a6..8e4522934 100644 --- a/tests/Plugin/Unipay/Shortcut/ScanShortcutTest.php +++ b/tests/Plugin/Unipay/Shortcut/ScanShortcutTest.php @@ -35,29 +35,29 @@ public function testPreAuth() { self::assertEquals([ ScanPreAuthPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'pre_auth'])); + ], $this->plugin->getPlugins(['_action' => 'pre_auth'])); } public function testPreOrder() { self::assertEquals([ ScanPreOrderPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'pre_order'])); + ], $this->plugin->getPlugins(['_action' => 'pre_order'])); } public function testFee() { self::assertEquals([ ScanFeePlugin::class, - ], $this->plugin->getPlugins(['_type' => 'fee'])); + ], $this->plugin->getPlugins(['_action' => 'fee'])); } public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Scan type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Scan action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php b/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php index b38129a41..2e78367a2 100644 --- a/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php +++ b/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php @@ -50,9 +50,9 @@ public function testCombineParams() public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Query type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Query action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php b/tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php index 7d3f3057f..17c6d433f 100644 --- a/tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php +++ b/tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php @@ -33,14 +33,14 @@ public function testRefund() { self::assertEquals([ QueryRefundPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'refund'])); + ], $this->plugin->getPlugins(['_action' => 'refund'])); } public function testCombine() { self::assertEquals([ \Yansongda\Pay\Plugin\Wechat\Pay\Combine\QueryPlugin::class, - ], $this->plugin->getPlugins(['_type' => 'combine'])); + ], $this->plugin->getPlugins(['_action' => 'combine'])); } public function testCombineParams() @@ -53,9 +53,9 @@ public function testCombineParams() public function testFoo() { self::expectException(InvalidParamsException::class); - self::expectExceptionCode(Exception::SHORTCUT_MULTI_TYPE_ERROR); - self::expectExceptionMessage('Query type [fooPlugins] not supported'); + self::expectExceptionCode(Exception::SHORTCUT_MULTI_ACTION_ERROR); + self::expectExceptionMessage('Query action [fooPlugins] not supported'); - $this->plugin->getPlugins(['_type' => 'foo']); + $this->plugin->getPlugins(['_action' => 'foo']); } } diff --git a/tests/Provider/AlipayTest.php b/tests/Provider/AlipayTest.php index c3ec24d45..2467f886e 100644 --- a/tests/Provider/AlipayTest.php +++ b/tests/Provider/AlipayTest.php @@ -89,7 +89,7 @@ public function testFindTransfer() $http->shouldReceive('sendRequest')->andReturn(new Response(200, [], json_encode($response))); Pay::set(HttpClientInterface::class, $http); - $result = Pay::alipay()->find(['out_biz_no' => '202209032319', '_type' => 'transfer']); + $result = Pay::alipay()->find(['out_biz_no' => '202209032319', '_action' => 'transfer']); self::assertEqualsCanonicalizing($response['alipay_fund_trans_common_query_response'], $result->all()); } @@ -118,7 +118,7 @@ public function testFindRefund() $result = Pay::alipay()->find([ 'out_trade_no' => '1623160012', 'out_request_no' => '1623160012', - '_type' => 'refund' + '_action' => 'refund' ]); self::assertEqualsCanonicalizing($response['alipay_trade_fastpay_refund_query_response'], $result->all()); From 24d2a5f4b60a15b40c6a2d6ccb8c038a02b77bb4 Mon Sep 17 00:00:00 2001 From: yansongda Date: Thu, 20 Apr 2023 20:31:42 +0800 Subject: [PATCH 2/2] update --- tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php b/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php index 2e78367a2..345e70b04 100644 --- a/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php +++ b/tests/Plugin/Wechat/Shortcut/CloseShortcutTest.php @@ -33,7 +33,7 @@ public function testCombine() { self::assertEquals([ \Yansongda\Pay\Plugin\Wechat\Pay\Combine\ClosePlugin::class, - ], $this->plugin->getPlugins(['_type' => 'combine'])); + ], $this->plugin->getPlugins(['_action' => 'combine'])); } public function testCombineParams()