@@ -29,20 +29,20 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * {@inheritdoc} |
| 31 | 31 | */ |
| 32 | - public function __construct( RequestInterface $request, $data ) |
|
| 32 | + public function __construct(RequestInterface $request, $data) |
|
| 33 | 33 | { |
| 34 | - parent::__construct( $request, $data ); |
|
| 34 | + parent::__construct($request, $data); |
|
| 35 | 35 | |
| 36 | 36 | $signKey = $this->request->getTestMode( ) ? $this->request->getTestKey( ) : $this->request->getSignKey( ); |
| 37 | - $signExpected = $this->request->calculateSign( $this->data, $signKey ); |
|
| 37 | + $signExpected = $this->request->calculateSign($this->data, $signKey); |
|
| 38 | 38 | |
| 39 | - if( $this->getCheckoutId( ) !== $this->request->getCheckoutId( ) ) |
|
| 39 | + if ($this->getCheckoutId( ) !== $this->request->getCheckoutId( )) |
|
| 40 | 40 | { |
| 41 | 41 | $this->errorMessage = 'Wrong checkout ID'; |
| 42 | 42 | exit; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if( $this->getSign( ) !== $signExpected ) |
|
| 45 | + if ($this->getSign( ) !== $signExpected) |
|
| 46 | 46 | { |
| 47 | 47 | $this->errorMessage = 'Failed to validate signature'; |
| 48 | 48 | exit; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function isSuccessful( ) |
| 58 | 58 | { |
| 59 | - if( !empty( $this->errorMessage ) ) |
|
| 59 | + if (!empty($this->errorMessage)) |
|
| 60 | 60 | { |
| 61 | 61 | return false; |
| 62 | 62 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function getSign( ) |
| 73 | 73 | { |
| 74 | - return isset( $this->data[ 'ik_sign' ] ) ? $this->data[ 'ik_sign' ] : null; |
|
| 74 | + return isset($this->data[ 'ik_sign' ]) ? $this->data[ 'ik_sign' ] : null; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -48,11 +48,11 @@ |
||
| 48 | 48 | /** |
| 49 | 49 | * {@inheritdoc} |
| 50 | 50 | */ |
| 51 | - public function __construct( RequestInterface $request, $data ) |
|
| 51 | + public function __construct(RequestInterface $request, $data) |
|
| 52 | 52 | { |
| 53 | - parent::__construct( $request, $data ); |
|
| 53 | + parent::__construct($request, $data); |
|
| 54 | 54 | |
| 55 | - if( $this->getCheckoutId( ) !== $this->request->getCheckoutId( ) ) |
|
| 55 | + if ($this->getCheckoutId( ) !== $this->request->getCheckoutId( )) |
|
| 56 | 56 | { |
| 57 | 57 | $this->errorMessage = 'Wrong checkout ID'; |
| 58 | 58 | exit; |
@@ -18,51 +18,51 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class PurchaseResponse extends \Omnipay\Common\Message\AbstractResponse implements RedirectResponseInterface |
| 20 | 20 | { |
| 21 | - /** |
|
| 22 | - * @var string URL to redirect client to payment system. Used when [[isRedirect]] |
|
| 23 | - */ |
|
| 24 | - protected $_redirect = 'https://sci.interkassa.com/'; |
|
| 21 | + /** |
|
| 22 | + * @var string URL to redirect client to payment system. Used when [[isRedirect]] |
|
| 23 | + */ |
|
| 24 | + protected $_redirect = 'https://sci.interkassa.com/'; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Always returns `false`, because InterKassa always needs redirect |
|
| 28 | - * {@inheritdoc} |
|
| 29 | - */ |
|
| 30 | - public function isSuccessful( ) |
|
| 31 | - { |
|
| 32 | - return false; |
|
| 33 | - } |
|
| 26 | + /** |
|
| 27 | + * Always returns `false`, because InterKassa always needs redirect |
|
| 28 | + * {@inheritdoc} |
|
| 29 | + */ |
|
| 30 | + public function isSuccessful( ) |
|
| 31 | + { |
|
| 32 | + return false; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Always returns `true`, because InterKassa always needs redirect |
|
| 37 | - * {@inheritdoc} |
|
| 38 | - */ |
|
| 39 | - public function isRedirect( ) |
|
| 40 | - { |
|
| 41 | - return true; |
|
| 42 | - } |
|
| 35 | + /** |
|
| 36 | + * Always returns `true`, because InterKassa always needs redirect |
|
| 37 | + * {@inheritdoc} |
|
| 38 | + */ |
|
| 39 | + public function isRedirect( ) |
|
| 40 | + { |
|
| 41 | + return true; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * {@inheritdoc} |
|
| 46 | - */ |
|
| 47 | - public function getRedirectUrl( ) |
|
| 48 | - { |
|
| 49 | - return $this->_redirect; |
|
| 50 | - } |
|
| 44 | + /** |
|
| 45 | + * {@inheritdoc} |
|
| 46 | + */ |
|
| 47 | + public function getRedirectUrl( ) |
|
| 48 | + { |
|
| 49 | + return $this->_redirect; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Always `POST` for InterKassa |
|
| 54 | - * {@inheritdoc} |
|
| 55 | - */ |
|
| 56 | - public function getRedirectMethod( ) |
|
| 57 | - { |
|
| 58 | - return 'POST'; |
|
| 59 | - } |
|
| 52 | + /** |
|
| 53 | + * Always `POST` for InterKassa |
|
| 54 | + * {@inheritdoc} |
|
| 55 | + */ |
|
| 56 | + public function getRedirectMethod( ) |
|
| 57 | + { |
|
| 58 | + return 'POST'; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * {@inheritdoc} |
|
| 63 | - */ |
|
| 64 | - public function getRedirectData( ) |
|
| 65 | - { |
|
| 66 | - return $this->data; |
|
| 67 | - } |
|
| 61 | + /** |
|
| 62 | + * {@inheritdoc} |
|
| 63 | + */ |
|
| 64 | + public function getRedirectData( ) |
|
| 65 | + { |
|
| 66 | + return $this->data; |
|
| 67 | + } |
|
| 68 | 68 | } |