From a53468a68b8a6db66ad2bd2937aff5ba14922500 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Tue, 22 Oct 2024 10:35:02 +0300 Subject: [PATCH] fixed google apple status --- controllers/front/return.php | 4 ++++ src/DTO/Response/PaymentMeans.php | 20 ++++++++++++++++++- .../Response/ResponseObjectCreator.php | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/controllers/front/return.php b/controllers/front/return.php index cebbb441..27fd10b9 100755 --- a/controllers/front/return.php +++ b/controllers/front/return.php @@ -87,6 +87,10 @@ public function postProcess() $orderPayment = $assertResponseBody->getPaymentMeans()->getBrand()->getPaymentMethod(); + if (!empty($assertResponseBody->getPaymentMeans()->getWallet())) { + $orderPayment = $assertResponseBody->getPaymentMeans()->getWallet(); + } + /** @var SaferPayFieldRepository $saferPayFieldRepository */ $saferPayFieldRepository = $this->module->getService(SaferPayFieldRepository::class); diff --git a/src/DTO/Response/PaymentMeans.php b/src/DTO/Response/PaymentMeans.php index c80990e7..21bdc750 100755 --- a/src/DTO/Response/PaymentMeans.php +++ b/src/DTO/Response/PaymentMeans.php @@ -43,6 +43,10 @@ class PaymentMeans * @var Card */ private $card; + /** + * @var string + */ + private $wallet; /** * PaymentMeans constructor. @@ -50,11 +54,12 @@ class PaymentMeans * @param string $displayText * @param Card|null $card */ - public function __construct(Brand $brand = null, $displayText = null, Card $card = null) + public function __construct(Brand $brand = null, $displayText = null, Card $card = null, $wallet = null) { $this->brand = $brand; $this->displayText = $displayText; $this->card = $card; + $this->wallet = $wallet; } /** @@ -97,6 +102,14 @@ public function getCard() return $this->card; } + /** + * @return string + */ + public function getWallet() + { + return $this->wallet; + } + /** * @param Card $card */ @@ -104,4 +117,9 @@ public function setCard($card) { $this->card = $card; } + + public function setWallet($wallet) + { + $this->wallet = $wallet; + } } diff --git a/src/Service/Response/ResponseObjectCreator.php b/src/Service/Response/ResponseObjectCreator.php index 6db2cd0e..38c4b882 100755 --- a/src/Service/Response/ResponseObjectCreator.php +++ b/src/Service/Response/ResponseObjectCreator.php @@ -89,6 +89,9 @@ protected function createPaymentMeans($paymentMeans) } $paymentMeansObj->setBrand($brandObj); $paymentMeansObj->setDisplayText($paymentMeans->DisplayText); + if (isset($paymentMeans->Wallet)) { + $paymentMeansObj->setWallet($paymentMeans->Wallet); + } return $paymentMeansObj; }