diff --git a/src/BusinessLogic/CheckoutAPI/PaymentRequest/Response/UpdatePaymentDetailsResponse.php b/src/BusinessLogic/CheckoutAPI/PaymentRequest/Response/UpdatePaymentDetailsResponse.php index 1390d84..da70d66 100644 --- a/src/BusinessLogic/CheckoutAPI/PaymentRequest/Response/UpdatePaymentDetailsResponse.php +++ b/src/BusinessLogic/CheckoutAPI/PaymentRequest/Response/UpdatePaymentDetailsResponse.php @@ -3,6 +3,7 @@ namespace Adyen\Core\BusinessLogic\CheckoutAPI\PaymentRequest\Response; use Adyen\Core\BusinessLogic\AdminAPI\Response\Response; +use Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models\Amount\Amount; use Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models\UpdatePaymentDetailsResult; /** @@ -33,6 +34,14 @@ public function getPspReference(): ?string return $this->result->getPspReference(); } + /** + * @return Amount|null + */ + public function getAmount(): ?Amount + { + return $this->result->getAmount(); + } + public function isSuccessful(): bool { return $this->result->getResultCode()->isSuccessful(); diff --git a/src/BusinessLogic/Domain/Checkout/PaymentRequest/Models/UpdatePaymentDetailsResult.php b/src/BusinessLogic/Domain/Checkout/PaymentRequest/Models/UpdatePaymentDetailsResult.php index cbff1a4..47f9381 100644 --- a/src/BusinessLogic/Domain/Checkout/PaymentRequest/Models/UpdatePaymentDetailsResult.php +++ b/src/BusinessLogic/Domain/Checkout/PaymentRequest/Models/UpdatePaymentDetailsResult.php @@ -2,6 +2,8 @@ namespace Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models; +use Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models\Amount\Amount; + /** * Class UpdatePaymentDetailsResult * @@ -29,13 +31,18 @@ class UpdatePaymentDetailsResult * @var string */ private $paymentMethod; + /** + * @var Amount|null + */ + private $amount; public function __construct( ResultCode $resultCode, ?string $pspReference = null, string $donationToken = '', string $merchantReference = '', - string $paymentMethod = '' + string $paymentMethod = '', + ?Amount $amount = null ) { $this->resultCode = $resultCode; @@ -81,4 +88,12 @@ public function getPaymentMethod(): string { return $this->paymentMethod; } + + /** + * @return Amount|null + */ + public function getAmount(): ?Amount + { + return $this->amount; + } }