diff --git a/README.md b/README.md index 9ff572d..87cc771 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The Payum extension to rapidly build new extensions. $ composer create-project payum-tw/ecpay ``` -2. Replace all occurrences of `payum` with your vendor name. It may be your github name, for now let's say you choose: `acme`. +2. Replace all occurrences of `payum` with your vendor name. It may be your github name, for now let's say you choose: `ecpay`. 3. Replace all occurrences of `ecpay` with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: `ecpay`. 4. Register a gateway factory to the payum's builder and create a gateway: @@ -42,8 +42,7 @@ $payum = (new PayumBuilder) 'sandbox' => true, ]) - ->getPayum() -; + ->getPayum(); ``` 5. While using the gateway implement all method where you get `Not implemented` exception: diff --git a/src/Action/CancelAction.php b/src/Action/CancelAction.php index 3e29e7e..7962ac2 100644 --- a/src/Action/CancelAction.php +++ b/src/Action/CancelAction.php @@ -2,7 +2,6 @@ namespace PayumTW\Ecpay\Action; -use Payum\Core\Request\Sync; use Payum\Core\Request\Cancel; use Payum\Core\GatewayAwareTrait; use Payum\Core\GatewayAwareInterface; diff --git a/src/Action/CaptureAction.php b/src/Action/CaptureAction.php index 621c93c..64f94bc 100644 --- a/src/Action/CaptureAction.php +++ b/src/Action/CaptureAction.php @@ -2,18 +2,17 @@ namespace PayumTW\Ecpay\Action; -use Payum\Core\Request\Sync; use Payum\Core\Request\Capture; use Payum\Core\GatewayAwareTrait; use Payum\Core\GatewayAwareInterface; use Payum\Core\Action\ActionInterface; use Payum\Core\Bridge\Spl\ArrayObject; use Payum\Core\Request\GetHttpRequest; +use PayumTW\Ecpay\Action\Api\BaseApiAwareAction; use PayumTW\Ecpay\Request\Api\CreateTransaction; use Payum\Core\Exception\RequestNotSupportedException; use Payum\Core\Security\GenericTokenFactoryAwareTrait; use Payum\Core\Security\GenericTokenFactoryAwareInterface; -use PayumTW\Ecpay\Action\Api\BaseApiAwareAction; class CaptureAction extends BaseApiAwareAction implements ActionInterface, GatewayAwareInterface, GenericTokenFactoryAwareInterface { diff --git a/src/Action/CaptureLogisticsAction.php b/src/Action/CaptureLogisticsAction.php index 39e816c..06ae240 100644 --- a/src/Action/CaptureLogisticsAction.php +++ b/src/Action/CaptureLogisticsAction.php @@ -9,11 +9,11 @@ use Payum\Core\Action\ActionInterface; use Payum\Core\Bridge\Spl\ArrayObject; use Payum\Core\Request\GetHttpRequest; +use PayumTW\Ecpay\Action\Api\BaseApiAwareAction; use PayumTW\Ecpay\Request\Api\CreateTransaction; use Payum\Core\Exception\RequestNotSupportedException; use Payum\Core\Security\GenericTokenFactoryAwareTrait; use Payum\Core\Security\GenericTokenFactoryAwareInterface; -use PayumTW\Ecpay\Action\Api\BaseApiAwareAction; class CaptureLogisticsAction extends BaseApiAwareAction implements ActionInterface, GatewayAwareInterface, GenericTokenFactoryAwareInterface { diff --git a/src/Action/NotifyAction.php b/src/Action/NotifyAction.php index abfb23c..949be2d 100644 --- a/src/Action/NotifyAction.php +++ b/src/Action/NotifyAction.php @@ -2,7 +2,6 @@ namespace PayumTW\Ecpay\Action; -use Payum\Core\Request\Sync; use Payum\Core\Request\Notify; use Payum\Core\GatewayAwareTrait; use Payum\Core\Reply\HttpResponse; diff --git a/src/Action/RefundAction.php b/src/Action/RefundAction.php index fc3df15..09d6952 100644 --- a/src/Action/RefundAction.php +++ b/src/Action/RefundAction.php @@ -2,7 +2,6 @@ namespace PayumTW\Ecpay\Action; -use Payum\Core\Request\Sync; use Payum\Core\Request\Refund; use Payum\Core\GatewayAwareTrait; use Payum\Core\GatewayAwareInterface; diff --git a/src/Action/SyncAction.php b/src/Action/SyncAction.php index d5e7cf0..932305b 100644 --- a/src/Action/SyncAction.php +++ b/src/Action/SyncAction.php @@ -7,7 +7,6 @@ use Payum\Core\GatewayAwareInterface; use Payum\Core\Action\ActionInterface; use Payum\Core\Bridge\Spl\ArrayObject; -use Payum\Core\Request\GetHttpRequest; use PayumTW\Ecpay\Request\Api\GetTransactionData; use Payum\Core\Exception\RequestNotSupportedException; diff --git a/tests/Action/Api/CreateTransactionActionTest.php b/tests/Action/Api/CreateTransactionActionTest.php index a1ab566..1c28beb 100644 --- a/tests/Action/Api/CreateTransactionActionTest.php +++ b/tests/Action/Api/CreateTransactionActionTest.php @@ -24,7 +24,7 @@ public function test_api_http_post_redirect() $request = m::spy('PayumTW\Ecpay\Request\Api\CreateTransaction'); $details = new ArrayObject([ 'foo' => 'bar', - 'GoodsAmount' => 1 + 'GoodsAmount' => 1, ]); $endpoint = 'foo.endpoint'; @@ -120,7 +120,7 @@ public function test_logistics_api_when_isset_rtn_code() $request = m::spy('PayumTW\Ecpay\Request\Api\CreateTransaction'); $details = new ArrayObject([ 'RtnCode' => '300', - 'GoodsAmount' => 1 + 'GoodsAmount' => 1, ]); /*