Skip to content

Commit

Permalink
Release 4.0.39
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Sep 6, 2022
1 parent 3457f6c commit afef3f4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
"postfinancecheckout/sdk": "3.0.1"
},
"type": "shopware-platform-plugin",
"version": "4.0.37"
"version": "4.0.39"
}
2 changes: 1 addition & 1 deletion docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/shopware-6/releases/tag/4.0.37/">
<a href="https://github.com/pfpayments/shopware-6/releases/tag/4.0.39/">
Source
</a>
</li>
Expand Down
13 changes: 13 additions & 0 deletions src/Core/Util/Payload/TransactionPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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)
Expand Down

0 comments on commit afef3f4

Please sign in to comment.