Skip to content

Commit

Permalink
removed unused code, fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MykolasVitkus committed Aug 26, 2019
1 parent 4113995 commit 13c9c09
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions Action/AuthorizeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);

$model = ArrayObject::ensureArrayObject($request->getModel());

throw new \LogicException('Not implemented');
}

Expand Down
2 changes: 0 additions & 2 deletions Action/CancelAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);

$model = ArrayObject::ensureArrayObject($request->getModel());

throw new \LogicException('Not implemented');
}

Expand Down
2 changes: 1 addition & 1 deletion Action/NotifyAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function execute($request)

$this->gateway->execute($httpRequest = new GetHttpRequest());

if ($completed = $this->api->doNotify($httpRequest->query)) {
if ($this->api->doNotify($httpRequest->query)) {
$model['status'] = 'COMPLETED';
throw new HttpResponse('OK');
} else {
Expand Down
2 changes: 0 additions & 2 deletions Action/RefundAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public function execute($request)
{
RequestNotSupportedException::assertSupports($this, $request);

$model = ArrayObject::ensureArrayObject($request->getModel());

throw new \LogicException('Not implemented');
}

Expand Down
9 changes: 1 addition & 8 deletions Api.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<?php
namespace PTS\Paysera;

use Http\Message\MessageFactory;
use function League\Uri\create;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\Http\HttpException;
use Payum\Core\HttpClientInterface;
use Payum\Core\Reply\HttpPostRedirect;
use Payum\Core\Reply\HttpResponse;
use Payum\Core\Request\GetHttpRequest;
use Symfony\Component\HttpFoundation\Request;
use WebToPay;

class Api
{
/**
* @var array
* @var mixed
*/
protected $options = [];

Expand All @@ -27,7 +21,6 @@ public function __construct(array $options)
{
$options = ArrayObject::ensureArrayObject($options);
$options->defaults($this->options);

$this->options = $options;
}

Expand Down
2 changes: 1 addition & 1 deletion PayseraGatewayFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function populateConfig(ArrayObject $config)
$config['payum.api'] = function (ArrayObject $config) {
$config->validateNotEmpty($config['payum.required_options']);

return new Api((array)$config, $config['payum.http_client'], $config['httplug.message_factory']);
return new Api((array)$config);
};
}
}
Expand Down

0 comments on commit 13c9c09

Please sign in to comment.