Skip to content

Commit

Permalink
BP-3111 Error on middleName field for PayPerEmail payment method (#3)
Browse files Browse the repository at this point in the history
* BP-3111 Error on middleName field for PayPerEmail payment method

* rename file

* fix error

---------

Co-authored-by: Ivascu Madalin <[email protected]>
  • Loading branch information
harli91 and Ivascu Madalin authored Nov 6, 2023
1 parent cef6dbc commit 55f8a51
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
20 changes: 20 additions & 0 deletions Magewire/Payment/Method/PayPerEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,26 @@ public function hydrateEmail()
}
}

/**
* Get billing address from quote
*
* @return Address
*/
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Hyva\Checkout\Model\Form\EntityField\EavAttributeField;

class Idin extends EavAttributeField
class Hide extends EavAttributeField
{
public function canRender(): bool
{
Expand Down
5 changes: 3 additions & 2 deletions etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
<arguments>
<!-- Hide idin customer fields -->
<argument name="customFields" xsi:type="array">
<item name="buckaroo_idin_iseighteenorolder" xsi:type="string">\Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin</item>
<item name="buckaroo_idin" xsi:type="string">\Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Idin</item>
<item name="buckaroo_idin_iseighteenorolder" xsi:type="string">\Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide</item>
<item name="buckaroo_idin" xsi:type="string">\Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide</item>
<item name="buckaroo_last_paybybank_issuer" xsi:type="string">\Buckaroo\HyvaCheckout\Model\Form\Eav\Customer\Hide</item>
</argument>
</arguments>
</type>
Expand Down

0 comments on commit 55f8a51

Please sign in to comment.