From 82a0dd15af8ffe9cb39665e42f32931e3eac8c7f Mon Sep 17 00:00:00 2001 From: Dmitry Fedyuk Date: Tue, 14 Mar 2017 09:15:42 +0300 Subject: [PATCH] 1.8.0 --- Controller/Index/Index.php | 2 +- Facade/Refund.php | 2 +- Webhook.php => W/Handler.php | 12 ++++---- W/Handler/Charge/Captured.php | 34 ++++++++++++++++++++++ {Webhook => W/Handler}/Charge/Refunded.php | 32 +++++++++++++------- WebhookF.php => W/Reader.php | 16 +++++----- Webhook/Charge/Captured.php | 24 --------------- composer.json | 4 +-- 8 files changed, 72 insertions(+), 54 deletions(-) rename Webhook.php => W/Handler.php (78%) create mode 100644 W/Handler/Charge/Captured.php rename {Webhook => W/Handler}/Charge/Refunded.php (58%) rename WebhookF.php => W/Reader.php (73%) delete mode 100644 Webhook/Charge/Captured.php diff --git a/Controller/Index/Index.php b/Controller/Index/Index.php index 3a40e5b..a3e6732 100644 --- a/Controller/Index/Index.php +++ b/Controller/Index/Index.php @@ -2,4 +2,4 @@ namespace Dfe\Stripe\Controller\Index; // 2017-02-14 /** @final Unable to use the PHP «final» keyword here because of the M2 code generation. */ -class Index extends \Df\Payment\WebhookA {} \ No newline at end of file +class Index extends \Df\Payment\W\Action {} \ No newline at end of file diff --git a/Facade/Refund.php b/Facade/Refund.php index f568d91..5c708cd 100644 --- a/Facade/Refund.php +++ b/Facade/Refund.php @@ -34,7 +34,7 @@ final class Refund extends \Df\StripeClone\Facade\Refund { * $r->{'balance_transaction'} * * 2017-02-14 - * Этот же идентификатор должен возвращать @see \Dfe\Stripe\Webhook\Charge\Refunded::eTransId() + * Этот же идентификатор должен возвращать @see \Dfe\Stripe\W\Handler\Charge\Refunded::eTransId() * * @override * @see \Df\StripeClone\Facade\Refund::transId() diff --git a/Webhook.php b/W/Handler.php similarity index 78% rename from Webhook.php rename to W/Handler.php index 81a1735..4a2c5b2 100644 --- a/Webhook.php +++ b/W/Handler.php @@ -1,11 +1,11 @@ ro('refunds/data'))['amount'];} @@ -16,9 +17,9 @@ function amount() {return df_last($this->ro('refunds/data'))['amount'];} /** * 2017-01-06 * @override - * @see \Df\StripeClone\Webhook::currentTransactionType() - * @used-by \Df\StripeClone\Webhook::id() - * @used-by \Df\StripeClone\WebhookStrategy::currentTransactionType() + * @see \Df\StripeClone\W\Handler::currentTransactionType() + * @used-by \Df\StripeClone\W\Handler::id() + * @used-by \Df\StripeClone\W\Strategy::currentTransactionType() * @return string */ function currentTransactionType() {return M::T_REFUND;} @@ -32,8 +33,8 @@ function currentTransactionType() {return M::T_REFUND;} * Это должен быть тот же самый идентификатор, * который возвращает @see \Dfe\Stripe\Facade\Refund::transId() * @override - * @see \Df\StripeClone\Webhook\IRefund::eTransId() - * @used-by \Df\StripeClone\WebhookStrategy\Charge\Refunded::handle() + * @see \Df\StripeClone\W\IRefund::eTransId() + * @used-by \Df\StripeClone\W\Strategy\Charge\Refunded::handle() * @return string */ function eTransId() {return df_last($this->ro('refunds/data'))['balance_transaction'];} @@ -41,9 +42,18 @@ function eTransId() {return df_last($this->ro('refunds/data'))['balance_transact /** * 2016-12-16 * @override - * @see \Dfe\Stripe\Webhook::parentTransactionType() - * @used-by \Dfe\Stripe\Webhook::adaptParentId() + * @see \Dfe\Stripe\W\Handler::parentTransactionType() + * @used-by \Dfe\Stripe\W\Handler::adaptParentId() * @return string */ protected function parentTransactionType() {return M::T_CAPTURE;} + + /** + * 2017-03-13 + * @override + * @see \Df\StripeClone\W\Handler::strategyC() + * @used-by \Df\StripeClone\W\Handler::_handle() + * @return string + */ + protected function strategyC() {return Strategy::class;} } \ No newline at end of file diff --git a/WebhookF.php b/W/Reader.php similarity index 73% rename from WebhookF.php rename to W/Reader.php index fef1ce5..e237c36 100644 --- a/WebhookF.php +++ b/W/Reader.php @@ -1,7 +1,7 @@ =2.1.1", "stripe/stripe-php": "3.*"} + ,"require": {"mage2pro/core": ">=2.2.0", "stripe/stripe-php": "3.*"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Stripe\\": ""}} ,"keywords": [ "API"