Skip to content

Commit

Permalink
Bug Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
feyzullahdemir committed Aug 8, 2023
1 parent bb470a0 commit 786b291
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 28 deletions.
Binary file modified Block/.DS_Store
Binary file not shown.
Binary file added Block/Adminhtml/.DS_Store
Binary file not shown.
Binary file modified Controller/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Controller/IyzicoBase/IyzicoFormObjectGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function generateOption($checkoutSession,$locale,$currency,$cardId,$callB
$iyzico->paymentGroup = 'PRODUCT';
$iyzico->callbackUrl = $callBack."Iyzico_PayWithIyzico/response/paywithiyzico";
$iyzico->cancelUrl = $callBack;
$iyzico->paymentSource = "MAGENTO2|".$magentoVersion."|SPACE-1.0|PWI";
$iyzico->paymentSource = "MAGENTO2|".$magentoVersion."|SPACE-1.2.0|PWI";

return $iyzico;

Expand Down
37 changes: 13 additions & 24 deletions Controller/IyzicoBase/IyzicoPkiStringBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,28 @@ public function pkiStringGenerate($objectData) {

$pki_value = "[";
foreach ($objectData as $key => $data) {

if(is_object($data)) {

$name = var_export($key, true);
$name = str_replace("'", "", $name);
$pki_value .= $name."=[";

$end_key = count(get_object_vars($data));
$count = 0;

foreach ($data as $key => $value) {

$count++;
$name = var_export($key, true);
$name = str_replace("'", "", $name);


$pki_value .= $name."="."".$value;

if($end_key != $count)
$pki_value .= ",";
}

$pki_value .= "]";

} else if(is_array($data)) {
$name = var_export($key, true);
$name = str_replace("'", "", $name);

$pki_value .= $name."=[";
$end_key = count($data);
$count = 0;

foreach ($data as $key => $result) {

$count++;
$pki_value .= "[";

Expand All @@ -73,42 +60,44 @@ public function pkiStringGenerate($objectData) {
$name = str_replace("'", "", $name);

$pki_value .= $name."="."".$item;
$reResult = (array) $result;
$newResult = $reResult[array_key_last($reResult)];

if(end($result) != $item) {
if($newResult != $item) {
$pki_value .= ",";
}

if(end($result) == $item) {
if($end_key != $count) {
if($newResult == $item) {

if($end_key != $count) {
$pki_value .= "], ";

} else {

$pki_value .= "]";
}
}
}
}

if(end($data) == $result)
$reData = (array) $data;
$newData = $reData[array_key_last($reData)];
if($newData == $result)
$pki_value .= "]";

} else {

$name = var_export($key, true);
$name = str_replace("'", "", $name);


$pki_value .= $name."="."".$data."";
}

if(end($objectData) != $data)
$reObjectData = (array)$objectData;
$newobjectData = $reObjectData[array_key_last($reObjectData)];

if($newobjectData != $data)
$pki_value .= ",";
}

$pki_value .= "]";

return $pki_value;
}

Expand Down Expand Up @@ -143,7 +132,7 @@ public function createFormObjectSort($objectData) {
$form_object->paymentSource = $objectData->paymentSource;
$form_object->currency = $objectData->currency;
$form_object->paidPrice = $objectData->paidPrice;
$form_object->cancelUrl = $objectData->cancelUrl;
$form_object->cancelUrl = $objectData->cancelUrl;

return $form_object;
}
Expand Down
Binary file added Model/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Model/Payment/PayWithIyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class PayWithIyzico extends \Magento\Payment\Model\Method\AbstractMethod
{
const PLUGIN_VERSION = '1.1.0';
const PLUGIN_VERSION = '1.2.0';
protected $_code = "paywithiyzico";
protected $_isOffline = true;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "iyzico/paywithiyzico",
"description": "pay with iyzico Payment Gateway For Magento 2",
"type": "magento2-module",
"version": "1.1.0",
"version": "1.2.0",
"license": "GPL-3.0",
"authors": [
{
Expand Down
Binary file added etc/.DS_Store
Binary file not shown.
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_PayWithIyzico" setup_version="1.1.0"/>
<module name="Iyzico_PayWithIyzico" setup_version="1.2.0"/>
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Checkout"/>
Expand Down
Binary file modified view/.DS_Store
Binary file not shown.

0 comments on commit 786b291

Please sign in to comment.