Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BP-3111 Error on middleName field for PayPerEmail payment method #3

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading