diff --git a/upload/admin/controller/extension/payment/iyzico.php b/upload/admin/controller/extension/payment/iyzico.php index a99b4ef..890dc29 100755 --- a/upload/admin/controller/extension/payment/iyzico.php +++ b/upload/admin/controller/extension/payment/iyzico.php @@ -1,6 +1,6 @@ model_setting_event->deleteEventByCode('module_notification'); } + protected function validate() { + + if (!$this->user->hasPermission('modify', 'extension/payment/iyzico')) { + $this->error['warning'] = $this->language->get('error_permission'); + } + + foreach ($this->fields as $key => $field) { + + if($field['validateField'] != 'blank') { + + if (!$this->request->post[$field['name']]){ + $this->error[$field['validateField']] = $this->language->get($field['validateField']); + } + } + + } + + return !$this->error; + } + public function requestIyzico($request,$method_type,$extra_request = false) { $request_modify = array(); @@ -292,25 +312,5 @@ public function requestIyzico($request,$method_type,$extra_request = false) { } - protected function validate() { - - if (!$this->user->hasPermission('modify', 'extension/payment/worldpay')) { - $this->error['warning'] = $this->language->get('error_permission'); - } - - foreach ($this->fields as $key => $field) { - - if($field['validateField'] != 'blank') { - - if (!$this->request->post[$field['name']]){ - $this->error[$field['validateField']] = $this->language->get($field['validateField']); - } - } - - } - - return !$this->error; - } - } diff --git a/upload/admin/model/extension/payment/iyzico.php b/upload/admin/model/extension/payment/iyzico.php index 722f28e..b0bcd4b 100755 --- a/upload/admin/model/extension/payment/iyzico.php +++ b/upload/admin/model/extension/payment/iyzico.php @@ -1,6 +1,6 @@ $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 .= "["; foreach ($result as $key => $item) { @@ -76,42 +66,32 @@ public function pkiStringGenerate($object_data) { $name = str_replace("'", "", $name); $pki_value .= $name."="."".$item; - if(end($result) != $item) { $pki_value .= ","; } - if(end($result) == $item) { - if(end($data) != $result) { - + if($end_key != $count) { $pki_value .= "], "; } else { - $pki_value .= "]"; } } } } - if(end($data) == $result) $pki_value .= "]"; } else { - $name = var_export($key, true); $name = str_replace("'", "", $name); - $pki_value .= $name."="."".$data.""; } - if(end($object_data) != $data) $pki_value .= ","; } - $pki_value .= "]"; - return $pki_value; } diff --git a/upload/admin/view/template/extension/payment/iyzico.twig b/upload/admin/view/template/extension/payment/iyzico.twig index cc0cc2e..e210cd8 100755 --- a/upload/admin/view/template/extension/payment/iyzico.twig +++ b/upload/admin/view/template/extension/payment/iyzico.twig @@ -307,7 +307,7 @@ -

Sunucu sağlayıcınızla görüşerek OpenSSL versiyonunu minimum 1.0.1’e, curl versiyonunu 7.3.4 yukseltebilirsiniz.

+

Sunucu sağlayıcınızla görüşerek OpenSSL versiyonunu minimum 1.0.1’e, curl versiyonunu 7.30.4 yukseltebilirsiniz.

diff --git a/upload/catalog/controller/extension/payment/iyzico.php b/upload/catalog/controller/extension/payment/iyzico.php index 2232fc6..ae0ba59 100755 --- a/upload/catalog/controller/extension/payment/iyzico.php +++ b/upload/catalog/controller/extension/payment/iyzico.php @@ -3,7 +3,7 @@ class ControllerExtensionPaymentIyzico extends Controller { private $module_version = VERSION; - private $module_product_name = 'eleven-1.0'; + private $module_product_name = 'eleven-1.1'; public function index() { diff --git a/upload/catalog/model/extension/payment/iyzico.php b/upload/catalog/model/extension/payment/iyzico.php index d522a81..81ca59b 100755 --- a/upload/catalog/model/extension/payment/iyzico.php +++ b/upload/catalog/model/extension/payment/iyzico.php @@ -119,42 +119,32 @@ public function createFormInitializObjectSort($object_data) { } public function pkiStringGenerate($object_data) { - + $pki_value = "["; foreach ($object_data 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 .= "["; foreach ($result as $key => $item) { @@ -162,47 +152,36 @@ public function pkiStringGenerate($object_data) { $name = str_replace("'", "", $name); $pki_value .= $name."="."".$item; - if(end($result) != $item) { $pki_value .= ","; } - if(end($result) == $item) { - if(end($data) != $result) { - + if($end_key != $count) { $pki_value .= "], "; } else { - $pki_value .= "]"; } } } } - if(end($data) == $result) $pki_value .= "]"; } else { - $name = var_export($key, true); $name = str_replace("'", "", $name); - $pki_value .= $name."="."".$data.""; } - if(end($object_data) != $data) $pki_value .= ","; } - $pki_value .= "]"; - return $pki_value; } - public function hashGenerate($pki,$api_key,$secret_key,$random_value) { $hash = $api_key . $random_value . $secret_key . $pki;