Skip to content

Commit

Permalink
hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetselim committed Feb 18, 2021
1 parent 30a7971 commit 8420b09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions upload/catalog/controller/extension/payment/paywithiyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private function setcookieSameSite($name, $value, $expire, $path, $domain, $secu
}
}

public function index() {
public function index() {


$cookieControl = false;
Expand Down Expand Up @@ -64,6 +64,7 @@ public function index() {
$secret_key = $this->config->get('payment_iyzico_secret_key');
$payment_source = "OPENCART-".$this->module_version."|".$this->module_product_name."|".$this->config->get('payment_paywithiyzico_design');


$user_create_date = $this->model_extension_payment_paywithiyzico->getUserCreateDate($user_id);

$this->session->data['conversation_id'] = $order_id;
Expand All @@ -83,9 +84,10 @@ public function index() {
$paywithiyzico->basketId = $order_id;
$paywithiyzico->paymentGroup = "PRODUCT";
$paywithiyzico->callbackUrl = $this->url->link('extension/payment/paywithiyzico/getcallback', '', true);
$paywithiyzico->cancelUrl = $this->url->link('extension/payment/paywithiyzico/getcallback', '', true);
$paywithiyzico->cancelUrl = $this->config->get('config_url');
$paywithiyzico->paymentSource = $payment_source;


if ($paywithiyzico->paidPrice === 0) {
return false;
}
Expand Down Expand Up @@ -162,8 +164,8 @@ public function index() {

$data['pwi_redirect'] = $form_response->payWithIyzicoPageUrl;

return $this->load->view('extension/payment/paywithiyzico_form',$data);
}
return $this->load->view('extension/payment/paywithiyzico_form',$data);
}


public function getCallBack() {
Expand Down Expand Up @@ -520,4 +522,4 @@ private function getIpAdress() {
return $ip_address;
}

}
}
4 changes: 2 additions & 2 deletions upload/catalog/model/extension/payment/paywithiyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function hashGenerate($pki,$api_key,$secret_key,$random_value) {

public function createFormInitializeDetailRequest($json,$authorization_data) {

$url = "https://sandbox-api.iyzipay.com";
$url = $this->config->get('payment_iyzico_api_url');
$url = $url.'/payment/iyzipos/checkoutform/auth/ecom/detail';

return $this->curlPost($json,$authorization_data,$url);
Expand All @@ -212,7 +212,7 @@ public function createFormInitializeDetailRequest($json,$authorization_data) {

public function createFormInitializeRequest($json,$authorization_data) {

$url = "https://sandbox-api.iyzipay.com";
$url = $this->config->get('payment_iyzico_api_url');
$url = $url.'/payment/pay-with-iyzico/initialize';


Expand Down

0 comments on commit 8420b09

Please sign in to comment.