From afef3f4caf1fbd614cf05bf322056a5dcab477a8 Mon Sep 17 00:00:00 2001 From: Edgaras Date: Tue, 6 Sep 2022 12:27:06 +0300 Subject: [PATCH] Release 4.0.39 --- README.md | 2 +- composer.json | 2 +- docs/en/documentation.html | 2 +- src/Core/Util/Payload/TransactionPayload.php | 13 +++++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1f4bb6f..22126ed 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ tail -f var/log/postfinancecheckout_payment*.log ## Documentation -[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.37/docs/en/documentation.html) +[Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/shopware-6/4.0.39/docs/en/documentation.html) ## License diff --git a/composer.json b/composer.json index ff505d9..1828757 100644 --- a/composer.json +++ b/composer.json @@ -62,5 +62,5 @@ "postfinancecheckout/sdk": "3.0.1" }, "type": "shopware-platform-plugin", - "version": "4.0.37" + "version": "4.0.39" } \ No newline at end of file diff --git a/docs/en/documentation.html b/docs/en/documentation.html index eef3956..36994ab 100644 --- a/docs/en/documentation.html +++ b/docs/en/documentation.html @@ -22,7 +22,7 @@

Documentation

  • - + Source
  • diff --git a/src/Core/Util/Payload/TransactionPayload.php b/src/Core/Util/Payload/TransactionPayload.php index 5065ca0..29f6f7e 100644 --- a/src/Core/Util/Payload/TransactionPayload.php +++ b/src/Core/Util/Payload/TransactionPayload.php @@ -144,6 +144,7 @@ public function get(): TransactionCreate if (!empty($additionalAddress1 = $customer->getDefaultBillingAddress()->getAdditionalAddressLine1())) { $transactionData['meta_data']['additionalAddress1'] = $additionalAddress1; } + if (!empty($additionalAddress2 = $customer->getDefaultBillingAddress()->getAdditionalAddressLine2())) { $transactionData['meta_data']['additionalAddress2'] = $additionalAddress2; } @@ -152,6 +153,18 @@ public function get(): TransactionCreate $transactionData['meta_data']['customer_comment'] = $this->transaction->getOrder()->getCustomerComment(); } + if (!empty($companyDepartment = $customer->getDefaultBillingAddress()->getDepartment())) { + $transactionData['meta_data']['companyDepartment'] = $companyDepartment; + + $taxNumber = null; + $vatIds = $customer->getVatIds(); + if (!empty($vatIds)) { + $taxNumber = $vatIds[0]; + } + + $transactionData['meta_data']['taxNumber'] = $taxNumber; + } + $transactionPayload = (new TransactionCreate()) ->setAutoConfirmationEnabled(false) ->setBillingAddress($billingAddress)