diff --git a/Model/ApiFacade/OpenApi.php b/Model/ApiFacade/OpenApi.php index 8f380a6..87dec06 100755 --- a/Model/ApiFacade/OpenApi.php +++ b/Model/ApiFacade/OpenApi.php @@ -164,6 +164,10 @@ private function handleDataStructure(array $data): array $paymentData['pay']['channelId'] = $data['channel']; } + if ($data['tax_id']) { + $paymentData['payer']['taxId'] = $data['tax_id']; + } + return $paymentData; } diff --git a/Model/ApiFacade/Transaction/TransactionApiFacade.php b/Model/ApiFacade/Transaction/TransactionApiFacade.php index 130631b..77d378c 100755 --- a/Model/ApiFacade/Transaction/TransactionApiFacade.php +++ b/Model/ApiFacade/Transaction/TransactionApiFacade.php @@ -118,6 +118,7 @@ public function originApiFieldCorrect(array $data): array unset($data['channel']); unset($data['currency']); unset($data['language']); + unset($data['tax_id']); } return $data; diff --git a/Model/TpayPayment.php b/Model/TpayPayment.php index 9685923..f1bc51d 100755 --- a/Model/TpayPayment.php +++ b/Model/TpayPayment.php @@ -198,6 +198,7 @@ public function getTpayFormData(?string $orderId = null): array 'city' => $this->escaper->escapeHtml($order->getBillingAddress()->getData('city')), 'zip' => $this->escaper->escapeHtml($order->getBillingAddress()->getData('postcode')), 'country' => $this->escaper->escapeHtml($order->getBillingAddress()->getData('country_id')), + 'tax_id' => $this->escaper->escapeHtml($order->getBillingAddress()->getData('vat_id')), 'return_error_url' => $this->urlBuilder->getUrl('magento2basic/tpay/error'), 'result_url' => $this->urlBuilder->getUrl('magento2basic/tpay/notification'), 'return_url' => $this->urlBuilder->getUrl('magento2basic/tpay/success'),