Skip to content

Commit

Permalink
Merge pull request #21 from iriks-it/master
Browse files Browse the repository at this point in the history
Update PaymentInformationManagement.php
  • Loading branch information
lewisvoncken authored Jun 30, 2023
2 parents 7e70bd2 + 6122e96 commit c8fc6e1
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions Plugin/Magento/Checkout/Model/PaymentInformationManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class PaymentInformationManagement
*/
public function __construct(
Data $helper
) {
)
{
$this->helper = $helper;
}

Expand All @@ -38,17 +39,20 @@ public function __construct(
*/
public function beforeSavePaymentInformation(
\Magento\Checkout\Model\PaymentInformationManagement $subject,
$cartId,
PaymentInterface $paymentMethod,
AddressInterface $address
) {
$extAttributes = $address->getExtensionAttributes();
if (!empty($extAttributes)) {
$this->helper->transportFieldsFromExtensionAttributesToObject(
$extAttributes,
$address,
'extra_checkout_billing_address_fields'
);
$cartId,
PaymentInterface $paymentMethod,
AddressInterface $address = null
)
{
if ($address) {
$extAttributes = $address->getExtensionAttributes();
if (!empty($extAttributes)) {
$this->helper->transportFieldsFromExtensionAttributesToObject(
$extAttributes,
$address,
'extra_checkout_billing_address_fields'
);
}
}
}
}

0 comments on commit c8fc6e1

Please sign in to comment.