Skip to content

Commit

Permalink
update new version
Browse files Browse the repository at this point in the history
  • Loading branch information
feyzullahdemir committed Dec 27, 2022
1 parent 6fa414c commit 42984dc
Show file tree
Hide file tree
Showing 35 changed files with 31 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified upload/.DS_Store
Binary file not shown.
Binary file modified upload/admin/.DS_Store
Binary file not shown.
Binary file modified upload/admin/controller/.DS_Store
Binary file not shown.
Binary file modified upload/admin/controller/extension/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions upload/admin/controller/extension/payment/paywithiyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class ControllerExtensionPaymentPaywithiyzico extends Controller {

private $module_version = '1.5';
private $module_product_name = 'eleven-1.5';
private $module_version = '1.6';
private $module_product_name = 'eleven-1.6';

private $error = array();

Expand Down
Binary file added upload/admin/language/.DS_Store
Binary file not shown.
Binary file added upload/admin/language/en-gb/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file added upload/admin/language/tr-tr/.DS_Store
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion upload/admin/model/extension/payment/paywithiyzico.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
class ModelExtensionPaymentPaywithiyzico extends Model {
private $module_version = VERSION;
private $module_product_name = 'eleven-1.5';
private $module_product_name = 'eleven-1.6';


public function install() {
Expand Down
Binary file modified upload/admin/view/.DS_Store
Binary file not shown.
Binary file added upload/admin/view/image/.DS_Store
Binary file not shown.
Binary file added upload/admin/view/javascript/.DS_Store
Binary file not shown.
Binary file added upload/admin/view/stylesheet/.DS_Store
Binary file not shown.
Binary file modified upload/admin/view/template/.DS_Store
Binary file not shown.
Binary file modified upload/admin/view/template/extension/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/controller/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/controller/extension/.DS_Store
Binary file not shown.
25 changes: 23 additions & 2 deletions upload/catalog/controller/extension/payment/paywithiyzico.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class ControllerExtensionPaymentPaywithiyzico extends Controller {
private $module_version = VERSION;
private $module_product_name = 'eleven-1.5';
private $module_product_name = 'eleven-1.6';


private function setcookieSameSite($name, $value, $expire, $path, $domain, $secure, $httponly) {
Expand Down Expand Up @@ -267,11 +267,21 @@ public function getCallBack() {
} else {
$this->model_checkout_order->addOrderHistory($paywithiyzico_local_order->order_id, $this->config->get('payment_paywithiyzico_order_status'), $message);
}
$this->setWebhookText(0);

return $this->response->redirect($this->url->link('extension/payment/paywithiyzico/successpage'));

} catch (Exception $e) {

if($request_response->paymentStatus == 'PENDING_CREDIT' && $request_response->status == 'success')
{
$orderMessage = 'Alışveriş kredisi işlemi başlatıldı.';
$this->model_checkout_order->addOrderHistory($paywithiyzico_local_order->order_id, 1, $orderMessage);
$this->setWebhookText(1);
return $this->response->redirect($this->url->link('extension/payment/iyzico/successpage'));
}
$this->setWebhookText(0);

$errorMessage = isset($request_response->errorMessage) ? $request_response->errorMessage : $e->getMessage();

$this->session->data['paywithiyzico_error_message'] = $errorMessage;
Expand Down Expand Up @@ -437,6 +447,8 @@ public function successPage() {
$locale = $str_language;
}
$data['locale'] = $locale;
$thankyouText = $this->config->get('payment_iyzico_webhook_text');
$data['credit_pending'] = $thankyouText;

$data['column_left'] = $this->load->controller('common/column_left');
$data['column_right'] = $this->load->controller('common/column_right');
Expand Down Expand Up @@ -541,7 +553,7 @@ private function getIpAdress() {
return $ip_address;
}

public function injectPwiLogoCss($route, &$data = false, &$output) {
public function injectPwiLogoCss($route, &$data = false, &$output=null) {

$hook = '</footer>';
$js = "<style> div#account-order img{
Expand All @@ -552,4 +564,13 @@ public function injectPwiLogoCss($route, &$data = false, &$output) {
$output = str_replace($hook,$js,$output);
}

public function setWebhookText($thankyouTextValue) {

$webhookText = $this->config->get('payment_iyzico_webhook_text');
$query = $this->db->query("UPDATE `" . DB_PREFIX . "setting` SET `value` = '".$thankyouTextValue."' , `serialized` = 0 WHERE `code` = 'payment_iyzico_webhook' AND `key` = 'payment_iyzico_webhook_text' AND `store_id` = '0'");
return $query;
}



}
Binary file added upload/catalog/language/.DS_Store
Binary file not shown.
Binary file added upload/catalog/language/en-gb/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file added upload/catalog/language/tr-tr/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file modified upload/catalog/model/extension/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/view/.DS_Store
Binary file not shown.
Binary file added upload/catalog/view/javascript/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/view/theme/default/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file modified upload/catalog/view/theme/default/template/.DS_Store
Binary file not shown.
Binary file modified upload/catalog/view/theme/default/template/extension/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@

<div class="successPayment">
{% if locale =='tr'%}
<h1>Ödemeniz Alındı. </h1>
{% if credit_pending == '1'%}
<h1> Alışveriş Kredisi için başvurunuz alınmıştır. Başvurunuz, en kısa sürede sonuçlandırılacaktır.</h1>
{% else %}
<h1>Ödemeniz Alındı. </h1>
{% endif %}
{% else %}
<h1>Your Payment Received. </h1>
{% endif %}
Expand Down

0 comments on commit 42984dc

Please sign in to comment.