Skip to content

Commit

Permalink
+BaserUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
feyzullahdemir committed Mar 1, 2023
1 parent 1e1a487 commit a7268d4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Binary file added paywithiyzico/.DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions paywithiyzico/classes/PaywithiyzicoObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function option($params, $context)
$paywithiyzico->paymentGroup = 'PRODUCT';
$paywithiyzico->callbackUrl = $httpProtocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__.'index.php?module_action=init&fc=module&module=paywithiyzico&controller=callback';
$paywithiyzico->cancelUrl = $httpProtocol.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__;
$paywithiyzico->paymentSource = _PS_VERSION_.'|PRESTASHOP|AIR|1.0.0|PWI';
$paywithiyzico->paymentSource = _PS_VERSION_.'|PRESTASHOP|AIR|1.0.5|PWI';

return $paywithiyzico;
}
Expand Down Expand Up @@ -190,10 +190,10 @@ public static function checkoutFormObjectSort($objectData)
$form_object->currency = $objectData->currency;
$form_object->paidPrice = $objectData->paidPrice;
$form_object->cancelUrl = $objectData->cancelUrl;


return $form_object;

}

/**
Expand Down Expand Up @@ -232,4 +232,4 @@ public static function cancelObject($locale, $paymentId, $ip)

return $responseObject;
}
}
}
2 changes: 1 addition & 1 deletion paywithiyzico/config_tr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>paywithiyzico</name>
<displayName><![CDATA[iyzico ile &Ouml;de]]></displayName>
<version><![CDATA[1.0.0]]></version>
<version><![CDATA[1.0.5]]></version>
<description><![CDATA[Prestashop i&ccedil;in iyzico ile &Ouml;de]]></description>
<author><![CDATA[iyzico]]></author>
<tab><![CDATA[payments_gateways]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion paywithiyzico/controllers/front/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function init(){
$apiKey = Configuration::get('IYZICO_FORM_LIVE_API_ID');
$secretKey = Configuration::get('IYZICO_FORM_LIVE_SECRET');
$rand = rand(100000, 99999999);
$endpoint = Paywithiyzico::$baseUrl;
$endpoint = Configuration::get('IYZICO_FORM_BASEURL');
$responseObject = PaywithiyzicoObject::responseObject($orderCartId, $token, $locale);

$pkiString = PaywithiyzicoPkiStringBuilder::pkiStringGenerate($responseObject);
Expand Down
12 changes: 6 additions & 6 deletions paywithiyzico/paywithiyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

class Paywithiyzico extends PaymentModule{

public static $baseUrl = "https://sandbox-api.iyzipay.com";
//public static $baseUrl = Configuration::get('IYZICO_FORM_BASEURL');

public function __construct()
{
$this->name = "paywithiyzico";
$this->tab = 'payments_gateways';
$this->version = '1.0.0';
$this->version = '1.0.5';
$this->author = 'iyzico';
$this->bootstrap = true;

Expand All @@ -28,7 +28,7 @@ public function __construct()

$this->checkAndSetCookieSameSite();
}

public function install(){

if (!parent::install()
Expand Down Expand Up @@ -128,7 +128,7 @@ public function PwiGenerate($params)
$apiKey = Configuration::get('IYZICO_FORM_LIVE_API_ID');
$secretKey = Configuration::get('IYZICO_FORM_LIVE_SECRET');
$rand = rand(100000, 99999999);
$endpoint = self::$baseUrl;
$endpoint = Configuration::get('IYZICO_FORM_BASEURL');

$paywithiyzico = PaywithiyzicoObject::option($params, $context);
$paywithiyzico->buyer = PaywithiyzicoObject::buyer($billingAddress);
Expand Down Expand Up @@ -294,7 +294,7 @@ private function phpVersionCheck()
.$phpVersion.''
:
'iyzico ile Öde modülünün çalışması için minimum PHP versiyonunuz '.$requiredVersion. ' olmalıdır.
PHP versiyonunuzu yükseltmek için hosting firmanızla iletişime geçebilirsiniz. Sunucu PHP
PHP versiyonunuzu yükseltmek için hosting firmanızla iletişime geçebilirsiniz. Sunucu PHP
versiyonunuz: '.$phpVersion.'';
}
return false;
Expand All @@ -318,4 +318,4 @@ private function createPwiOrderTable(){
return false;
return true;
}
}
}
Binary file added paywithiyzico/views/.DS_Store
Binary file not shown.
Binary file added paywithiyzico/views/templates/.DS_Store
Binary file not shown.

0 comments on commit a7268d4

Please sign in to comment.