Skip to content

Commit

Permalink
Add tax id
Browse files Browse the repository at this point in the history
  • Loading branch information
krzGablo committed Jul 19, 2024
1 parent 2cbce65 commit 465569b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Model/ApiFacade/OpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions Model/ApiFacade/Transaction/TransactionApiFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions Model/TpayPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 465569b

Please sign in to comment.