diff --git a/CHANGELOG.md b/CHANGELOG.md index a96be33..81c8d74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## 12.0.0 (2023-11-21) +- Update xendit url + ## 11.0.1 (2023-10-26) - Fix wrong subtotal in Xendit invoice (Remove Order child items) diff --git a/Controller/Checkout/Invoice.php b/Controller/Checkout/Invoice.php index f7cb8e3..716f2b6 100644 --- a/Controller/Checkout/Invoice.php +++ b/Controller/Checkout/Invoice.php @@ -134,7 +134,7 @@ private function getApiRequestData(Order $order) */ private function createInvoice($requestData) { - $invoiceUrl = $this->getDataHelper()->getXenditApiUrl() . "/payment/xendit/invoice"; + $invoiceUrl = $this->getDataHelper()->getXenditApiUrl() . "/tpi/payment/xendit/invoice"; $invoiceMethod = Request::METHOD_POST; $invoice = ''; diff --git a/Controller/Checkout/InvoiceMultishipping.php b/Controller/Checkout/InvoiceMultishipping.php index e1544a2..30f13a0 100644 --- a/Controller/Checkout/InvoiceMultishipping.php +++ b/Controller/Checkout/InvoiceMultishipping.php @@ -167,7 +167,7 @@ public function execute() */ private function createInvoice($requestData) { - $invoiceUrl = $this->getDataHelper()->getXenditApiUrl() . "/payment/xendit/invoice"; + $invoiceUrl = $this->getDataHelper()->getXenditApiUrl() . "/tpi/payment/xendit/invoice"; $invoiceMethod = Request::METHOD_POST; try { diff --git a/Controller/Checkout/Notification.php b/Controller/Checkout/Notification.php index 6ff29a2..1a8f54a 100644 --- a/Controller/Checkout/Notification.php +++ b/Controller/Checkout/Notification.php @@ -413,7 +413,7 @@ private function checkOrder(Order $order, $callbackPayload, $invoice, $callbackD */ private function getXenditInvoice($invoiceId) { - $invoiceUrl = $this->dataHelper->getXenditApiUrl() . "/payment/xendit/invoice/$invoiceId"; + $invoiceUrl = $this->dataHelper->getXenditApiUrl() . "/tpi/payment/xendit/invoice/$invoiceId"; $this->logger->info("getXenditInvoice", ['get_invoice_url' => $invoiceUrl]); $invoiceMethod = Request::METHOD_GET; diff --git a/Helper/Data.php b/Helper/Data.php index 98c4d49..c559184 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -30,7 +30,7 @@ */ class Data extends AbstractHelper { - const XENDIT_M2INVOICE_VERSION = '11.0.1'; + const XENDIT_M2INVOICE_VERSION = '12.0.0'; /** * @var StoreManagerInterface diff --git a/Helper/Metric.php b/Helper/Metric.php index ccd96d9..d8794df 100644 --- a/Helper/Metric.php +++ b/Helper/Metric.php @@ -77,7 +77,7 @@ public function trackMetricCount(array $requestData) { try { return $this->apiRequestHelper->request( - $this->dataHelper->getXenditApiUrl() . "/log/metrics/count", + $this->dataHelper->getXenditApiUrl() . "/tpi/log/metrics/count", \Zend\Http\Request::METHOD_POST, $requestData ); diff --git a/Model/Payment/CC.php b/Model/Payment/CC.php index 1b59dc3..84e7dfb 100644 --- a/Model/Payment/CC.php +++ b/Model/Payment/CC.php @@ -106,7 +106,7 @@ private function handleRefundResult($payment, $refund, $canRefundMore) */ private function requestRefund($chargeId, $requestData) { - $refundUrl = $this->dataHelper->getXenditApiUrl() . "/payment/xendit/credit-card/charges/$chargeId/refund"; + $refundUrl = $this->dataHelper->getXenditApiUrl() . "/tpi/payment/xendit/credit-card/charges/$chargeId/refund"; $refundMethod = \Zend\Http\Request::METHOD_POST; try { diff --git a/composer.json b/composer.json index 695be81..4aed799 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "xendit/m2invoice", "description": "Xendit Payment Gateway Module", "type": "magento2-module", - "version": "11.0.1", + "version": "12.0.0", "license": [ "GPL-3.0" ], diff --git a/etc/config.xml b/etc/config.xml index 7d32e26..694b5b2 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -5,7 +5,7 @@ test - https://tpi.xendit.co + https://tpi-gateway.xendit.co https://tpi-ui.xendit.co 1 Xendit\M2Invoice\Model\Payment\Xendit diff --git a/etc/module.xml b/etc/module.xml index a95e0b1..3e22500 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,4 +1,4 @@ - +