diff --git a/README.md b/README.md index f4907d0..8fc3436 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ execute below command in your magento installation directory `composer require amazonpaymentservices/module-fort` ## Configuration and User Guide -You can download the archive [file](/magento2-aps-2.6.2.zip) of the plugin and install it to Magento. Detailed guide is included in the repository [here](/Magento%20Extension%20User%20Guide_v1.1.pdf). +You can download the archive [file](/magento2-aps-2.6.3.zip) of the plugin and install it to Magento. Detailed guide is included in the repository [here](/Magento%20Extension%20User%20Guide_v1.1.pdf). ## Payment Options @@ -45,6 +45,7 @@ You can download the archive [file](/magento2-aps-2.6.2.zip) of the plugin and i | Plugin Version | Release Notes | | :---: | :--- | +| 2.6.3 | * Fix - PHP7.3 functions are deprecated. PHP8.2 support is introduced. | | 2.6.2 | * Fix - Additional columns are moved out from sales order to individual table
* New - Configuration is added for order deletion when transactions are failed.
* Fix - Refund amounts are not calculated, taken from Magento default function | | 2.6.1 | * Fix - Webhook, Check status common internal function to cancel failed orders are updated with order getState method | | 2.6.0 | * New - Benefit and OmanNet are added as a new payment options | diff --git a/magento2-aps-2.6.2.zip b/magento2-aps-2.6.2.zip deleted file mode 100644 index 323fbbc..0000000 Binary files a/magento2-aps-2.6.2.zip and /dev/null differ diff --git a/magento2-aps-2.6.3.zip b/magento2-aps-2.6.3.zip new file mode 100644 index 0000000..cd8c01b Binary files /dev/null and b/magento2-aps-2.6.3.zip differ diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/CronCommand.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/CronCommand.php index be2db6e..6a55d50 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/CronCommand.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/CronCommand.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/HostToHostUrl.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/HostToHostUrl.php index c6bae53..8e291a4 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/HostToHostUrl.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Adminhtml/System/Config/Field/HostToHostUrl.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Button.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Button.php index 1d91653..eff28aa 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Button.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Button.php @@ -8,7 +8,9 @@ use Magento\Catalog\Block\ShortcutInterface; use Magento\Checkout\Model\Session; +use Magento\Directory\Model\Country; use Magento\Framework\Locale\ResolverInterface; +use Magento\Framework\Registry; use Magento\Framework\View\Element\Template; use Magento\Framework\View\Element\Template\Context; use Magento\Payment\Model\MethodInterface; @@ -16,6 +18,7 @@ use Amazonpaymentservices\Fort\Helper\Aps as aps; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Store\Model\ScopeInterface; +use Magento\Store\Model\StoreManagerInterface; /** * Class Button @@ -88,6 +91,12 @@ class Button extends Template implements ShortcutInterface * @param ResolverInterface $localeResolver * @param Session $checkoutSession * @param MethodInterface $payment + * @param apsHelper $apsHelper + * @param aps $aps + * @param StoreManagerInterface $storeManager + * @param ScopeConfigInterface $scopeConfig + * @param Registry $frameworkRegistry + * @param Country $countryFactory * @param array $data */ public function __construct( @@ -207,11 +216,10 @@ public function getStoreName() public function getCountryCode() { - $country = $this->_scopeConfig->getValue( + return $this->_scopeConfig->getValue( self::COUNTRY_CODE_PATH, ScopeInterface::SCOPE_WEBSITES ); - return $country; } public function getAppleCancelUrl() @@ -221,8 +229,7 @@ public function getAppleCancelUrl() public function getCurrentProduct() { - $product = $this->_frameworkRegistry->registry('current_product'); - return $product; + return $this->_frameworkRegistry->registry('current_product'); } public function getCurrenctCurrencyCode() diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Customer/CardRenderer.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Customer/CardRenderer.php index ff279b4..1b2b4ac 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Customer/CardRenderer.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Customer/CardRenderer.php @@ -56,9 +56,7 @@ public function getExpDate() */ public function getIconUrl() { - $type = $this->getTokenDetails()['type']; - - return $type; + return $this->getTokenDetails()['type']; } /** diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Info.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Info.php index b909320..2274a10 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Info.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Info.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -46,10 +46,9 @@ protected function getLabel($field) */ protected function getValueView($field, $value) { - switch ($field) { - case FraudHandler::FRAUD_MSG_LIST: - return implode('; ', $value); - } - return parent::getValueView($field, $value); + return match ($field) { + FraudHandler::FRAUD_MSG_LIST => implode('; ', $value), + default => parent::getValueView($field, $value), + }; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/CheckoutAdditionalInfo.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/CheckoutAdditionalInfo.php index 780aba1..f33a62c 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/CheckoutAdditionalInfo.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/CheckoutAdditionalInfo.php @@ -2,7 +2,7 @@ namespace Amazonpaymentservices\Fort\Block\Subscription; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; class CheckoutAdditionalInfo extends \Magento\Framework\View\Element\Template { diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/SubscriptionList.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/SubscriptionList.php index f5c7d6a..f7aac2f 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/SubscriptionList.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Subscription/SubscriptionList.php @@ -1,8 +1,8 @@ select()->from(['table'=>'aps_subscriptions'])->where('table.id IN(?)', $subOrderIds); - $subscriptionOrder = $this->_helper->fetchAllQuery($query); - - return $subscriptionOrder; + return $this->_helper->fetchAllQuery($query); } public function getRelatedOrders($orderIncrementId) @@ -100,15 +99,13 @@ public function getRelatedOrders($orderIncrementId) $subOrderDetail = $this->_helper->fetchAllQuery($query); if (!empty($subOrderDetail)) { - $parentID = []; + $parentIds = []; foreach ($subOrderDetail as $subOrder) { $parentIds[] = $subOrder['aps_subscription_id']; } $query = $connection->select()->from(['table'=>'aps_subscription_orders'])->where('table.aps_subscription_id IN(?)', $parentIds)->order(['table.created_at DESC']); - $subOrderDetails = $this->_helper->fetchAllQuery($query); - - return $subOrderDetails; + return $this->_helper->fetchAllQuery($query); } else { return []; } @@ -117,45 +114,36 @@ public function getRelatedOrders($orderIncrementId) public function getSubscriptionItemDetail($subOrderId) { $connection = $this->getConnection(); - $subscriptionOrder = null; $query = $connection->select()->from(['table'=>'aps_subscriptions'])->where('table.id=?', $subOrderId); - $subscriptionOrder = $this->_helper->fetchAllQuery($query); - - return $subscriptionOrder; + return $this->_helper->fetchAllQuery($query); } public function getRelatedItems($subOrderId) { $connection = $this->getConnection(); - $subOrderDetails = null; $query = $connection->select()->from(['table'=>'aps_subscription_orders'])->where('table.aps_subscription_id=?', $subOrderId)->order(['table.created_at DESC']); - $subOrderDetails = $this->_helper->fetchAllQuery($query); - - return $subOrderDetails; + return $this->_helper->fetchAllQuery($query); } public function getOrder($orderId) { $order = ObjectManager::getInstance()->get('Magento\Sales\Api\Data\OrderInterface'); $this->order = $order; - $order = $this->order->load($orderId); // pass your order id here - return $order; + return $this->order->load($orderId); } public function getBillingAddress($orderId) { $order = $this->getOrder($orderId); - $billingAddress = $order->getBillingAddress()->getData(); - return $billingAddress; + return $order->getBillingAddress()->getData(); } public function getShippingAddress($orderId) { $order = $this->getOrder($orderId); - $shippingAddress = $order->getShippingAddress()->getData(); - return $shippingAddress; + return $order->getShippingAddress()->getData(); } public function getPaymentMethod($orderId) @@ -163,43 +151,19 @@ public function getPaymentMethod($orderId) $order = $this->getOrder($orderId); $payment = $order->getPayment(); $method = $payment->getMethodInstance(); - $methodTitle = $method->getTitle(); - return $methodTitle; + return $method->getTitle(); } public function fetchAllQuery($query) { - $queryResponse = $this->_helper->fetchAllQuery($query); - return $queryResponse; + return $this->_helper->fetchAllQuery($query); } public function fetchGetParams() { - $urlParams = $this->getRequest()->getParams(); - return $urlParams; + return $this->getRequest()->getParams(); } - // protected function _prepareLayout() - // { - // parent::_prepareLayout(); - // if ($this->getOrders()) { - // $pager = $this->getLayout()->createBlock( - // \Magento\Theme\Block\Html\Pager::class, - // 'sales.order.history.pager' - // )->setCollection( - // $this->getOrders() - // ); - // $this->setChild('pager', $pager); - // $this->getOrders()->load(); - // } - // return $this; - // } - - // public function getPagerHtml() - // { - // return $this->getChildHtml('pager'); - // } - public function getViewUrl($orderId) { return $this->getUrl('apsfort/subscription/view', ['order_id' => $orderId]); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Block/Success.php b/magento2-aps/Amazonpaymentservices/Fort/Block/Success.php index 515a2c1..aecb343 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Block/Success.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Block/Success.php @@ -64,24 +64,21 @@ public function getKnetParmeters() { $payment = $this->order->getPayment(); $data = $payment->getAdditionalData(); - $knetData = json_decode($data, true); - return $knetData; + return json_decode($data, true); } public function getValuParmeters() { $payment = $this->order->getPayment(); $data = $payment->getAdditionalData(); - $valuData = json_decode($data, true); - return $valuData; + return json_decode($data, true); } public function getOmanNetParmeters() { $payment = $this->order->getPayment(); $data = $payment->getAdditionalData(); - $OmanNetData = json_decode($data, true); - return $OmanNetData; + return json_decode($data, true); } public function getOrderNumber() @@ -98,8 +95,7 @@ public function getBenefitParmeters() { $payment = $this->order->getPayment(); $data = $payment->getAdditionalData(); - $benefitData = json_decode($data, true); - return $benefitData; + return json_decode($data, true); } public function getCacheLifetime() { diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Adminhtml/Payment/Capture.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Adminhtml/Payment/Capture.php index ed24977..edbc54a 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Adminhtml/Payment/Capture.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Adminhtml/Payment/Capture.php @@ -1,6 +1,7 @@ * @license GNU / GPL v3 @@ -48,11 +57,6 @@ abstract class Checkout extends \Magento\Framework\App\Action\Action implements * @var \Amazonpaymentservices\Fort\Helper\Data */ protected $_helper; - - /** - * @var \Magento\Quote\Model\Quote - */ - //protected $_quote = false; /** * @@ -96,13 +100,22 @@ abstract class Checkout extends \Magento\Framework\App\Action\Action implements */ protected $resultRedirectFactory; + protected $_quote; + /** - * @param \Magento\Framework\App\Action\Context $context - * @param \Magento\Customer\Model\Session $customerSession + * @param Context $context + * @param PageFactory $resultPageFactory + * @param Session $customerSession * @param \Magento\Checkout\Model\Session $checkoutSession - * @param \Magento\Sales\Model\OrderFactory $orderFactory - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel - * @param \Psr\Log\LoggerInterface $logger + * @param OrderFactory $orderFactory + * @param Payment $apsModel + * @param Data $helper + * @param Order $order + * @param ResultFactory $resultFactory + * @param \Magento\Checkout\Helper\Data $checkoutHelper + * @param Manager $messageManager + * @param JsonFactory $resultJsonFactory + * @param Redirect $resultRedirectFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -167,7 +180,7 @@ protected function _cancelCurrenctOrderPayment($errorMsg = '') * Cancel order, return quote to customer * * @param string $errorMsg - * @return false|string + * @return bool */ protected function _cancelPayment($order, $errorMsg = '') { @@ -181,8 +194,7 @@ protected function _cancelPayment($order, $errorMsg = '') */ protected function getOrderById($order_id) { - $order_info = $this->_orderModel->loadByIncrementId($order_id); - return $order_info; + return $this->_orderModel->loadByIncrementId($order_id); } /** diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleCancelResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleCancelResponse.php index 90ee107..f26eeab 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleCancelResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleCancelResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleFailedResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleFailedResponse.php index 55ff152..a880130 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleFailedResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleFailedResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -47,7 +47,7 @@ public function execute() $order = $this->_checkoutSession->getLastRealOrder(); $helper = $this->getHelper(); $integrationType = $helper->getConfig('payment/aps_installment/integration_type'); - $r = $helper->cancelOrder($order, 'You have cancelled the payment, please try again.', ''); + $r = $helper->cancelOrder($order, 'You have cancelled the payment, please try again.'); if ($r) { $helper->restoreQuote(); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleValidateAddress.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleValidateAddress.php index b43179b..544121d 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleValidateAddress.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/AppleValidateAddress.php @@ -218,7 +218,6 @@ public function execute() private function getShippingRates($addressData) { $quote = $this->_cart->getQuote(); - $rates = []; $result = []; if (!$quote->isVirtual()) { $shippingAddress = $this->getShippingAddress($addressData); @@ -237,7 +236,6 @@ private function getShippingRates($addressData) $estimatedAddress->setRegionId($address->getRegionId()); $rates = $this->shippingMethodManager->estimateByAddress($quote->getId(), $estimatedAddress); - $result = []; foreach ($rates as $rate) { if ($rate->getErrorMessage()) { continue; @@ -267,6 +265,7 @@ private function getShippingRates($addressData) $this->quoteRepository->save($quote); } + return $result; } @@ -304,7 +303,7 @@ public function getRegionIdBy($countryCode) $country = $this->countryFactory->loadByCode($countryCode); if (empty($country)) { - return $values; + return ''; } $regions = $country->getRegions(); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/CreateToken.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/CreateToken.php index bb9fc0f..675f1f0 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/CreateToken.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/CreateToken.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; class CreateToken extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -41,11 +46,12 @@ class CreateToken extends \Magento\Framework\App\Action\Action implements CsrfAw protected $_resultJsonFactory; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetAppleValidation.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetAppleValidation.php index 6edffd7..02f5827 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetAppleValidation.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetAppleValidation.php @@ -2,14 +2,20 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\Filesystem\File\ReadFactory; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; use Magento\Framework\App\Filesystem\DirectoryList as FileSystem; +use Magento\Sales\Model\Order\Config; class GetAppleValidation extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -52,11 +58,14 @@ class GetAppleValidation extends \Magento\Framework\App\Action\Action implements protected $_driver; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory + * @param FileSystem $fileSystem + * @param ReadFactory $driver */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetInstallmentPlans.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetInstallmentPlans.php index 3f0f914..68d2370 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetInstallmentPlans.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetInstallmentPlans.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -10,6 +14,8 @@ use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; use Magento\Framework\App\Filesystem\DirectoryList as FileSystem; +use Magento\Sales\Model\Order\Config; +use Magento\Vault\Model\ResourceModel\PaymentToken; class GetInstallmentPlans extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -57,11 +63,15 @@ class GetInstallmentPlans extends \Magento\Framework\App\Action\Action implement protected $_customerSession; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory + * @param FileSystem $fileSystem + * @param PaymentToken $paymentToken + * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -163,7 +173,7 @@ private function installmentData($data, $cardNumber, $isNotToken) $data['installment_detail']['issuer_detail'] = array_filter( $data['installment_detail']['issuer_detail'], function ($row) { - return !empty($row['plan_details']) ? true : false; + return !empty($row['plan_details']); } ); if (empty($data['installment_detail']['issuer_detail'])) { @@ -200,7 +210,7 @@ function ($row) { /** * Find bin in plans * - * @return issuer_key int + * @return int|string|null int */ private function findBinInPlans($cardNumber, $issuerData) { @@ -230,14 +240,14 @@ public function getInstallmentHandler($response) $all_plans = $response['installment_data']['plan_details']; $banking_system = $response['installment_data']['banking_system']; $interest_text = 'Non Islamic' === $banking_system ? __('Interest') : __('Profit Rate'); - $plansArr = []; + $planArr = []; $x = 0; if (!empty($all_plans)) { foreach ($all_plans as $key => $plan) { $baseCurrency = $this->_helper->getBaseCurrency(); $currencyCurrency = $this->_helper->getFrontCurrency(); $currency = $this->_helper->getFortCurrency($baseCurrency, $currencyCurrency); - $interest = $this->_helper->convertDecAmount($plan['fee_display_value'], $currency); + $interest = $this->_helper->convertDecAmount((float)$plan['fee_display_value'], $currency); $interest_info = $interest . ( 'Percentage' === $plan['fees_type'] ? '%' : '' ) . ' ' . $interest_text; $planArr[$x]['interest_info'] = $interest_info; $planArr[$x]['amountPerMonth'] = $plan['amountPerMonth']; diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetPaymentData.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetPaymentData.php index f82719a..6c0bc1a 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetPaymentData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetPaymentData.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; class GetPaymentData extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -41,11 +46,12 @@ class GetPaymentData extends \Magento\Framework\App\Action\Action implements Csr protected $_resultJsonFactory; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetStcPaymentData.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetStcPaymentData.php index 52d0448..53553de 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetStcPaymentData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetStcPaymentData.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; class GetStcPaymentData extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -41,11 +46,12 @@ class GetStcPaymentData extends \Magento\Framework\App\Action\Action implements protected $_resultJsonFactory; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultData.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultData.php index 0d25949..b970858 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultData.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; class GetVaultData extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -41,11 +46,12 @@ class GetVaultData extends \Magento\Framework\App\Action\Action implements CsrfA protected $_resultJsonFactory; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultInstallment.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultInstallment.php index b392178..307102c 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultInstallment.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultInstallment.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,8 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; +use Magento\Vault\Model\ResourceModel\PaymentToken; class GetVaultInstallment extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -53,11 +59,14 @@ class GetVaultInstallment extends \Magento\Framework\App\Action\Action implement protected $_customerSession; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory + * @param PaymentToken $paymentToken + * @param \Magento\Customer\Model\Session $modelSession */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultPaymentData.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultPaymentData.php index 8ee8d87..97df5e3 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultPaymentData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/GetVaultPaymentData.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,8 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Sales\Model\Order; use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; +use Magento\Vault\Model\ResourceModel\PaymentToken; class GetVaultPaymentData extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -51,11 +57,14 @@ class GetVaultPaymentData extends \Magento\Framework\App\Action\Action implement protected $_customerSession; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory + * @param PaymentToken $paymentToken + * @param \Magento\Customer\Model\Session $customerSession */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/InstallmentStandardPageResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/InstallmentStandardPageResponse.php index 42f2e6e..22747bd 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/InstallmentStandardPageResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/InstallmentStandardPageResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -89,5 +89,7 @@ public function execute() } else { $this->orderRedirect($returnUrl); } + + return false; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageResponse.php index d9cd3b4..903c7d4 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -52,7 +52,7 @@ public function execute() $integrationType = $helper->getConfig('payment/aps_fort_cc/integration_type'); if ($responseParams['response_code'] == \Amazonpaymentservices\Fort\Model\Payment::PAYMENT_STATUS_3DS_CHECK && isset($responseParams['3ds_url'])) { $success = $helper->handleFortResponse($responseParams, 'online', $integrationType, 'h2h'); - if (isset($success['redirect']) && $success['redirect'] == true) { + if (isset($success['redirect']) && $success['redirect'] === true) { $redirectURL = ''; $response = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_RAW); $response->setContents($redirectURL); @@ -60,7 +60,7 @@ public function execute() } } elseif ($paymentMethod == \Amazonpaymentservices\Fort\Helper\Data::PAYMENT_METHOD_CC) { $success = $helper->handleFortResponse($responseParams, 'online', $integrationType); - if (isset($success['redirect']) && $success['redirect'] == true) { + if (isset($success['redirect']) && $success['redirect'] === true) { $redirectURL = ''; $response = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_RAW); $response->setContents($redirectURL); @@ -98,5 +98,7 @@ public function execute() } else { $this->orderRedirect($returnUrl); } + + return false; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageVaultResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageVaultResponse.php index a6fc5b0..4a46c25 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageVaultResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/MerchantPageVaultResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -53,7 +53,7 @@ public function execute() $success = ''; if ($responseParams['response_code'] == \Amazonpaymentservices\Fort\Model\Payment::PAYMENT_STATUS_3DS_CHECK && isset($responseParams['3ds_url'])) { $success = $helper->handleFortResponse($responseParams, 'online', $integrationType, 'h2h'); - if (isset($success['redirect']) && $success['redirect'] == true) { + if (isset($success['redirect']) && $success['redirect'] === true) { $redirectURL = ''; $response = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_RAW); $response->setContents($redirectURL); @@ -61,7 +61,7 @@ public function execute() } } elseif ($paymentMethod == \Amazonpaymentservices\Fort\Helper\Data::PAYMENT_METHOD_CC || $paymentMethod == \Amazonpaymentservices\Fort\Helper\Data::PAYMENT_METHOD_INSTALLMENT || $paymentMethod == \Amazonpaymentservices\Fort\Helper\Data::PAYMENT_METHOD_VAULT) { $success = $helper->handleFortResponse($responseParams, 'offline', $integrationType); - if (isset($success['redirect']) && $success['redirect'] == true) { + if (isset($success['redirect']) && $success['redirect'] === true) { $redirectURL = ''; $response = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_RAW); $response->setContents($redirectURL); @@ -90,5 +90,7 @@ public function execute() $this->_checkoutSession->setLastSuccessQuoteId($order->getQuoteId()); $this->orderRedirect($returnUrl); + + return true; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Redirect.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Redirect.php index ce1f7cf..b80b250 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Redirect.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Redirect.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Response.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Response.php index d1614a2..83a8799 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Response.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Response.php @@ -30,7 +30,7 @@ public function execute() $order = $this->getOrderById($orderId); - $responseCode = isset($responseParams['response_code']) ? $responseParams['response_code'] : ''; + $responseCode = $responseParams['response_code'] ?? ''; $helper = $this->getHelper(); $integrationType = $helper::INTEGRATION_TYPE_REDIRECTION; diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/ResponseOnline.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/ResponseOnline.php index 0ac78da..50bc36e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/ResponseOnline.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/ResponseOnline.php @@ -62,5 +62,7 @@ public function execute() $this->_checkoutSession->setLastSuccessQuoteId($order->getQuoteId()); $this->orderRedirect($returnUrl); + + return true; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponse.php index 283b9dc..9f2b88f 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponse.php @@ -67,8 +67,7 @@ private function checkOrderId($responseParams) $orderId = ''; $sessionData = $this->_customerSession->getCustomValue(); $orderId = $sessionData['orderId']; - $orderId = $this->getOrderId($orderId); - return $orderId; + return $this->getOrderId($orderId); } private function getOrderId($orderId) diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponseOnline.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponseOnline.php index 92ff4a1..bcdf386 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponseOnline.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/StcResponseOnline.php @@ -76,7 +76,7 @@ private function stcSaveCard($connection, $order, $responseParams) 'customer_id' => $order->getCustomerId(), 'order_increment_id' => $order->getIncrementId(), 'token_name' => $responseParams['token_name'], - 'phone_number' => isset($responseParams["phone_number"]) ? $responseParams["phone_number"] : '', + 'phone_number' => $responseParams["phone_number"] ?? '', 'added_date' => date('Y-m-d H:i:s'), ] ); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckout.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckout.php index 6d4ed37..31c2033 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckout.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckout.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckoutResponse.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckoutResponse.php index 619f715..9f5eacc 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckoutResponse.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/VisaCheckoutResponse.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -61,7 +61,7 @@ public function execute() $success = ''; if (!empty($responseParams['response_code']) && $responseParams['response_code'] == \Amazonpaymentservices\Fort\Model\Payment::PAYMENT_STATUS_3DS_CHECK && isset($responseParams['3ds_url'])) { $success = $helper->handleFortResponse($responseParams, 'online', $integrationType, 'h2h'); - if (isset($success['redirect']) && $success['redirect'] == true) { + if (isset($success['redirect']) && $success['redirect'] === true) { $redirectURL = ''; $response = $this->_resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_RAW); $response->setContents($redirectURL); @@ -94,5 +94,7 @@ public function execute() $helper->log('Checkout Session Data3:'.$this->_checkoutSession->getLastSuccessQuoteId()); $helper->log('Checkout Session order Id Data3:'.$this->_checkoutSession->getLastRealOrderId()); $this->orderRedirect($returnUrl); + + return true; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Webhook.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Webhook.php index 0247cba..bc04f9e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Webhook.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Payment/Webhook.php @@ -2,12 +2,18 @@ namespace Amazonpaymentservices\Fort\Controller\Payment; +use Amazonpaymentservices\Fort\Helper\Data; use Amazonpaymentservices\Fort\Model\Config\Source\OrderOptions; +use Amazonpaymentservices\Fort\Model\Payment; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Action\HttpPostActionInterface; +use Magento\Framework\Controller\Result\JsonFactory; +use Magento\Sales\Model\Order\Config; class Webhook extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpGetActionInterface, HttpPostActionInterface { @@ -40,11 +46,12 @@ class Webhook extends \Magento\Framework\App\Action\Action implements CsrfAwareA protected $_resultJsonFactory; /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Magento\Sales\Model\Order\Config $orderConfig, - * @param \Amazonpaymentservices\Fort\Model\Payment $apsModel, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Config $orderConfig , + * @param Payment $apsModel , + * @param Data $helperFort + * @param JsonFactory $resultJsonFactory */ public function __construct( \Magento\Framework\App\Action\Context $context, @@ -85,7 +92,7 @@ public function execute() } $this->_helper->log('WebHook Data:'.json_encode($responseParams)); - $responseCode = isset($responseParams['response_code']) ? $responseParams['response_code'] : ''; + $responseCode = $responseParams['response_code'] ?? ''; $this->_helper->log('WebHook Data:'.$responseCode); if ($responseCode == \Amazonpaymentservices\Fort\Helper\Data::PAYMENT_METHOD_CAPTURE_STATUS) { $this->_helper->captureAuthorize($responseParams); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/AddProductToCart.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/AddProductToCart.php index 539e5fd..5db50cc 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/AddProductToCart.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/AddProductToCart.php @@ -240,7 +240,7 @@ public function execute() $this->_helper->log('Apple Json : '.json_encode($data)); $resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON); $resultJson->setData($data); - return $resultJson;; + return $resultJson; } public function getCacheLifetime() { diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/GetQuoteData.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/GetQuoteData.php index c8b80db..1300368 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/GetQuoteData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Product/GetQuoteData.php @@ -2,6 +2,10 @@ namespace Amazonpaymentservices\Fort\Controller\Product; +use Amazonpaymentservices\Fort\Helper\Data; +use Magento\Checkout\Model\Cart; +use Magento\Checkout\Model\Session; +use Magento\Framework\App\Action\Context; use Magento\Framework\App\CsrfAwareActionInterface; use Magento\Framework\App\Request\InvalidRequestException; use Magento\Framework\App\RequestInterface; @@ -9,6 +13,7 @@ use Magento\Framework\App\Action\HttpPostActionInterface; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\Currency; +use Magento\Framework\Event\ManagerInterface; use Magento\Sales\Model\Order; use Magento\Store\Model\StoreManagerInterface; use Magento\Catalog\Api\ProductRepositoryInterface; @@ -52,11 +57,16 @@ class GetQuoteData extends \Magento\Framework\App\Action\Action implements CsrfA * @var \Magento\Directory\Model\Currency */ private $modelCurrency; - + /** - * @param \Magento\Framework\App\Action\Context $context, - * @param \Magento\Checkout\Model\Session $checkoutSession, - * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort + * @param Context $context , + * @param Session $checkoutSession , + * @param Data $helperFort + * @param Cart $cart + * @param StoreManagerInterface $storeManager + * @param ProductRepositoryInterface $productRepository + * @param ManagerInterface $eventManager + * @param \Magento\Directory\Model\Currency $modelCurrency */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Cancel.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Cancel.php index dff1ddb..dcdc60e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Cancel.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Cancel.php @@ -2,7 +2,7 @@ namespace Amazonpaymentservices\Fort\Controller\Subscription; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\Action\Context; @@ -16,6 +16,8 @@ class Cancel extends \Magento\Framework\App\Action\Action private $resultPageFactory; public $_storeManager; + protected $_messageManager; + protected $currentCustomer; public function __construct( Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Index.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Index.php index aceeb6b..e739031 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Index.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Index.php @@ -2,7 +2,7 @@ namespace Amazonpaymentservices\Fort\Controller\Subscription; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\Action\Context; @@ -22,6 +22,10 @@ class Index extends \Magento\Framework\App\Action\Action */ protected $_helper; + protected $_messageManager; + + protected \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer; + public function __construct( Context $context, PageFactory $resultPageFactory, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Order.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Order.php index 4f4b0b7..22a7b76 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Order.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/Order.php @@ -8,7 +8,7 @@ use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface; use Magento\Sales\Controller\OrderInterface; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; class Order extends \Magento\Sales\Controller\AbstractController\View implements OrderInterface, HttpGetActionInterface { diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/View.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/View.php index e63bba0..4431ce2 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/View.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Subscription/View.php @@ -2,7 +2,7 @@ namespace Amazonpaymentservices\Fort\Controller\Subscription; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; use Magento\Framework\Controller\ResultFactory; use Magento\Framework\View\Result\PageFactory; use Magento\Framework\App\Action\Context; @@ -16,6 +16,9 @@ class View extends \Magento\Framework\App\Action\Action private $resultPageFactory; public $_storeManager; + protected $_messageManager; + protected $currentCustomer; + public function __construct( Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Controller/Vault/VaultDelete.php b/magento2-aps/Amazonpaymentservices/Fort/Controller/Vault/VaultDelete.php index 4657d7b..855e300 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Controller/Vault/VaultDelete.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Controller/Vault/VaultDelete.php @@ -41,7 +41,8 @@ class VaultDelete extends \Magento\Framework\App\Action\Action implements CsrfAw * @param \Magento\Framework\App\Action\Context $context, * @param \Magento\Checkout\Model\Session $checkoutSession, * @param \Amazonpaymentservices\Fort\Helper\Data $helperFort, - * @param \Magento\Framework\Controller\Result\JsonFactory, + * @param \Magento\Vault\Model\ResourceModel\PaymentToken $paymentToken + * @param \Magento\Customer\Model\Session $modelSession, */ public function __construct( \Magento\Framework\App\Action\Context $context, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Cron/Paymentstatus.php b/magento2-aps/Amazonpaymentservices/Fort/Cron/Paymentstatus.php index 6f64ee5..20c0285 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Cron/Paymentstatus.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Cron/Paymentstatus.php @@ -44,12 +44,12 @@ public function execute() { $this->_logger->debug('APS Cron'); - $cronConfig = $this->_helper->getConfig('payment/aps_fort_cron/interval'); + $cronConfig = (int)$this->_helper->getConfig('payment/aps_fort_cron/interval'); $date = date("Y-m-d H:i:s"); $time = strtotime($date); $time = $time - ($cronConfig * 60); - $date = date("Y-m-d H:i:s", $time); + $date = date("Y-m-d H:i:s", (int)$time); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orders = $this->_order @@ -68,12 +68,12 @@ public function execute() if (in_array($order->getPayment()->getMethod(), $this->_methodCodes)) { $this->orderUpdate($order); } - }; + } return $this; } - private function Orderupdate($order) + private function orderUpdate($order) { $this->_logger->debug('APS Cron pending order : '.$order->getIncrementId()); $paymentMethod = $order->getPayment()->getMethod(); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Cron/PlaceSubscriptionOrder.php b/magento2-aps/Amazonpaymentservices/Fort/Cron/PlaceSubscriptionOrder.php index ffc442f..dd13284 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Cron/PlaceSubscriptionOrder.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Cron/PlaceSubscriptionOrder.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Helper/Cron.php b/magento2-aps/Amazonpaymentservices/Fort/Helper/Cron.php index ad3d18b..e5eb524 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Helper/Cron.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Helper/Cron.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -145,6 +145,7 @@ public function __construct( */ public function createCronOrder($qty, $subscriptionOrderId, $orderIncrementedId, $itemId) { + $order = null; try { $order = $this->_helper->getOrderById($orderIncrementedId); $this->_helper->log('OrderID:'.$order->getId()); @@ -229,8 +230,10 @@ public function createCronOrder($qty, $subscriptionOrderId, $orderIncrementedId, $tokenId, $tokenName, $remoteIp, $order); } } catch (Exception $e) { - $order->addStatusHistoryComment('APS :: Failed to create child order.', true); - $order->save(); + if ($order) { + $order->addStatusHistoryComment('APS :: Failed to create child order.', true); + $order->save(); + } $this->_helper->cancelSubscription($subscriptionOrderId); $this->_helper->log("Cron Job failed for Order:".$order->getId()); $this->_helper->log($e->getMessage()); diff --git a/magento2-aps/Amazonpaymentservices/Fort/Helper/Data.php b/magento2-aps/Amazonpaymentservices/Fort/Helper/Data.php index d219b06..c1e3590 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Helper/Data.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Helper/Data.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -393,7 +393,7 @@ public function getMainConfigData($config_field) public function isApsPaymentMethod($paymentMethod) { - if (preg_match('#^aps\_fort\_#', $paymentMethod)) { + if (preg_match('#^aps\_#', $paymentMethod)) { return true; } return false; @@ -507,10 +507,10 @@ public function getPaymentRequestParams($order, $integrationType = self::INTEGRA $signature = $this->calculateSignature($this->_gatewayParams, 'request'); $this->_gatewayParams['signature'] = $signature; if ($paymentMethod == self::PAYMENT_METHOD_INSTALLMENT && $integrationType == self::INTEGRATION_TYPE_HOSTED) { - $this->_gatewayParams['remember_me'] = isset($postData['rememberMe']) ? $postData['rememberMe'] : 'NO'; + $this->_gatewayParams['remember_me'] = $postData['rememberMe'] ?? 'NO'; } if ($paymentMethod == self::PAYMENT_METHOD_CC && $integrationType == self::INTEGRATION_TYPE_HOSTED && $this->getConfig('payment/aps_installment/integration_type') == self::INTEGRATION_TYPE_EMBEDED) { - $this->_gatewayParams['remember_me'] = isset($postData['rememberMe']) ? $postData['rememberMe'] : 'NO'; + $this->_gatewayParams['remember_me'] = $postData['rememberMe'] ?? 'NO'; } $gatewayUrl = $this->getGatewayUrl(); @@ -739,7 +739,7 @@ public function execGenOtp($order, $mobileNumber, $downPayment, $wallet_amount, $model->setUpdatedAt(date('Y-m-d H:i:s')); $model->save(); - $discountAmount = $order->getBaseDiscountAmount(); + $discountAmount = (float)$order->getBaseDiscountAmount(); $orderData = $cart; $shippingAmount = (float)$orderData->getShippingAmount(); @@ -754,7 +754,7 @@ public function execGenOtp($order, $mobileNumber, $downPayment, $wallet_amount, $currency = $this->_storeManager->getStore()->getCurrentCurrencyCode(); $items = $cart->getAllItems(); $gatewayUrl = $this->getGatewayUrl('notificationApi'); - $taxAmount = $order->getTaxAmount(); + $taxAmount = (float)$order->getTaxAmount(); $products = $this->getValuProductsArr($items, $shippingAmount, $taxAmount, $discountAmount); $language = $this->getLanguage(); $include_installments = 'YES'; @@ -812,9 +812,9 @@ public function execGenOtp($order, $mobileNumber, $downPayment, $wallet_amount, * Get Valu Product Arr to get product array * * @param array $items - * @param decimal $shippingAmount - * @param decimal $taxAmount - * @param decimal $discountAmount + * @param float $shippingAmount + * @param float $taxAmount + * @param float $discountAmount * @return array */ private function getValuProductsArr($items, $shippingAmount, $taxAmount, $discountAmount) @@ -1090,9 +1090,7 @@ public function getInstallmentPlan($cardNumberOrToken, $binOrTokenFlag) $logMsg = "Request Params for payment method (Intallment Hosted) \n\n" . json_encode($gatewayParams, 1); $this->log($logMsg); - $response = $this->callApi($gatewayParams, $gatewayUrl); - - return $response; + return $this->callApi($gatewayParams, $gatewayUrl); } public function getPaymentPageRedirectData($order) @@ -1489,8 +1487,9 @@ private function getVisitorIp() /** * calculate fort signature - * @param array $arr_data - * @param sting $sign_type request or response + * @param $arrData + * @param string $signType request or response + * @param string $type * @return string fort signature */ public function calculateSignature($arrData, $signType = 'request', $type = '') @@ -1575,7 +1574,7 @@ private function getProductArr($values) * Convert Amount with dicemal points * @param object $order * @param string $currencyCode - * @return decimal + * @return float */ public function convertFortAmount($order, $currencyCode) { @@ -1589,15 +1588,14 @@ public function convertFortAmount($order, $currencyCode) } $decimal_points = $this->getCurrencyDecimalPoint($currencyCode); $new_amount = round($amount, $decimal_points); - $new_amount = $new_amount * (pow(10, $decimal_points)); - return $new_amount; + return $new_amount * (pow(10, $decimal_points)); } /** - * Convert Amount with dicemal points - * @param object $order + * Convert Amount with decimal points + * @param mixed $amount * @param string $currencyCode - * @return decimal + * @return float */ public function convertRevAmount($amount, $currencyCode) { @@ -1608,10 +1606,10 @@ public function convertRevAmount($amount, $currencyCode) } /** - * Convert Amount with dicemal points - * @param object $order + * Convert Amount with decimal points + * @param mixed $amount * @param string $currencyCode - * @return decimal + * @return float */ public function convertAmount($amount, $currencyCode) { @@ -1619,15 +1617,14 @@ public function convertAmount($amount, $currencyCode) $decimal_points = $this->getCurrencyDecimalPoint($currencyCode); $new_amount = round($amount, $decimal_points); - $new_amount = $new_amount * (pow(10, $decimal_points)); - return $new_amount; + return $new_amount * (pow(10, $decimal_points)); } /** * Convert decimal point Amount with original amount - * @param decimal $amount + * @param float $amount * @param string $currencyCode - * @return decimal + * @return float */ public function convertDecAmount($amount, $currencyCode) { @@ -1654,13 +1651,12 @@ public function convertFortAmountCart($currencyCode) } $decimal_points = $this->getCurrencyDecimalPoint($currencyCode); $new_amount = round((float)$amount, $decimal_points); - $new_amount = $new_amount * (pow(10, $decimal_points)); - return $new_amount; + return $new_amount * (pow(10, $decimal_points)); } /** * @param string $currency - * @param integer + * @return integer */ public function getCurrencyDecimalPoint($currency) { @@ -1742,7 +1738,7 @@ public function getLanguage() { $language = $this->_localeResolver->getLocale(); - if (substr($language, 0, 2) == 'ar') { + if (str_starts_with($language, 'ar')) { $language = 'ar'; } else { $language = 'en'; @@ -1753,13 +1749,14 @@ public function getLanguage() /** * Restores quote * - * @return bool + * @return void */ public function restoreQuote($order = null) { if (!$order) { - return false; + return; } + $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_checkoutSession = $objectManager->create('\Magento\Checkout\Model\Session'); $_quoteFactory = $objectManager->create('\Magento\Quote\Model\QuoteFactory'); @@ -1860,7 +1857,7 @@ public function cancelCurrentOrder($comment) /** * Cancel order with specified comment message * - * @return Mixed + * @return bool */ public function cancelOrder($order, $comment) { @@ -2130,8 +2127,7 @@ public function apsRefund($orderId, $currencyCode, $amount, $paymentMethod, $ord $data['signature'] = $signature; $gatewayUrl = $this->getGatewayUrl('notificationApi'); - $result = $this->callApi($data, $gatewayUrl); - return $result; + return $this->callApi($data, $gatewayUrl); } public function checkOrderStatus($orderId, $paymentMethod = '') @@ -2157,8 +2153,7 @@ public function checkOrderStatus($orderId, $paymentMethod = '') $data['signature'] = $this->calculateSignature($data, 'request', $type); $this->log('APS verify order request:'. json_encode($data)); $gatewayUrl = $this->getGatewayUrl('notificationApi'); - $result = $this->callApi($data, $gatewayUrl); - return $result; + return $this->callApi($data, $gatewayUrl); } public function processOrder($order, $responseParams) @@ -2287,7 +2282,7 @@ private function saveTokenisation($tokenobjectManagerDuplicate, $order, $publicH /** * @return \Magento\Sales\Model\Order\Invoice */ - private function createInvoice(&$order, $responseParams) + private function createInvoice($order, $responseParams) { if (!$order->hasInvoices()) { $invoice = $order->prepareInvoice(); @@ -2296,6 +2291,10 @@ private function createInvoice(&$order, $responseParams) $order->addRelatedObject($invoice); return $invoice; } + + // return the first invoice + $invoiceCollection = $order->getInvoiceCollection(); + return array_pop($invoiceCollection); } private function sendInvoiceEmail(\Magento\Sales\Model\Order\Invoice $invoice) @@ -2320,13 +2319,15 @@ public function getUrl($route, $params = []) */ public function getOrderById($order_id) { - $order_info = $this->_order->loadByIncrementId($order_id); - return $order_info; + return $this->_order->loadByIncrementId($order_id); } /** * @param array $fortParams - * @param string integrationType + * @param string $responseMode + * @param string $integrationType + * @param string $responseSource + * * @retrun boolean */ public function handleFortResponse($fortParams = [], $responseMode = 'online', $integrationType = self::INTEGRATION_TYPE_REDIRECTION, $responseSource = '') @@ -2348,7 +2349,7 @@ public function handleFortResponse($fortParams = [], $responseMode = 'online', $ return false; } - if (!isset($responseParams['merchant_reference']) || empty($responseParams['merchant_reference'])) { + if (empty($responseParams['merchant_reference'])) { $responseMessage = "Merchant Reference not found\n\n" . json_encode($responseParams, 1); $this->log($responseMessage); $this->restoreQuote($order); @@ -2531,8 +2532,9 @@ private function invalidSignature($signature, $responseSignature, $order) if ($r) { $this->restoreQuote($order); $this->_messageManager->addError($responseMessage); - return false; } + + return false; } private function errorReponse($responseCode, $order, $responseStatusMessage) @@ -2562,6 +2564,8 @@ private function errorReponse($responseCode, $order, $responseStatusMessage) return false; } } + + return false; } private function checkHostToHost($responseCode, $responseParams) @@ -2759,8 +2763,8 @@ private function creditMemoCalculation($amount, $amountRate, $responseParams, $o $creditmemoRecords = $creditmemos->getItems(); $creditMemoTotal1 = 0; $flag = 0; - foreach ($creditmemos as $creditmemo) { - $adjustment = $creditmemo->getBaseGrandTotal(); + foreach ($creditmemos as $_creditmemo) { + $adjustment = $_creditmemo->getBaseGrandTotal(); $creditMemoTotal1 += $adjustment; } @@ -2903,6 +2907,8 @@ public function apsSubscriptionOrderCron($newOrder, $subscriptionOrderId, $statu foreach ($newOrder->getAllItems() as $item) { $this->saveSubscriptionData($item, $apsSubEnabled, $apsSubInterval, $apsSubIntervalCount, $subscriptionOrderId, $status, $newOrder); } + + return true; } catch (\Exception $e) { $order->addStatusHistoryComment('APS :: Failed to create child order.', true); $order->save(); @@ -3062,7 +3068,7 @@ public function apsSubscriptionPaymentApi(&$newOrder, $tokenName, $order, $remot } catch (\Exception $e) { $order->addStatusHistoryComment('APS :: Failed to create child order.', true); $order->save(); - $this->cancelSubscription($subscriptionOrderId); + $this->cancelSubscription($order->getId()); $this->log("Cron Job API failed for Order:".$order->getId()); $this->log($e->getMessage()); return $responseParams; @@ -3212,8 +3218,7 @@ public function stcPayRequestOtp($orderId, $mobileNumber) $data['signature'] = $signature; $gatewayUrl = $this->getGatewayUrl('notificationApi'); $this->log(json_encode($data)); - $responseParams = $this->callApi($data, $gatewayUrl); - return $responseParams; + return $this->callApi($data, $gatewayUrl); } public function getStcPaymentRequestParams($order, $postData = []) diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applebuttontypes.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applebuttontypes.php index 9653274..0d81553 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applebuttontypes.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applebuttontypes.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applesupportednetworks.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applesupportednetworks.php index 494d234..fb703b4 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applesupportednetworks.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Applesupportednetworks.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Commandoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Commandoptions.php index c548813..7631f5e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Commandoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Commandoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Gatewaycurrencyoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Gatewaycurrencyoptions.php index 8a82e29..b9526a6 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Gatewaycurrencyoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Gatewaycurrencyoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Installmentintegrationtype.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Installmentintegrationtype.php index 2cbdb86..6c7152a 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Installmentintegrationtype.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Installmentintegrationtype.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Integrationtypeoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Integrationtypeoptions.php index 9ebdefe..66bedce 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Integrationtypeoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Integrationtypeoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Intervaloptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Intervaloptions.php index fe4ca3e..a3dd8e4 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Intervaloptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Intervaloptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Madaoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Madaoptions.php index 3bd9783..31e8e61 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Madaoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Madaoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Meezaoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Meezaoptions.php index 6072651..8fa8c41 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Meezaoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Meezaoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/OrderOptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/OrderOptions.php index 4e262d1..9e3282c 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/OrderOptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/OrderOptions.php @@ -2,7 +2,7 @@ /** * Order after an unsuccessful payment options - * php version 7.3.* + * php version 8.2.* * * @category Amazonpaymentservices * @package Amazonpaymentservices_Fort diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Shaoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Shaoptions.php index b9580d7..c5566c1 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Shaoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Shaoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Stcintegrationtype.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Stcintegrationtype.php index 52880b1..908c1cd 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Stcintegrationtype.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Stcintegrationtype.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Tabbyintegrationtype.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Tabbyintegrationtype.php index 8bc1f43..091cb62 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Tabbyintegrationtype.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/Tabbyintegrationtype.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/VisaCheckoutIntegrationtypeoptions.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/VisaCheckoutIntegrationtypeoptions.php index 0821add..b10ac73 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/VisaCheckoutIntegrationtypeoptions.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Config/Source/VisaCheckoutIntegrationtypeoptions.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Apple.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Apple.php index 6f53ccb..24d1095 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Apple.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Apple.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Benefit.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Benefit.php index ac60665..b3cf9df 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Benefit.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Benefit.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Cc.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Cc.php index 4bcd417..204189a 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Cc.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Cc.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -133,13 +133,10 @@ public function getInstructions() public function getCcAvailableTypes() { $types = $this->_paymentConfig->getCcTypes(); - $availableTypes = 'VI,MC,OT,MD,MZ,AE'; - if ($availableTypes) { - $availableTypes = explode(',', $availableTypes); - foreach ($types as $code => $name) { - if (!in_array($code, $availableTypes)) { - unset($types[$code]); - } + $availableTypes = explode(',', 'VI,MC,OT,MD,MZ,AE'); + foreach ($types as $code => $name) { + if (!in_array($code, $availableTypes)) { + unset($types[$code]); } } return $types; @@ -152,9 +149,7 @@ public function getCcAvailableTypes() */ public function getCcMonths() { - //$months[0] = __('Month'); - $months = $this->getMonths(); - return $months; + return $this->getMonths(); } /** @@ -183,8 +178,7 @@ public function getMonths() */ public function getCcYears() { - $years = $this->getYears(); - return $years; + return $this->getYears(); } /** @@ -228,8 +222,7 @@ public function getSsStartYears() $year = $first - $index; $years[$year] = $year; } - $years = [0 => __('Year')] + $years; - return $years; + return [0 => __('Year')] + $years; } /** @@ -258,14 +251,13 @@ public function validate() public function getVerificationRegEx() { - $verificationExpList = [ + return [ 'VI' => '/^[0-9]{3}$/', 'MC' => '/^[0-9]{3}$/', 'AE' => '/^[0-9]{4}$/', 'MD' => '/^[0-9]{3}$/', 'MZ' => '/^[0-9]{3}$/', ]; - return $verificationExpList; } protected function _validateExpDate($expYear, $expMonth) diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Installment.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Installment.php index a8d968a..04e6436 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Installment.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Installment.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -132,15 +132,13 @@ public function getInstructions() public function getCcAvailableTypes() { $types = $this->_paymentConfig->getCcTypes(); - $availableTypes = 'VI,MC,OT,MD,MZ,AE'; - if ($availableTypes) { - $availableTypes = explode(',', $availableTypes); - foreach ($types as $code => $name) { - if (!in_array($code, $availableTypes)) { - unset($types[$code]); - } + $availableTypes = explode(',', 'VI,MC,OT,MD,MZ,AE'); + foreach ($types as $code => $name) { + if (!in_array($code, $availableTypes)) { + unset($types[$code]); } } + return $types; } @@ -151,9 +149,7 @@ public function getCcAvailableTypes() */ public function getCcMonths() { - //$months[0] = __('Month'); - $months = $this->getMonths(); - return $months; + return $this->getMonths(); } /** @@ -182,8 +178,7 @@ public function getMonths() */ public function getCcYears() { - $years = $this->getYears(); - return $years; + return $this->getYears(); } /** @@ -227,8 +222,7 @@ public function getSsStartYears() $year = $first - $index; $years[$year] = $year; } - $years = [0 => __('Year')] + $years; - return $years; + return [0 => __('Year')] + $years; } /** diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Knet.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Knet.php index 2f6b9c0..a0ac388 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Knet.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Knet.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Naps.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Naps.php index e1a0c33..f4e21ba 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Naps.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Naps.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/OmanNet.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/OmanNet.php index 4a19740..c9f3031 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/OmanNet.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/OmanNet.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Sadad.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Sadad.php index 8cc6b87..6c6a0ed 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Sadad.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Sadad.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Stc.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Stc.php index de383c8..76d897e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Stc.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Stc.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Tabby.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Tabby.php index d11c0cb..4f512dc 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Tabby.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Method/Tabby.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Payment.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Payment.php index 11b60ee..c722b6d 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Payment.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Payment.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/PaymentConfigProvider.php b/magento2-aps/Amazonpaymentservices/Fort/Model/PaymentConfigProvider.php index 9048e3b..cdf227e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/PaymentConfigProvider.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/PaymentConfigProvider.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -139,7 +144,15 @@ class PaymentConfigProvider implements ConfigProviderInterface /** * @param PaymentHelper $paymentHelper + * @param apsHelper $apsHelper * @param UrlInterface $urlBuilder + * @param AssetRepository $assetRepository + * @param StoreManagerInterface $storeManager + * @param Resolver $store + * @param PaymentTokenManagementInterface $paymenttokenmanagement + * @param Session $session + * @param ResourceConnection $connect + * @param ScopeConfigInterface $scopeConfig */ public function __construct( PaymentHelper $paymentHelper, @@ -445,68 +458,55 @@ private function ccConfig($code) /** * Get frame action URL * - * @param string $code * @return string */ protected function getActionUrl() { - $url = $this->urlBuilder->getUrl('amazonpaymentservicesfort/payment/redirect', ['_secure' => true]); - - return $url; + return $this->urlBuilder->getUrl('amazonpaymentservicesfort/payment/redirect', ['_secure' => true]); } /** * Get frame action URL * - * @param string $code * @return string */ protected function getInstallmentUrl() { - $url = $this->urlBuilder->getUrl('amazonpaymentservicesfort/payment/redirectinstallment', ['_secure' => true]); - - return $url; + return $this->urlBuilder->getUrl('amazonpaymentservicesfort/payment/redirectinstallment', ['_secure' => true]); } protected function getCardTypeImg($imgName) { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/methods/'.$imgName); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/methods/'.$imgName); } protected function getCardLogoImg($imgName) { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/logos/'.$imgName); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/logos/'.$imgName); } protected function getStcLogo() { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/stcpay.png'); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/stcpay.png'); } protected function getTabbyLogo() { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/tabby-badge.png'); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/tabby-badge.png'); } protected function getValuConfig() { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/valu_logo.png'); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/valu_logo.png'); } protected function getBenefitLogo() { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/benefit-logo.png'); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/benefit-logo.png'); } - protected function getOmanNetLogo() + protected function getOmanNetLogo() { - $output = $this->getViewFileUrl('Amazonpaymentservices_Fort::images/omannet-logo.png'); - return $output; + return $this->getViewFileUrl('Amazonpaymentservices_Fort::images/omannet-logo.png'); } public function getViewFileUrl($fileId, array $params = []) diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Paymentcapture.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Paymentcapture.php index fc0b4a4..79740cb 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Paymentcapture.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Paymentcapture.php @@ -21,7 +21,6 @@ public function getIdentities() public function getDefaultValues() { - $values = []; - return $values; + return []; } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Model/Plugin/CreditmemoAddData.php b/magento2-aps/Amazonpaymentservices/Fort/Model/Plugin/CreditmemoAddData.php index 95f074e..c7a8b0c 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Model/Plugin/CreditmemoAddData.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Model/Plugin/CreditmemoAddData.php @@ -1,7 +1,7 @@ * @license GNU / GPL v3 @@ -183,12 +183,11 @@ public function beforeSave( if ($response['response_code'] != '06000') { throw new \Exception('Amazon Payment Service Error : '.$response['response_message']); - - } elseif ($response['response_code'] == '06000') { - $entity->setCustomerNote(json_encode($response)); - $this->_messageManager->addSuccessMessage('Refund Initiated'); - $this->_helper->log("\n\n 'Amazon Payment Service : ".$response['response_message']."\n\n"); } + + $entity->setCustomerNote(json_encode($response)); + $this->_messageManager->addSuccessMessage('Refund Initiated'); + $this->_helper->log("\n\n 'Amazon Payment Service : ".$response['response_message']."\n\n"); } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Observer/AddAppleShortcuts.php b/magento2-aps/Amazonpaymentservices/Fort/Observer/AddAppleShortcuts.php index f5dce59..366be3f 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Observer/AddAppleShortcuts.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Observer/AddAppleShortcuts.php @@ -7,7 +7,7 @@ /** * Amazonpaymentservices Shortcut button - * php version 7.3.* + * php version 8.2.* * * @author Amazonpaymentservices * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Observer/AddApsShortcuts.php b/magento2-aps/Amazonpaymentservices/Fort/Observer/AddApsShortcuts.php index b1441aa..0a2a2a6 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Observer/AddApsShortcuts.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Observer/AddApsShortcuts.php @@ -8,7 +8,7 @@ /** * Amazonpaymentservices Shortcut button - * php version 7.3.* + * php version 8.2.* * * @author Amazonpaymentservices * @license GNU / GPL v3 @@ -60,9 +60,8 @@ public function execute(Observer $observer) if (!$observer->getData('is_shopping_cart') || 1) { $shortcut = $shortcutButtons->getLayout() ->createBlock($this->buttonBlocks[self::APS_MINICART_ALIAS]); + $shortcutButtons->addShortcut($shortcut); } - - $shortcutButtons->addShortcut($shortcut); } } } diff --git a/magento2-aps/Amazonpaymentservices/Fort/Observer/AdminSystemConfigChangedPaymentObserver.php b/magento2-aps/Amazonpaymentservices/Fort/Observer/AdminSystemConfigChangedPaymentObserver.php index 906f729..b2be923 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Observer/AdminSystemConfigChangedPaymentObserver.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Observer/AdminSystemConfigChangedPaymentObserver.php @@ -2,7 +2,7 @@ /** * Admin System Config Changed Payment Observer - * php version 7.3.* + * php version 8.2.* * * @category Amazonpaymentservices * @package Amazonpaymentservices_Fort @@ -17,7 +17,7 @@ /** * Admin System Config Changed Payment Observer - * php version 7.3.* + * php version 8.2.* * * @author Amazonpaymentservices * @license GNU / GPL v3 diff --git a/magento2-aps/Amazonpaymentservices/Fort/Observer/BeforeOrderPlaceObserver.php b/magento2-aps/Amazonpaymentservices/Fort/Observer/BeforeOrderPlaceObserver.php index b334222..d4ca079 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Observer/BeforeOrderPlaceObserver.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Observer/BeforeOrderPlaceObserver.php @@ -2,7 +2,7 @@ /** * Before Order Place Observer - * php version 7.3.* + * php version 8.2.* * * @category Amazonpaymentservices * @package Amazonpaymentservices_Fort @@ -14,11 +14,12 @@ namespace Amazonpaymentservices\Fort\Observer; +use Magento\Framework\Event\Observer; use Magento\Framework\Event\ObserverInterface; /** * Before Order Place Observer - * php version 7.3.* + * php version 8.2.* * * @author Amazonpaymentservices * @license GNU / GPL v3 @@ -42,11 +43,11 @@ public function __construct(\Amazonpaymentservices\Fort\Helper\Data $helper) { $this->helper = $helper; } - + /** * Update items stock status and low stock date. * - * @param EventObserver $observer observer + * @param Observer $observer observer * * @return void */ diff --git a/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/CustomerData/DefaultItem.php b/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/CustomerData/DefaultItem.php index 1f058b0..f01c5b7 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/CustomerData/DefaultItem.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/CustomerData/DefaultItem.php @@ -7,7 +7,7 @@ namespace Amazonpaymentservices\Fort\Plugin\Checkout\CustomerData; use Magento\Quote\Model\Quote\Item; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; class DefaultItem { diff --git a/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/Ordersummary/Subscriptiondata.php b/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/Ordersummary/Subscriptiondata.php index a858573..97ad4ea 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/Ordersummary/Subscriptiondata.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Plugin/Checkout/Ordersummary/Subscriptiondata.php @@ -2,8 +2,9 @@ namespace Amazonpaymentservices\Fort\Plugin\Checkout\Ordersummary; +use Amazonpaymentservices\Fort\Helper\Data; use Magento\Checkout\Model\Session as CheckoutSession; -use \Magento\Framework\App\ObjectManager; +use Magento\Framework\App\ObjectManager; class Subscriptiondata { @@ -22,6 +23,7 @@ class Subscriptiondata * Constructor * * @param CheckoutSession $checkoutSession + * @param Data $helper */ public function __construct( CheckoutSession $checkoutSession, diff --git a/magento2-aps/Amazonpaymentservices/Fort/Setup/Patch/Data/InitialInstall.php b/magento2-aps/Amazonpaymentservices/Fort/Setup/Patch/Data/InitialInstall.php index 1b118bb..b33a8fd 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/Setup/Patch/Data/InitialInstall.php +++ b/magento2-aps/Amazonpaymentservices/Fort/Setup/Patch/Data/InitialInstall.php @@ -2,6 +2,11 @@ namespace Amazonpaymentservices\Fort\Setup\Patch\Data; +use Magento\Catalog\Setup\CategorySetupFactory; +use Magento\Eav\Model\Entity\Attribute\SetFactory; +use Magento\Eav\Model\Entity\TypeFactory; +use Magento\Eav\Model\ResourceModel\Entity\Attribute\Group\CollectionFactory; +use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\Patch\DataPatchInterface; use Magento\Framework\Setup\Patch\PatchRevertableInterface; @@ -42,6 +47,11 @@ class InitialInstall /** * @param ModuleDataSetupInterface $moduleDataSetup + * @param CategorySetupFactory $categorySetupFactory + * @param TypeFactory $eavTypeFactory + * @param SetFactory $attributeSetFactory + * @param EavSetupFactory $eavSetupFactory + * @param CollectionFactory $groupCollectionFactory */ public function __construct( ModuleDataSetupInterface $moduleDataSetup, @@ -180,8 +190,6 @@ private function sortGroup($attributeGroupName, $order) foreach ($setCollection as $attributeSet) { $this->updateAttributes($attributeSet, $attributeGroupName, $order); } - - return true; } /** diff --git a/magento2-aps/Amazonpaymentservices/Fort/composer.json b/magento2-aps/Amazonpaymentservices/Fort/composer.json index 23c0667..19acf01 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/composer.json +++ b/magento2-aps/Amazonpaymentservices/Fort/composer.json @@ -1,7 +1,7 @@ { "name": "amazonpaymentservices/module-fort", "description": "APS integration with payment gateway", - "version": "2.6.2", + "version": "2.6.3", "type": "magento2-module", "license": [ "MIT" diff --git a/magento2-aps/Amazonpaymentservices/Fort/etc/module.xml b/magento2-aps/Amazonpaymentservices/Fort/etc/module.xml index 1cef11f..1b54df1 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/etc/module.xml +++ b/magento2-aps/Amazonpaymentservices/Fort/etc/module.xml @@ -10,7 +10,7 @@ **/ --> - + diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/cron_command.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/cron_command.phtml index e02f704..6fd4912 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/cron_command.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/cron_command.phtml @@ -5,6 +5,6 @@ - getCronCommand();?> + getCronCommand();?> diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/host_to_host_url.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/host_to_host_url.phtml index 0d876d8..65953e2 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/host_to_host_url.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/host_to_host_url.phtml @@ -5,6 +5,6 @@ - getHostUrl();?> + getHostUrl();?> diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/order/view/view.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/order/view/view.phtml index eaf9f7c..2f6975e 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/order/view/view.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/order/view/view.phtml @@ -43,9 +43,7 @@ if ($isAvailable) { escapeHtml(__('Installments')); ?> - - - + @@ -55,9 +53,7 @@ if ($isAvailable) { escapeHtml(__('Installment Amount')); ?> - - - + @@ -67,9 +63,7 @@ if ($isAvailable) { escapeHtml(__('Installment Interest')); ?> - - - + diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/sub_cron_command.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/sub_cron_command.phtml index e6679e9..883c347 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/sub_cron_command.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/sub_cron_command.phtml @@ -5,6 +5,6 @@ - getCronCommand();?> + getCronCommand();?> diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/tab/view/myorderinfo.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/tab/view/myorderinfo.phtml index 6001cc7..9563549 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/tab/view/myorderinfo.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/adminhtml/templates/tab/view/myorderinfo.phtml @@ -22,6 +22,7 @@ if (isset($data['additionalData']['command']) && \Amazonpaymentservices\Fort\Mod
+ diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/templates/catalog/product/view/addtocart.phtml b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/templates/catalog/product/view/addtocart.phtml index 1d9915d..8db0b9c 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/templates/catalog/product/view/addtocart.phtml +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/templates/catalog/product/view/addtocart.phtml @@ -79,7 +79,7 @@ - +
- -
PaymentType Order Number
Grand Total
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/checkout-page.css b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/checkout-page.css index 289572e..e7eb9dc 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/checkout-page.css +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/checkout-page.css @@ -14,62 +14,91 @@ display: block !important; } +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-buy { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: buy; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-donate { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: donate; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-plain { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: plain; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-set-up { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: set-up; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-book { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: book; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-check-out { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: check-out; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-subscribe { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: subscribe; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-add-money { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: add-money; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-contribute { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: contribute; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-order { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: order; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-reload { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: reload; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-rent { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: rent; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-support { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: support ; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-tip { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: tip; } + +/*noinspection CssInvalidPropertyValue,CssUnknownProperty*/ .apple-pay-top-up { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: top-up; diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.css b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.css index 1232fca..55f1d52 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.css +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.css @@ -1,4 +1,4 @@ -@charset 'UTF-8'; +@charset "UTF-8"; /* Slider */ .slick-loading .slick-list { @@ -16,6 +16,7 @@ src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); } /* Arrows */ +/*noinspection CssUnknownProperty*/ .slick-prev, .slick-next { diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.less b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.less index e06fc18..a06d3dd 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.less +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick-theme.less @@ -22,6 +22,7 @@ } /* Arrows */ +//noinspection CssUnknownProperty .slick-prev, .slick-next { position: absolute; diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.css b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.css index 57477e8..a5907cd 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.css +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.css @@ -1,4 +1,5 @@ /* Slider */ +/*noinspection CssUnknownProperty*/ .slick-slider { position: relative; @@ -38,6 +39,7 @@ cursor: hand; } +/*noinspection CssUnknownProperty*/ .slick-slider .slick-track, .slick-slider .slick-list { diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.less b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.less index 8d1fc9f..819e67d 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.less +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/css/source/slick.less @@ -1,5 +1,6 @@ /* Slider */ +//noinspection CssUnknownProperty .slick-slider { position: relative; display: block; @@ -30,6 +31,8 @@ cursor: hand; } } + +//noinspection CssUnknownProperty .slick-slider .slick-track, .slick-slider .slick-list { -webkit-transform: translate3d(0, 0, 0); diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/aps_fort.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/aps_fort.js index dfc617b..ec62e75 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/aps_fort.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/aps_fort.js @@ -3,10 +3,8 @@ var apsFort = (function () { validateCardHolderName: function (element) { jQuery(element).val(this.trimString(element.val())); var cardHolderName = jQuery(element).val(); - if (cardHolderName.length > 50) { - return false; - } - return true; + return cardHolderName.length <= 50; + }, translate: function (key, category, replacments) { if (!this.isDefined(category)) { @@ -21,10 +19,7 @@ var apsFort = (function () { return message; }, isDefined: function (variable) { - if (typeof (variable) === 'undefined' || typeof (variable) === null) { - return false; - } - return true; + return !(typeof (variable) === 'undefined' || typeof (variable) === null); }, isTouchDevice: function () { return 'ontouchstart' in window // works on most browsers diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc-method.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc-method.js index 6702991..001ab12 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc-method.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc-method.js @@ -48,7 +48,7 @@ define( }, getTitle: function () { if (window.checkoutConfig.payment.apsFort.aps_fort_cc.mada == 'yes' || window.checkoutConfig.payment.apsFort.aps_fort_cc.meeza == 'yes') { - return $.mage.__('mada debit card / Credit Cards'); + return $.mage.__('mada debit card / Credit Cards / Apple Pay'); } return window.checkoutConfig.payment.apsFort.aps_fort_cc.title }, @@ -147,7 +147,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") @@ -192,7 +192,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc_merchant_page2-method.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc_merchant_page2-method.js index e96ceaa..90d69f7 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc_merchant_page2-method.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_cc_merchant_page2-method.js @@ -499,8 +499,7 @@ define( } var expYear = cardInfo.expirationYear; expYear = expYear.substr(expYear.length - 2); - var expiryDate = expYear+''+expMonth; - cardInfo.expiryDate = expiryDate; + cardInfo.expiryDate = expYear+''+expMonth; var rememberMe = 'NO'; if ($('.ccform .remember_me:checked').val() == 'YES') { rememberMe = 'YES'; @@ -581,7 +580,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") @@ -618,8 +617,7 @@ define( } var expYear = cardInfo.expirationYear; expYear = expYear.substr(expYear.length - 2); - var expiryDate = expYear+''+expMonth; - cardInfo.expiryDate = expiryDate; + cardInfo.expiryDate = expYear+''+expMonth; $.ajax({ url: window.checkoutConfig.payment.apsFort.aps_installment.ajaxInstallmentUrl, @@ -729,8 +727,7 @@ define( } var expYear = cardInfo.expirationYear; expYear = expYear.substr(expYear.length - 2); - var expiryDate = expYear+''+expMonth; - cardInfo.expiryDate = expiryDate; + cardInfo.expiryDate = expYear+''+expMonth; var rememberMe = 'NO'; if ($('.ccform .remember_me:checked').val() == 'YES') { rememberMe = 'YES'; @@ -811,7 +808,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc-merchant.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc-merchant.js index 84203d9..44c1f86 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc-merchant.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc-merchant.js @@ -125,7 +125,7 @@ define( $.mage.redirect(response.url+"?id="+randomNum); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc.js index 343b683..d55ab2d 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_stc.js @@ -111,7 +111,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_tabby.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_tabby.js index d480220..260e142 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_tabby.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_tabby.js @@ -112,7 +112,7 @@ define( $('#'+formId).submit(); return false; } else { - msg = response.error_messages; + let msg = response.error_messages; if (typeof (msg) === 'object') { alert({ content: msg.join("\n") diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_valu-method.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_valu-method.js index e9328a0..cc7996d 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_valu-method.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_fort_valu-method.js @@ -301,7 +301,7 @@ define( } else { var msg = response.error_messages; if (typeof (msg) === 'object') { - content: msg.join("\n") + msg.join("\n") } if (msg) { $('[data-action="error-purchase"]').text($.mage.__(response.response_message)); diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_installment_hosted-method.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_installment_hosted-method.js index 86a98c9..5ee25fb 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_installment_hosted-method.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/payment/method-renderer/aps_installment_hosted-method.js @@ -412,8 +412,7 @@ define( } var expYear = cardInfo.expirationYear; expYear = expYear.substr(expYear.length - 2); - var expiryDate = expYear+''+expMonth; - cardInfo.expiryDate = expiryDate; + cardInfo.expiryDate = expYear+''+expMonth; $.ajax({ url: window.checkoutConfig.payment.apsFort.aps_installment.ajaxUrl, diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/summary/item/details.js b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/summary/item/details.js index f9acf8b..c602d78 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/summary/item/details.js +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/js/view/summary/item/details.js @@ -15,11 +15,7 @@ define( }, getApsProductSubscription: function (quoteItem) { var item = this.getItem(quoteItem.item_id); - if (item.aps_product_subscription == true) { - return true; - } else { - return false; - } + return item.aps_product_subscription == true; }, getApsProductSubscriptionFrequency: function (quoteItem) { var item = this.getItem(quoteItem.item_id); diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-apple.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-apple.html index 6dc444e..5edeee2 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-apple.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-apple.html @@ -14,6 +14,7 @@ value="applepay" data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/> +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-form.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-form.html index a8c892d..fab2cd0 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-form.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-form.html @@ -71,30 +71,31 @@
-
-
- +
+
+ +
+
+
+ + + +
-
-
- - - - -
-
-
- +
+
+ +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-benefit.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-benefit.html index 2ac3ef3..864fefc 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-benefit.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-benefit.html @@ -28,30 +28,31 @@ -
-
- +
+
+ +
+
+
+ + + +
-
-
- - - - -
-
-
- +
+
+ +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-omannet.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-omannet.html index 983c91c..74c3fa4 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-omannet.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment-omannet.html @@ -28,30 +28,31 @@ -
-
- +
+
+ +
+
+
+ + + +
-
-
- - - - -
-
-
- +
+
+ +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment.html index 041ac7e..fddcc02 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-payment.html @@ -24,30 +24,31 @@ -
-
- +
+
+ +
+
+
+ + + +
-
-
- - - - -
-
-
- +
+
+ +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-stc.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-stc.html index 002624a..54b93bf 100755 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-stc.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-stc.html @@ -56,30 +56,31 @@ -
-
- +
+
+ +
+
+
+ + + +
-
-
- - - - -
-
-
- +
+
+ +
diff --git a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-tabby.html b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-tabby.html index 0ee455a..661c452 100644 --- a/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-tabby.html +++ b/magento2-aps/Amazonpaymentservices/Fort/view/frontend/web/template/payment/aps-tabby.html @@ -84,3 +84,4 @@ +