From 460633bd40ada842add57fe28ee47d55c7b6bcbd Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Mon, 6 Nov 2023 09:04:08 +0000 Subject: [PATCH 1/3] BP-3111 Error on middleName field for PayPerEmail payment method --- Magewire/Payment/Method/PayPerEmail.php | 10 ++++++++++ etc/frontend/di.xml | 1 + 2 files changed, 11 insertions(+) diff --git a/Magewire/Payment/Method/PayPerEmail.php b/Magewire/Payment/Method/PayPerEmail.php index 41cacaf..91e5735 100644 --- a/Magewire/Payment/Method/PayPerEmail.php +++ b/Magewire/Payment/Method/PayPerEmail.php @@ -140,6 +140,16 @@ public function hydrateEmail() } } + /** + * Get billing address from quote + * + * @return Address + */ + private function getBillingAddress(): Address + { + return $this->sessionCheckout->getQuote()->getBillingAddress(); + } + /** * Validate single field with rules diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index e2e7895..39930b9 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -43,6 +43,7 @@ \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin + \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin From 29ac7b014929e555b3a0554b269131433adbe98c Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Mon, 6 Nov 2023 09:07:31 +0000 Subject: [PATCH 2/3] rename file --- Model/Form/Eav/Customer/{Idin.php => Hide.php} | 2 +- etc/frontend/di.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename Model/Form/Eav/Customer/{Idin.php => Hide.php} (89%) diff --git a/Model/Form/Eav/Customer/Idin.php b/Model/Form/Eav/Customer/Hide.php similarity index 89% rename from Model/Form/Eav/Customer/Idin.php rename to Model/Form/Eav/Customer/Hide.php index 01d54a2..ab72044 100644 --- a/Model/Form/Eav/Customer/Idin.php +++ b/Model/Form/Eav/Customer/Hide.php @@ -6,7 +6,7 @@ use Hyva\Checkout\Model\Form\EntityField\EavAttributeField; -class Idin extends EavAttributeField +class Hide extends EavAttributeField { public function canRender(): bool { diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index 39930b9..a0c18c6 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -41,9 +41,9 @@ - \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin - \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin - \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin + \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide + \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide + \Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide From d6763eea9207312ebed0fb083e9a2f4e9afd28e9 Mon Sep 17 00:00:00 2001 From: Ivascu Madalin Date: Mon, 6 Nov 2023 09:10:00 +0000 Subject: [PATCH 3/3] fix error --- Magewire/Payment/Method/PayPerEmail.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Magewire/Payment/Method/PayPerEmail.php b/Magewire/Payment/Method/PayPerEmail.php index 91e5735..ac99729 100644 --- a/Magewire/Payment/Method/PayPerEmail.php +++ b/Magewire/Payment/Method/PayPerEmail.php @@ -150,6 +150,16 @@ private function getBillingAddress(): Address return $this->sessionCheckout->getQuote()->getBillingAddress(); } + /** + * Get payment from quote + * + * @return Payment + */ + private function getPayment() + { + return $this->sessionCheckout->getQuote()->getPayment(); + } + /** * Validate single field with rules