Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLUG-106] Change order placement flow and refactor #22

Merged
merged 22 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ae9e56a
PLUG-106: Refactor start
lighe May 8, 2024
0a6d24b
PLUG-106: Place orders upfront, refactor webhook and return
lighe May 8, 2024
e8e3f79
PLUG-106: Handle failed payments
lighe May 8, 2024
aa8e223
PLUG-106: Fix issues with quote editing and order placing
lighe May 8, 2024
6dbbc05
PLUG-106: Fix pending logic
lighe May 9, 2024
ce65f4f
PLUG-106: Refactor to use payment gateway commands
lighe Jun 6, 2024
9080d55
PLUG-106: Wip
lighe Jun 7, 2024
1776f84
PLUG-106: Improve handling of pending state
lighe Jun 7, 2024
0c83e02
PLUG-106: Show failure reason, add polling logic, refactor core payme…
lighe Jun 10, 2024
22db05b
PLUG-106: Add support for refund failed webhook, refund transaction t…
lighe Jun 11, 2024
428ef65
PLUG-106: Improve logging
lighe Jun 11, 2024
0bf1c52
PLUG-106: Remove test line
lighe Jun 12, 2024
2bb7906
PLUG-106: Fix refunds reference, handle missing shipping address, bet…
lighe Jun 12, 2024
30bfebd
PLUG-106: Do not send order emails upfront; cleanup
lighe Jun 13, 2024
02bc0d2
PLUG-106: Merge origin/main
lighe Jun 13, 2024
750d493
PLUG-106: Deduplicate error messages; improve polling logic; restore …
lighe Jun 13, 2024
33972e8
PLUG-106: Add custom error type that is always deduplicated and inval…
lighe Jun 14, 2024
f5f3bbd
PLUG-106: Fix status url
lighe Jun 14, 2024
a5c9ffc
PLUG-106: Formatting, db column comment
lighe Jun 14, 2024
29cadf1
PLUG-106: Use correct method to get total refund amount, formatting.
lighe Jun 14, 2024
77cab76
PLUG-106: Switch to using block->escapeHtml, temporarily remove codes…
lighe Jun 14, 2024
600cd40
PLUG-106: Prepare new version
lighe Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PLUG-106: Show failure reason, add polling logic, refactor core payme…
…nt update logic and logging
  • Loading branch information
lighe committed Jun 10, 2024
commit 0c83e02e5ff2859943fec0101731ac8340fe2bd0
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
Loading