From 476519bcd2f5e6115d0091dd2b77d39610770a17 Mon Sep 17 00:00:00 2001 From: PayXpert Integration Date: Tue, 14 Jul 2020 12:19:47 +0200 Subject: [PATCH] v1.1.3 Removed deprecated methods --- Model/ConfigGateway.php | 13 +++++++------ Model/Payment/Payxpert.php | 6 +++--- README.md | 3 ++- composer.json | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Model/ConfigGateway.php b/Model/ConfigGateway.php index 9c3ba19..71e44cf 100755 --- a/Model/ConfigGateway.php +++ b/Model/ConfigGateway.php @@ -22,6 +22,7 @@ use Payxpert\Connect2Pay\Model\Payment\Payxpert; use Magento\Checkout\Model\ConfigProviderInterface; +use Magento\Store\Model\ScopeInterface; class ConfigGateway implements ConfigProviderInterface { @@ -49,12 +50,12 @@ public function __construct( */ public function getConfig() { - $active = $this->_config->getValue('payment/payxpert/active'); - $originatorId = $this->_config->getValue('payment/payxpert/originator'); - $password = $this->_config->getValue('payment/payxpert/password'); - $url = $this->_config->getValue('payment/payxpert/url'); - $apiUrl = $this->_config->getValue('payment/payxpert/api_url'); - $iframe = $this->_config->getValue('payment/payxpert/iframe'); + $active = $this->_config->getValue('payment/payxpert/active', ScopeInterface::SCOPE_STORE); + $originatorId = $this->_config->getValue('payment/payxpert/originator', ScopeInterface::SCOPE_STORE); + $password = $this->_config->getValue('payment/payxpert/password', ScopeInterface::SCOPE_STORE); + $url = $this->_config->getValue('payment/payxpert/url', ScopeInterface::SCOPE_STORE); + $apiUrl = $this->_config->getValue('payment/payxpert/api_url', ScopeInterface::SCOPE_STORE); + $iframe = $this->_config->getValue('payment/payxpert/iframe', ScopeInterface::SCOPE_STORE); if (!$active) { return []; diff --git a/Model/Payment/Payxpert.php b/Model/Payment/Payxpert.php index 2b40ba0..c7e655e 100755 --- a/Model/Payment/Payxpert.php +++ b/Model/Payment/Payxpert.php @@ -133,10 +133,10 @@ public function startTransaction(\Magento\Sales\Model\Order $order) $c2pClient->setOrderID( $order->getId() ); // $c2pClient->setCustomerIP( $fields['customerIP'] ); - $c2pClient->setPaymentType( Connect2PayClient::_PAYMENT_TYPE_CREDITCARD ); - $c2pClient->setPaymentMode( Connect2PayClient::_PAYMENT_MODE_SINGLE ); + $c2pClient->setPaymentMethod( Connect2PayClient::PAYMENT_TYPE_CREDITCARD ); + $c2pClient->setPaymentMode( Connect2PayClient::PAYMENT_MODE_SINGLE ); $c2pClient->setShopperID( $order->getCustomerID() ); - $c2pClient->setShippingType( Connect2PayClient::_SHIPPING_TYPE_VIRTUAL ); + $c2pClient->setShippingType( Connect2PayClient::SHIPPING_TYPE_VIRTUAL ); $c2pClient->setAmount( $order->getGrandTotal() * 100 ); $c2pClient->setOrderDescription( "Order #" . $order->getId() ); $c2pClient->setCurrency( $order->getOrderCurrency()->getCurrencyCode() ); diff --git a/README.md b/README.md index fd64bc7..dd9370f 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ The author of this plugin can NEVER be held responsible for this software. There is no warranty what so ever. You accept this by using this software. ## Changelog -* 1.1.2 - Removed PHP verison requirement +* 1.1.3 - Removed deprecated methods +* 1.1.2 - Removed PHP version requirement * 1.1.1 - PSR-4 * 1.1.0 - Iframe support * 1.0.1 - Fixed callback response diff --git a/composer.json b/composer.json index b5d490a..c140933 100755 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "payxpert/connect2pay": "*" }, "type": "magento2-module", - "version": "1.1.2", + "version": "1.1.3", "license": [ "Apache-2.0" ],