diff --git a/Model/Simplified.php b/Model/Simplified.php index c2e8e2b..e1cfb6b 100755 --- a/Model/Simplified.php +++ b/Model/Simplified.php @@ -22,23 +22,14 @@ class Simplified extends \Magento\Payment\Model\Method\AbstractMethod { - - const KHIPU_MAGENTO_VERSION = "2.4.1"; - + const KHIPU_MAGENTO_VERSION = "2.4.7"; protected $_code = 'simplified'; - protected $_isInitializeNeeded = true; - protected $urlBuilder; - protected $storeManager; - protected $_canOrder = true; - protected $_canAuthorize = true; - protected $_canUseCheckout = true; - protected $_canFetchTransactionInfo = true; /** @@ -162,8 +153,6 @@ public function getKhipuRequest(Order $order) 'status' => true, 'payment_url' => $createPaymentResponse->getSimplifiedTransferUrl() ); - - } public function getDecimalPlaces($currencyCode) @@ -223,9 +212,23 @@ public function validateKhipuCallback(Order $order, $notificationToken, $apiVers if ($paymentResponse->getCurrency() != $order->getOrderCurrencyCode()) { throw new \Exception('Currency mismatch'); } + + $responseTxt = 'Pago Khipu Aceptado
'; + $responseTxt .= 'TransactionId: ' . $paymentResponse->getTransactionId() . '
'; + $responseTxt .= 'PaymentId: ' . $paymentResponse->getPaymentId() . '
'; + $responseTxt .= 'Subject: ' . $paymentResponse->getSubject() . '
'; + $responseTxt .= 'Amount: ' . $paymentResponse->getAmount() .' '.$paymentResponse->getCurrency() .'
'; + $responseTxt .= 'Status: ' . $paymentResponse->getStatus() .' - ' . $paymentResponse->getStatusDetail() .'
'; + $responseTxt .= 'Body: ' . $paymentResponse->getBody() . '
'; + $responseTxt .= 'Bank: ' . $paymentResponse->getBank() . '
'; + $responseTxt .= 'Bank Account Number: ' . $paymentResponse->getBankAccountNumber() . '
'; + $responseTxt .= 'Payer Name: ' . $paymentResponse->getPayerName() . '
'; + $responseTxt .= 'Payer Email: ' . $paymentResponse->getPayerEmail() . '
'; + $responseTxt .= 'Personal Identifier: ' . $paymentResponse->getPersonalIdentifier() . '
'; + $order->setState(Order::STATE_PROCESSING, TRUE); $order->setStatus($order->getConfig()->getStateDefaultStatus(Order::STATE_PROCESSING)); - $order->addStatusToHistory(Order::STATE_PROCESSING, 'Estado del pago KHIPU actualizado.'); + $order->addStatusToHistory(Order::STATE_PROCESSING, $responseTxt); $order->save(); } } diff --git a/README.md b/README.md index 2fa8c33..2ace7f1 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Magento 2 Khipu Plugin -khipu payment gateway Magento 2.4.5 plugin. +khipu payment gateway Magento 2.4.7 plugin. This version is compatible with Magento 2.3 to 2.6 @@ -8,7 +8,7 @@ You can sign up for khipu account at ## Install via Composer -You can install Magento 2.4.5 khipu plugin via [Composer](http://getcomposer.org/). Run the following command in your terminal: +You can install Magento 2.4.7 khipu plugin via [Composer](http://getcomposer.org/). Run the following command in your terminal: 1. Go to your Magento 2 root folder. diff --git a/composer.json b/composer.json index cd3415c..cc66516 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "khipu/magento2-khipu", "type": "magento2-module", "description": "khipu integration for Magento 2", - "version": "2.4.5", + "version": "2.4.7", "homepage": "https://khipu.com", "license": [ "OSL-3.0" diff --git a/etc/module.xml b/etc/module.xml index 018e2d3..6af1556 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +