diff --git a/Block/.DS_Store b/Block/.DS_Store new file mode 100644 index 0000000..5124425 Binary files /dev/null and b/Block/.DS_Store differ diff --git a/Block/Adminhtml/.DS_Store b/Block/Adminhtml/.DS_Store new file mode 100644 index 0000000..7c00970 Binary files /dev/null and b/Block/Adminhtml/.DS_Store differ diff --git a/Block/Adminhtml/Config/Fieldset.php b/Block/Adminhtml/Config/Fieldset.php index dd3f9ba..2df51a6 100755 --- a/Block/Adminhtml/Config/Fieldset.php +++ b/Block/Adminhtml/Config/Fieldset.php @@ -23,6 +23,8 @@ public function __construct( public function _getHeaderHtml($element) { + + if ($element->getIsNested()) { $html = '
'; } else { @@ -47,7 +49,7 @@ public function _getHeaderHtml($element) ) . '" />'; $html .= '
'; $html .= '' . $element->getLegend().''; - + $html .= $this->_getHeaderCommentHtml($element); // field label column @@ -55,14 +57,14 @@ public function _getHeaderHtml($element) if ($this->getRequest()->getParam('website') || $this->getRequest()->getParam('store')) { $html .= ''; } + $html .= ''; $html .= '
- - + +
'; return $html; } - + } diff --git a/Controller/IyzicoBase/IyzicoFormObjectGenerator.php b/Controller/IyzicoBase/IyzicoFormObjectGenerator.php index d35bbf1..63a0c43 100755 --- a/Controller/IyzicoBase/IyzicoFormObjectGenerator.php +++ b/Controller/IyzicoBase/IyzicoFormObjectGenerator.php @@ -2,19 +2,19 @@ /** * iyzico Payment Gateway For Magento 2 * Copyright (C) 2018 iyzico - * + * * This file is part of Iyzico/Iyzipay. - * + * * Iyzico/Iyzipay is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -24,7 +24,7 @@ use stdClass; use Iyzico\Iyzipay\Helper\IyzicoHelper; -class IyzicoFormObjectGenerator +class IyzicoFormObjectGenerator { protected $helper; @@ -48,8 +48,8 @@ public function generateOption($checkoutSession,$cardUserKey,$locale,$currency,$ $iyzico->forceThreeDS = "0"; $iyzico->callbackUrl = $callBack."Iyzico_Iyzipay/response/iyzicocheckoutform"; $iyzico->cardUserKey = $cardUserKey; - $iyzico->paymentSource = "MAGENTO2|".$magentoVersion."|SPACE-1.0"; - + $iyzico->paymentSource = "MAGENTO2|".$magentoVersion."|SPACE-1.0.1"; + return $iyzico; } @@ -68,27 +68,27 @@ public function generateBuyer($checkoutSession,$guestEmail) { if($billingAddress->getEmail()){ $email = $billingAddress->getEmail(); - + } else { - + $email = $guestEmail; } - + $buyer = new stdClass(); $buyer->id = $billingAddress->getId(); $buyer->name = $this->helper->dataCheck($billingAddress->getName()); $buyer->surname = $this->helper->dataCheck($billingAddress->getName()); - $buyer->identityNumber = "11111111111"; - $buyer->email = $this->helper->dataCheck($email); - $buyer->gsmNumber = $this->helper->dataCheck($billingAddress->getTelephone()); + $buyer->identityNumber = "11111111111"; + $buyer->email = $this->helper->dataCheck($email); + $buyer->gsmNumber = $this->helper->dataCheck($billingAddress->getTelephone()); $buyer->registrationDate = "2018-07-06 11:11:11"; $buyer->lastLoginDate = "2018-07-06 11:11:11"; - $buyer->registrationAddress = $this->helper->dataCheck($billingStreet); + $buyer->registrationAddress = $this->helper->dataCheck($billingStreet); $buyer->city = $this->helper->dataCheck($billingAddress->getCity()); - $buyer->country = $this->helper->dataCheck($billingAddress->getCountry()); - $buyer->zipCode = $this->helper->dataCheck($billingAddress->getPostCode()); - $buyer->ip = $_SERVER['REMOTE_ADDR']; + $buyer->country = $this->helper->dataCheck($billingAddress->getCountry()); + $buyer->zipCode = $this->helper->dataCheck($billingAddress->getPostCode()); + $buyer->ip = $_SERVER['REMOTE_ADDR']; return $buyer; } @@ -130,10 +130,10 @@ public function generateBillingAddress($checkoutSession) { $billingAddressObj = new stdClass(); $billingAddressObj->address = $this->helper->dataCheck($billingStreet); - $billingAddressObj->zipCode = $this->helper->dataCheck($billingAddress->getPostCode()); + $billingAddressObj->zipCode = $this->helper->dataCheck($billingAddress->getPostCode()); $billingAddressObj->contactName = $this->helper->dataCheck($billingAddress->getName()); $billingAddressObj->city = $this->helper->dataCheck($billingAddress->getCity()); - $billingAddressObj->country = $this->helper->dataCheck($billingAddress->getCountry()); + $billingAddressObj->country = $this->helper->dataCheck($billingAddress->getCountry()); return $billingAddressObj; } @@ -180,4 +180,4 @@ public function generateBasketItems($checkoutSession) { -} \ No newline at end of file +} diff --git a/Controller/IyzicoBase/IyzicoResponseObjectGenerator.php b/Controller/IyzicoBase/IyzicoResponseObjectGenerator.php index c4ea7eb..2be3ed6 100755 --- a/Controller/IyzicoBase/IyzicoResponseObjectGenerator.php +++ b/Controller/IyzicoBase/IyzicoResponseObjectGenerator.php @@ -2,19 +2,19 @@ /** * iyzico Payment Gateway For Magento 2 * Copyright (C) 2018 iyzico - * + * * This file is part of Iyzico/Iyzipay. - * + * * Iyzico/Iyzipay is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -24,7 +24,7 @@ use stdClass; use Iyzico\Iyzipay\Helper\IyzicoHelper; -class IyzicoResponseObjectGenerator +class IyzicoResponseObjectGenerator { protected $helper; @@ -43,7 +43,7 @@ public function generateTokenDetailObject($conversationId,$token) { $tokenDetail->token = $token; return $tokenDetail; - + } diff --git a/Controller/Response/IyzicoCheckoutForm.php b/Controller/Response/IyzicoCheckoutForm.php index b54d15e..0a2f2f0 100755 --- a/Controller/Response/IyzicoCheckoutForm.php +++ b/Controller/Response/IyzicoCheckoutForm.php @@ -153,6 +153,16 @@ public function execute() $iyziOrderModel->setData('status',$requestResponse->status); $iyziOrderModel->save($iyziOrderModel); + /*Korumalı havale eft */ + if($requestResponse->paymentStatus == 'INIT_BANK_TRANSFER' && $requestResponse->status == 'success'){ + $this->_quote->setCheckoutMethod($this->_cartManagement::METHOD_GUEST); + $this->_cartManagement->placeOrder($this->_quote->getId()); + $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]); + return $resultRedirect; + } + + + /* Error Redirect Start */ if($requestResponse->paymentStatus != 'SUCCESS' || $requestResponse->status != 'success') { @@ -243,13 +253,13 @@ public function execute() $this->_quote->setCheckoutMethod($this->_cartManagement::METHOD_GUEST); $this->_quote->setCustomerEmail($this->_customerSession->getEmail()); - $this->_cartManagement->placeOrder($this->_quote->getId()); } - $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]); return $resultRedirect; + + } } diff --git a/Model/Config/Source/OverlayScript.php b/Model/Config/Source/OverlayScript.php index c7662f6..24978d0 100755 --- a/Model/Config/Source/OverlayScript.php +++ b/Model/Config/Source/OverlayScript.php @@ -2,19 +2,19 @@ /** * iyzico Payment Gateway For Magento 2 * Copyright (C) 2018 iyzico - * + * * This file is part of Iyzico/Iyzipay. - * + * * Iyzico/Iyzipay is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ diff --git a/Model/Payment/Iyzipay.php b/Model/Payment/Iyzipay.php index d3298b0..3b193ea 100755 --- a/Model/Payment/Iyzipay.php +++ b/Model/Payment/Iyzipay.php @@ -2,19 +2,19 @@ /** * iyzico Payment Gateway For Magento 2 * Copyright (C) 2018 iyzico - * + * * This file is part of Iyzico/Iyzipay. - * + * * Iyzico/Iyzipay is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -23,15 +23,15 @@ class Iyzipay extends \Magento\Payment\Model\Method\AbstractMethod { - const PLUGIN_VERSION = '1.0.0'; + const PLUGIN_VERSION = '1.0.1'; protected $_code = "iyzipay"; protected $_isOffline = true; - + public function isAvailable( \Magento\Quote\Api\Data\CartInterface $quote = null ) { return parent::isAvailable($quote); } - + } diff --git a/composer.json b/composer.json index 36d8dfc..affcc49 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "iyzico/iyzipay", "description": "iyzico Payment Gateway For Magento 2", "type": "magento2-module", - "version": "1.0.0", + "version": "1.0.1", "license": "GPL-3.0", "authors": [ { diff --git a/etc/config.xml b/etc/config.xml index dcb0ee2..17b6cdb 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -9,6 +9,7 @@ Kredi/Banka Kartı ile Ödeme 0 offline + TR diff --git a/etc/module.xml b/etc/module.xml index 2f9d56d..96764b2 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - + diff --git a/view/.DS_Store b/view/.DS_Store new file mode 100644 index 0000000..d4e09f1 Binary files /dev/null and b/view/.DS_Store differ diff --git a/view/adminhtml/.DS_Store b/view/adminhtml/.DS_Store new file mode 100644 index 0000000..b55b38c Binary files /dev/null and b/view/adminhtml/.DS_Store differ diff --git a/view/adminhtml/web/.DS_Store b/view/adminhtml/web/.DS_Store new file mode 100644 index 0000000..82720a0 Binary files /dev/null and b/view/adminhtml/web/.DS_Store differ diff --git a/view/adminhtml/web/iyzico/iyzico_logo.png b/view/adminhtml/web/iyzico/iyzico_logo.png new file mode 100644 index 0000000..e9d57a7 Binary files /dev/null and b/view/adminhtml/web/iyzico/iyzico_logo.png differ diff --git a/view/frontend/web/template/payment/iyzipay.html b/view/frontend/web/template/payment/iyzipay.html index 793c461..4532ff7 100755 --- a/view/frontend/web/template/payment/iyzipay.html +++ b/view/frontend/web/template/payment/iyzipay.html @@ -127,7 +127,7 @@
-

iyzico

+

iyzico

@@ -173,7 +173,7 @@ .loading{ width:40px; height:40px; - background-color:#4ec8f1; + background-color:#1E64FF; margin:auto; -webkit-animation:sk-rotateplane 1.2s infinite ease-in-out; animation:sk-rotateplane 1.2s infinite ease-in-out @@ -192,4 +192,3 @@ -webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)} } -