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 21 commits
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
15 changes: 0 additions & 15 deletions .github/workflows/codesniffer.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,32 @@
* Log repository interface
* @api
*/
interface RepositoryInterface
interface LogServiceInterface
{

/**
* Add record to error log
*
* @param string $type
* @param mixed $data
*/
public function addErrorLog(string $type, $data): void;
public function error(string $type, $data): LogServiceInterface;

/**
* Add record to debug log
*
* @param string $type
* @param mixed $data
*/
public function addDebugLog(string $type, $data): void;
public function debug(string $type, $data): LogServiceInterface;

/**
* @param string|int $prefix
*/
public function addPrefix($prefix): LogServiceInterface;

/**
* @param string|int $prefix
* @return LogServiceInterface
*/
public function removePrefix($prefix): LogServiceInterface;
}
108 changes: 108 additions & 0 deletions Api/Transaction/BaseTransactionDataInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php
/**
* Copyright © TrueLayer Ltd. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace TrueLayer\Connect\Api\Transaction;

use Magento\Framework\Api\ExtensibleDataInterface;

/**
* Interface for transaction model
* @api
*/
interface BaseTransactionDataInterface extends ExtensibleDataInterface
{
/**
* Constants for keys of data array.
*/
public const ENTITY_ID = 'entity_id';
public const ORDER_ID = 'order_id';
public const STATUS = 'status';
public const FAILURE_REASON = 'failure_reason';
public const IS_LOCKED = 'is_locked';

/**
* Returns the ID.
*
* @return int ID.
*/
public function getEntityId(): int;

/**
* Returns the order ID.
*
* @return int|null order ID.
*/
public function getOrderId(): ?int;

/**
* Sets the order ID.
*
* @param int $orderId
* @return $this
*/
public function setOrderId(int $orderId): self;

/**
* Return the payment uuid.
*
* @return string|null
*/
public function getPaymentUuid(): ?string;

/**
* Set the payment uuid.
*
* @param string $value
* @return $this
*/
public function setPaymentUuid(string $value): self;

/**
* Return status.
*
* @return string|null
*/
public function getStatus(): ?string;

/**
* Set status.
*
* @param string $status
* @return $this
*/
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 is_locked.
*
* @return bool
*/
public function getIsLocked(): bool;

/**
* Set is_locked.
*
* @param bool $isLocked
* @return $this
*/
public function setIsLocked(bool $isLocked): self;
}
157 changes: 0 additions & 157 deletions Api/Transaction/Data/DataInterface.php

This file was deleted.

33 changes: 0 additions & 33 deletions Api/Transaction/Data/SearchResultsInterface.php

This file was deleted.

Loading
Loading