Skip to content

Commit

Permalink
+new version 1.0.1v
Browse files Browse the repository at this point in the history
feyzullahdemir committed Jun 17, 2022
1 parent c1750c8 commit 0ea7cb8
Showing 16 changed files with 62 additions and 50 deletions.
Binary file added Block/.DS_Store
Binary file not shown.
Binary file added Block/Adminhtml/.DS_Store
Binary file not shown.
14 changes: 8 additions & 6 deletions Block/Adminhtml/Config/Fieldset.php
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ public function __construct(

public function _getHeaderHtml($element)
{


if ($element->getIsNested()) {
$html = '<tr class="nested"><td colspan="4"><div class="' . $this->_getFrontendClass($element) . '">';
} else {
@@ -47,22 +49,22 @@ public function _getHeaderHtml($element)
) . '" />';
$html .= '<fieldset class="config admin__collapsible-block" id="' . $element->getHtmlId() . '" style="position: relative;">';
$html .= '<legend>' . $element->getLegend().'</legend>';

$html .= $this->_getHeaderCommentHtml($element);

// field label column
$html .= '<table cellspacing="0" class="form-list"><colgroup class="label" /><colgroup class="value" />';
if ($this->getRequest()->getParam('website') || $this->getRequest()->getParam('store')) {
$html .= '<colgroup class="use-default" />';
}

$html .= '<colgroup class="scope-label" /><colgroup class="" /><tbody>';
$html .= '<div style="position:absolute;right: 0px;top:0px;display: flex;flex-direction: column;justify-content: center;">
<img src="'.$this->getViewFileUrl('Iyzico_Iyzipay::iyzico/logo.png').'" style=" width: 150px;
margin-left: auto;" />
<img src="'.$this->getViewFileUrl('Iyzico_Iyzipay::iyzico/zihni.png').'" style=" width: auto;
margin-left: auto;" />
<img src="'.$this->getViewFileUrl('Iyzico_Iyzipay::iyzico/iyzico_logo.png').'" style=" width: 200px;
margin-left: auto;" /><span></span>
</div>';
return $html;
}

}
40 changes: 20 additions & 20 deletions Controller/IyzicoBase/IyzicoFormObjectGenerator.php
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
@@ -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) {



}
}
12 changes: 6 additions & 6 deletions Controller/IyzicoBase/IyzicoResponseObjectGenerator.php
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
@@ -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;

}


14 changes: 12 additions & 2 deletions Controller/Response/IyzicoCheckoutForm.php
Original file line number Diff line number Diff line change
@@ -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;



}
}
8 changes: 4 additions & 4 deletions Model/Config/Source/OverlayScript.php
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
14 changes: 7 additions & 7 deletions Model/Payment/Iyzipay.php
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
*/
@@ -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);
}

}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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": [
{
1 change: 1 addition & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
<title>Kredi/Banka Kartı ile Ödeme</title>
<allowspecific>0</allowspecific>
<group>offline</group>
<checkout_language>TR</checkout_language>
</iyzipay>
</payment>
</default>
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Iyzico_Iyzipay" setup_version="1.0.0"/>
<module name="Iyzico_Iyzipay" setup_version="1.0.1"/>
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Checkout"/>
Binary file added view/.DS_Store
Binary file not shown.
Binary file added view/adminhtml/.DS_Store
Binary file not shown.
Binary file added view/adminhtml/web/.DS_Store
Binary file not shown.
Binary file added view/adminhtml/web/iyzico/iyzico_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions view/frontend/web/template/payment/iyzipay.html
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@
<div class="loading">
</div>
<div class="brand">
<p style="text-align:center;color:#4ec8f1;">iyzico</p>
<p style="text-align:center;color:#1E64FF;">iyzico</p>
</div>
</div>
</div>
@@ -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)}
}
</style>

0 comments on commit 0ea7cb8

Please sign in to comment.