Skip to content

Commit

Permalink
PLUG-106: Show failure reason, add polling logic, refactor core payme…
Browse files Browse the repository at this point in the history
…nt update logic and logging
  • Loading branch information
lighe committed Jun 10, 2024
1 parent 1776f84 commit 0c83e02
Show file tree
Hide file tree
Showing 46 changed files with 989 additions and 959 deletions.
16 changes: 16 additions & 0 deletions Api/Transaction/Data/DataInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface DataInterface extends ExtensibleDataInterface
public const UUID = 'uuid';
public const TOKEN = 'token';
public const STATUS = 'status';
public const FAILURE_REASON = 'failure_reason';
public const INVOICE_UUID = 'invoice_uuid';
public const PAYMENT_URL = 'payment_url';
public const IS_LOCKED = 'is_locked';
Expand Down Expand Up @@ -110,6 +111,21 @@ public function getStatus(): ?string;
*/
public function setStatus(string $status): self;

/**
* Get failure reason.
*
* @return string|null
*/
public function getFailureReason(): ?string;

/**
* Set failure reason.
*
* @param string $failureReason
* @return $this
*/
public function setFailureReason(string $failureReason): self;

/**
* Return invoice_uuid.
*
Expand Down
26 changes: 5 additions & 21 deletions Controller/Adminhtml/Credentials/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,12 @@
*/
class Check extends Action implements HttpPostActionInterface
{

private const PEM_UPLOAD_FILE = '/truelayer/temp/private_key.pem';
/**
* @var DirectoryList
*/
private $directoryList;
/**
* @var ClientFactory
*/
private $clientFactory;
/**
* @var Json
*/
private $resultJson;
/**
* @var ConfigRepository
*/
private $configProvider;
/**
* @var File
*/
private $file;
private DirectoryList $directoryList;
private ClientFactory $clientFactory;
private Json $resultJson;
private ConfigRepository $configProvider;
private File $file;

/**
* Check constructor.
Expand Down
21 changes: 4 additions & 17 deletions Controller/Adminhtml/Log/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
class Stream extends Action implements HttpPostActionInterface
{

/**
* Error log file path pattern
*/
Expand All @@ -32,22 +31,10 @@ class Stream extends Action implements HttpPostActionInterface
*/
public const MAX_LINES = 100;

/**
* @var JsonFactory
*/
private $resultJsonFactory;
/**
* @var DirectoryList
*/
private $dir;
/**
* @var File
*/
private $file;
/**
* @var RequestInterface
*/
private $request;
private JsonFactory $resultJsonFactory;
private DirectoryList $dir;
private File $file;
private RequestInterface $request;

/**
* Check constructor.
Expand Down
5 changes: 1 addition & 4 deletions Controller/Checkout/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@

abstract class BaseController implements HttpGetActionInterface
{
/**
* @var Context
*/
protected Context $context;

/**
* @param Context $context
*/
public function __construct(
Context $context,
Context $context
) {
$this->context = $context;
}
Expand Down
43 changes: 0 additions & 43 deletions Controller/Checkout/Pending.php

This file was deleted.

Loading

0 comments on commit 0c83e02

Please sign in to comment.