Skip to content

Commit

Permalink
Add amount to UpdatePaymentDetailsResponse
Browse files Browse the repository at this point in the history
CS-6098
  • Loading branch information
MarijaIv committed Nov 18, 2024
1 parent 327bbad commit fd53fc7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models;

use Adyen\Core\BusinessLogic\Domain\Checkout\PaymentRequest\Models\Amount\Amount;

/**
* Class UpdatePaymentDetailsResult
*
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -81,4 +88,12 @@ public function getPaymentMethod(): string
{
return $this->paymentMethod;
}

/**
* @return Amount|null
*/
public function getAmount(): ?Amount
{
return $this->amount;
}
}

0 comments on commit fd53fc7

Please sign in to comment.