-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ACL-135] Add support for attempt_failed payment status (#57)
- Loading branch information
Showing
23 changed files
with
262 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/Entities/Payment/PaymentRetrieved/PaymentAttemptFailed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TrueLayer\Entities\Payment\PaymentRetrieved; | ||
|
||
use TrueLayer\Interfaces\Payment\PaymentAttemptFailedInterface; | ||
|
||
final class PaymentAttemptFailed extends PaymentFailure implements PaymentAttemptFailedInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TrueLayer\Entities\Payment\PaymentRetrieved; | ||
|
||
abstract class PaymentFailure extends _PaymentWithAuthorizationConfig | ||
{ | ||
/** | ||
* @var \DateTimeInterface | ||
*/ | ||
protected \DateTimeInterface $failedAt; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected string $failureStage; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
protected string $failureReason; | ||
|
||
/** | ||
* @return mixed[] | ||
*/ | ||
protected function casts(): array | ||
{ | ||
return \array_merge_recursive(parent::casts(), [ | ||
'failed_at' => \DateTimeInterface::class, | ||
]); | ||
} | ||
|
||
/** | ||
* @return mixed[] | ||
*/ | ||
protected function arrayFields(): array | ||
{ | ||
return \array_merge(parent::arrayFields(), [ | ||
'failed_at', | ||
'failure_stage', | ||
'failure_reason', | ||
]); | ||
} | ||
|
||
/** | ||
* @return \DateTimeInterface | ||
*/ | ||
public function getFailedAt(): \DateTimeInterface | ||
{ | ||
return $this->failedAt; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getFailureStage(): string | ||
{ | ||
return $this->failureStage; | ||
} | ||
|
||
/** | ||
* @return string|null | ||
*/ | ||
public function getFailureReason(): ?string | ||
{ | ||
return $this->failureReason ?? null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TrueLayer\Interfaces\Payment; | ||
|
||
interface PaymentAttemptFailedInterface extends PaymentFailureInterface | ||
{ | ||
} |
Oops, something went wrong.