Skip to content

Commit

Permalink
[skeleton] Remove deprecated features from skeleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Sep 12, 2016
1 parent 5fdd462 commit 67a7cab
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 29 deletions.
23 changes: 8 additions & 15 deletions Action/Api/BaseApiAwareAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,18 @@

use Payum\Core\Action\ActionInterface;
use Payum\Core\ApiAwareInterface;
use Payum\Core\Exception\UnsupportedApiException;
use Payum\Core\ApiAwareTrait;
use Payum\Core\GatewayAwareInterface;
use Payum\Core\GatewayAwareTrait;
use Payum\Skeleton\Api;

abstract class BaseApiAwareAction implements ActionInterface, ApiAwareInterface
abstract class BaseApiAwareAction implements ActionInterface, GatewayAwareInterface, ApiAwareInterface
{
/**
* @var Api
*/
protected $api;
use GatewayAwareTrait;
use ApiAwareTrait;

/**
* {@inheritDoc}
*/
public function setApi($api)
public function __construct()
{
if (false == $api instanceof Api) {
throw new UnsupportedApiException(sprintf('Not supported. Expected %s instance to be set as api.', Api::class));
}

$this->api = $api;
$this->apiClass = Api::class;
}
}
7 changes: 5 additions & 2 deletions Action/AuthorizeAction.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php
namespace Payum\Skeleton\Action;

use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Authorize;
use Payum\Core\Exception\RequestNotSupportedException;

class AuthorizeAction extends GatewayAwareAction
class AuthorizeAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down
7 changes: 5 additions & 2 deletions Action/CancelAction.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php
namespace Payum\Skeleton\Action;

use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Cancel;

class CancelAction extends GatewayAwareAction
class CancelAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down
7 changes: 5 additions & 2 deletions Action/CaptureAction.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php
namespace Payum\Skeleton\Action;

use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Capture;
use Payum\Core\Exception\RequestNotSupportedException;

class CaptureAction extends GatewayAwareAction
class CaptureAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down
8 changes: 4 additions & 4 deletions Action/ConvertPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
namespace Payum\Skeleton\Action;

use Payum\Core\Action\ActionInterface;
use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Model\PaymentInterface;
use Payum\Core\Request\Convert;
use Payum\Core\Request\GetCurrency;

class ConvertPaymentAction extends GatewayAwareAction
class ConvertPaymentAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down
7 changes: 5 additions & 2 deletions Action/NotifyAction.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php
namespace Payum\Skeleton\Action;

use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Notify;

class NotifyAction extends GatewayAwareAction
class NotifyAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down
7 changes: 5 additions & 2 deletions Action/RefundAction.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?php
namespace Payum\Skeleton\Action;

use Payum\Core\Action\GatewayAwareAction;
use Payum\Core\Action\ActionInterface;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\GatewayAwareTrait;
use Payum\Core\Request\Refund;

class RefundAction extends GatewayAwareAction
class RefundAction implements ActionInterface
{
use GatewayAwareTrait;

/**
* {@inheritDoc}
*
Expand Down

0 comments on commit 67a7cab

Please sign in to comment.