diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..cfd0b5d
Binary files /dev/null and b/.DS_Store differ
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9913083
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+# iyzico Subscription - WooCommerce Payment Gateway
+------------
+* Create live account at https://merchant.iyzipay.com
+* Create test account at https://sandbox-merchant.iyzipay.com
+
+
+# Requirements
+------------
+* PHP 5.4 and greater.
+* cURL
+* WooCommerce 2.0 requires WordPress 3.5+
+
+
+# Installation
+---------------
+* Click "clone or download" and Download ZIP then Install with wordpress extension installer page
+* Wordpress Marketplace in search "iyzico-subscription-woocommerce" and install
+
+* Detailed Info
+
+
+# Notes
+---------------
+* Developed and Tested on vanilla Wordpress + WooCommerce Installation
diff --git a/i18n/.DS_Store b/i18n/.DS_Store
new file mode 100644
index 0000000..ea6f39e
Binary files /dev/null and b/i18n/.DS_Store differ
diff --git a/i18n/languages/.DS_Store b/i18n/languages/.DS_Store
new file mode 100644
index 0000000..b0419b5
Binary files /dev/null and b/i18n/languages/.DS_Store differ
diff --git a/i18n/languages/woocommerce-iyzico-subscription-en_US.mo b/i18n/languages/woocommerce-iyzico-subscription-en_US.mo
new file mode 100644
index 0000000..53e2b33
Binary files /dev/null and b/i18n/languages/woocommerce-iyzico-subscription-en_US.mo differ
diff --git a/i18n/languages/woocommerce-iyzico-subscription-en_US.po b/i18n/languages/woocommerce-iyzico-subscription-en_US.po
new file mode 100644
index 0000000..3c524c2
--- /dev/null
+++ b/i18n/languages/woocommerce-iyzico-subscription-en_US.po
@@ -0,0 +1,145 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2022-04-27 08:19+0000\n"
+"PO-Revision-Date: 2022-04-27 08:20+0000\n"
+"Last-Translator: \n"
+"Language-Team: English (United States)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Loco https://localise.biz/\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language: en_US\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Loco-Version: 2.6.1; wp-5.9.3"
+
+# This file is distributed under the GNU General Public License v2 or later.
+msgid "Api Type"
+msgstr "Api Type"
+
+msgid "Api Key"
+msgstr "Api Key"
+
+msgid "Secret Key"
+msgstr "Secret Key"
+
+msgid "Payment Value"
+msgstr "Payment Value\""
+
+msgid "Payment Value Message"
+msgstr "Payment Value Message"
+
+msgid "Payment Form Description Value"
+msgstr "Payment Form Description Value\""
+
+msgid "Enable/Disable"
+msgstr "Enable/Disable"
+
+msgid "Enable iyzico checkout"
+msgstr "Enable iyzico checkout"
+
+msgid "Payment Form Design"
+msgstr "Payment Form Design"
+
+msgid "Left"
+msgstr "Bottom Left"
+
+msgid "Right"
+msgstr "Bottom Right"
+
+msgid "Hide"
+msgstr "Hide"
+
+msgid "Overlay Script"
+msgstr "Overlay Script"
+
+msgid "Installment"
+msgstr "Installment"
+
+msgid "Installment Fee"
+msgstr "Installment Fee"
+
+msgid "This message will show to the user during checkout."
+msgstr "This message will show to the user during checkout."
+
+msgid "Pay with your credit card via iyzico."
+msgstr "Pay with your credit card via iyzico."
+
+msgid ""
+"Thank you for your order, please click the button below to pay with iyzico "
+"Checkout."
+msgstr ""
+"Thank you for your order, please click the button below to pay with iyzico "
+"Checkout."
+
+msgid "Pay With Card"
+msgstr "Pay with Credit/Bank Card"
+
+msgid "Order Status"
+msgstr "Order Status"
+
+msgid "Recommended, Default"
+msgstr "Recommended, Default"
+
+msgid "Siparişi onayla"
+msgstr "Pay with Credit/Bank Card"
+
+msgid "Default"
+msgstr "Default"
+
+msgid "Pending"
+msgstr "Pending"
+
+msgid "Processing"
+msgstr "Processing"
+
+msgid "On-Hold"
+msgstr "On-Hold"
+
+msgid "Completed"
+msgstr "Completed"
+
+msgid "Cancelled"
+msgstr "Cancelled"
+
+msgid "Refunded"
+msgstr "Refunded"
+
+msgid "Failed"
+msgstr "Failed"
+
+msgid "iyzico Protected Shopping, Shipping Tracking"
+msgstr "iyzico Protected Shopping, Shipping Tracking"
+
+msgid ""
+"By entering the shipping tracking number of this order, you can ensure your "
+"customer have real time order tracking."
+msgstr ""
+"By entering the shipping tracking number of this order, you can ensure your "
+"customer have real time order tracking."
+
+msgid "Select"
+msgstr "Select"
+
+msgid "Shipping Company"
+msgstr "Shipping Company"
+
+msgid "Shipping Tracking Number"
+msgstr "Shipping Tracking Number"
+
+msgid ""
+"The iyzico subscription API provides the opportunity to quickly create "
+"subscriptions to merchants that can receive online payments."
+msgstr ""
+"The iyzico subscription API provides the opportunity to quickly create "
+"subscriptions to merchants that can receive online payments ."
+
+msgid "Amount Withdrawn"
+msgstr "Amount Withdrawn"
+
+msgid "Thank you for your order, please enter your card information in the payment form below to pay with iyzico checkout."
+msgstr "Thank you for your order, please enter your card information in the payment form below to pay with iyzico checkout."
+
+msgid "Thank you for your order, please click the button below to pay with iyzico checkout."
+msgstr "Thank you for your order, please click the button below to pay with iyzico checkout."
diff --git a/i18n/languages/woocommerce-iyzico-subscription-tr_TR.mo b/i18n/languages/woocommerce-iyzico-subscription-tr_TR.mo
new file mode 100644
index 0000000..f864fb0
Binary files /dev/null and b/i18n/languages/woocommerce-iyzico-subscription-tr_TR.mo differ
diff --git a/i18n/languages/woocommerce-iyzico-subscription-tr_TR.po b/i18n/languages/woocommerce-iyzico-subscription-tr_TR.po
new file mode 100644
index 0000000..8c469fe
--- /dev/null
+++ b/i18n/languages/woocommerce-iyzico-subscription-tr_TR.po
@@ -0,0 +1,163 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"POT-Creation-Date: 2022-04-27 07:49+0000\n"
+"PO-Revision-Date: 2022-05-12 06:58+0000\n"
+"Last-Translator: \n"
+"Language-Team: Türkçe\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Loco https://localise.biz/\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"Language: tr_TR\n"
+"Report-Msgid-Bugs-To: \n"
+"X-Loco-Version: 2.6.1; wp-6.1-alpha-53391"
+
+# This file is distributed under the GNU General Public License v2 or later.
+msgid "Api Type"
+msgstr "Api Türü"
+
+msgid "Api Key"
+msgstr "Api Anahtarı"
+
+msgid "Secret Key"
+msgstr "Güvenlik Anahtarı"
+
+msgid "Payment Value"
+msgstr "Ödeme Seçeneği Metni"
+
+msgid "Payment Value Message"
+msgstr "Online Payment"
+
+msgid "Payment Form Description Value"
+msgstr "Ödeme Seçeneği Açıklaması"
+
+msgid "Enable/Disable"
+msgstr "Eklenti Durumu"
+
+msgid "Enable iyzico checkout"
+msgstr "iyzico ile ödemeyi etkinleştir"
+
+msgid "Payment Form Design"
+msgstr "Ödeme Formu Görünümü"
+
+msgid "Left"
+msgstr "Alt Sol"
+
+msgid "Right"
+msgstr "Alt Sağ"
+
+msgid "Hide"
+msgstr "Gizli"
+
+msgid "Overlay Script"
+msgstr "Korumalı Alışveriş"
+
+msgid "Installment"
+msgstr "Taksit"
+
+msgid "Installment Fee"
+msgstr "Taksit Tutarı"
+
+msgid "This message will show to the user during checkout."
+msgstr "Bu mesaj ödeme sırasında kullanıcıya gösterecektir."
+
+msgid "Pay with your credit card via iyzico."
+msgstr "Kredi Kartı - iyzico"
+
+msgid ""
+"Thank you for your order, please click the button below to pay with iyzico "
+"Checkout."
+msgstr ""
+"Siparişiniz için teşekkür ederiz, iyzico ile ödemek için aşağıdaki düğmeyi "
+"tıklayın."
+
+msgid "Pay With Card"
+msgstr "Kredi/Banka Kartı ile Öde"
+
+msgid "Order Status"
+msgstr "Sipariş Durumu"
+
+msgid "Recommended, Default"
+msgstr "Önerilen, Varsayılan"
+
+msgid "Siparişi onayla"
+msgstr "Kredi/Banka Kartı ile Öde"
+
+msgid "Default"
+msgstr "Varsayılan"
+
+msgid "Pending"
+msgstr "Ödeme Bekleniyor"
+
+msgid "Processing"
+msgstr "İşleniyor"
+
+msgid "On-Hold"
+msgstr "Beklemede"
+
+msgid "Completed"
+msgstr "Tamamlandı"
+
+msgid "Cancelled"
+msgstr "İptal Edildi"
+
+msgid "Refunded"
+msgstr "İade Edildi"
+
+msgid "Failed"
+msgstr "Başarısız"
+
+msgid "iyzico Protected Shopping, Shipping Tracking"
+msgstr "iyzico Korumalı Alışveriş, Kargo Takibi"
+
+msgid ""
+"By entering the shipping tracking number of this order, you can ensure your "
+"customer have real time order tracking."
+msgstr ""
+"Siparişin kargo takip numarasını girerek, müşterinizin anlık kargo takibi "
+"yapmasını sağlayabilirsiniz."
+
+msgid "Select"
+msgstr "Seçiniz"
+
+msgid "Shipping Company"
+msgstr "Kargo Firması"
+
+msgid "Shipping Tracking Number"
+msgstr "Kargo Takip Numarası"
+
+msgid ""
+"The iyzico subscription API provides the opportunity to quickly create "
+"subscriptions to merchants that can receive online payments."
+msgstr ""
+"iyzico subscription API, online ödeme alabilen üye işyerlerine hızlıca "
+"abonelik oluşturma imkanı sağlar"
+
+msgid "iyzico Subscription Pay"
+msgstr "iyzico Woocommerce Abonelik"
+
+msgid ""
+"* Do not forget to add the reference code to the Product > Edit > "
+"Pricing Plan Code section."
+msgstr ""
+" * Ürün > Düzenle > Pricing Plan Code bölümüne referans kodu eklemeyi "
+"unutmayınız."
+
+msgid "Amount Withdrawn"
+msgstr "Çekilen Abonelik Tutarı"
+
+msgid ""
+"Thank you for your order, please enter your card information in the payment "
+"form below to pay with iyzico checkout."
+msgstr ""
+"Siparişiniz için teşekkür ederiz, iyzico ile ödemek için aşağıdaki ödeme "
+"formu alanına kart bilgilerinizi girebilirsiniz."
+
+msgid ""
+"Thank you for your order, please click the button below to pay with iyzico "
+"checkout."
+msgstr ""
+"Siparişiniz için teşekkür ederiz, iyzico ile ödemek için Ödeme Formunu Aç "
+"butonuna tıklayarak kart bilgilerinizi girebilirsiniz."
diff --git a/image/.DS_Store b/image/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/image/.DS_Store differ
diff --git a/image/cards.png b/image/cards.png
new file mode 100644
index 0000000..e5a8d90
Binary files /dev/null and b/image/cards.png differ
diff --git a/image/iyzico_logo.png b/image/iyzico_logo.png
new file mode 100644
index 0000000..007a285
Binary files /dev/null and b/image/iyzico_logo.png differ
diff --git a/image/newcards.png b/image/newcards.png
new file mode 100644
index 0000000..e5a8d90
Binary files /dev/null and b/image/newcards.png differ
diff --git a/image/zihni.png b/image/zihni.png
new file mode 100644
index 0000000..e47b951
Binary files /dev/null and b/image/zihni.png differ
diff --git a/library/.DS_Store b/library/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/library/.DS_Store differ
diff --git a/library/index.php b/library/index.php
new file mode 100644
index 0000000..9962ee8
--- /dev/null
+++ b/library/index.php
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Günlük Cari Rapor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(products_price) as sales_total FROM sales INNER JOIN products ON products.products_id=sales.products_id WHERE DAY(sales_date)=DAY(CURDATE())");
+ $sales_total=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($sales_total=$sales_total['sales_total']);
+ ?> ₺
+
+
Toplam Satış
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(operation_price) as revenue FROM operation WHERE operation.operation_type='Gelir' AND DAY(operation_date)=DAY(CURDATE()) ");
+ $revenue=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($revenue=$revenue['revenue']);
+ ?> ₺
+
+
Toplam Gelir (Tahsilat)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(operation_price) as revenue FROM operation WHERE operation.operation_type='Gider' AND DAY(operation_date)=DAY(CURDATE()) ");
+ $revenue=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($revenue=$revenue['revenue']);
+ ?> ₺
+
+
Toplam Gider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("
+ SELECT SUM(
+ CASE WHEN operation_type='Gelir' THEN operation_price ELSE 0 END
+ )-SUM(
+ CASE WHEN operation_type='Gider' THEN operation_price ELSE 0 END
+ ) as safe FROM operation WHERE DAY(operation_date)=DAY(CURDATE())
+ ");
+ $rows=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($rows['safe']);
+ ?> ₺
+
+
Kasa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Genel Cari Rapor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(products_price) as sales_total FROM sales INNER JOIN products ON products.products_id=sales.products_id");
+ $sales_total=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($sales_total=$sales_total['sales_total']);
+ ?> ₺
+
+
Toplam Satış
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(operation_price) as revenue FROM operation WHERE operation.operation_type='Gelir' ");
+ $revenue=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($revenue=$revenue['revenue']);
+ ?> ₺
+
+
Toplam Gelir (Tahsilat)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("SELECT SUM(operation_price) as revenue FROM operation WHERE operation.operation_type='Gider' ");
+ $revenue=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($revenue=$revenue['revenue']);
+ ?> ₺
+
+
Toplam Gider
+
+
+
+
+
+
+
+
+
+
+
+
+
+
qSQL("
+ SELECT SUM(
+ CASE WHEN operation_type='Gelir' THEN operation_price ELSE 0 END
+ )-SUM(
+ CASE WHEN operation_type='Gider' THEN operation_price ELSE 0 END
+ ) as safe FROM operation
+ ");
+ $rows=$sql->fetch(PDO::FETCH_ASSOC);
+ echo number_format($rows['safe']);
+ ?> ₺
https://merchant.iyzipay.com veya https://sandbox-merchant.iyzipay.com adresi üzerinden müşteri bilgileriniz ile giriş yapınız. Panele eriştiğiniz sırada sağ tarafta bulunan “Abonelikler” menüsüne tıklayınız. Bu alanda yeni abonelik oluşturabilir veya eski abonelik işlemine devam edebilirsiniz. Ürün ve ödeme planı oluşturduktan sonra referans kodunu buraya yazınız.
+
* Ürün fiyat , para birimi , çekilecek tutarın oluşturulan ödeme planını karşıladığına dikkat ediniz.
+
+
+
+ iyzico Subscription';
+ ?>
+
+
+
+
+
+
https://merchant.iyzipay.com orhttps://sandbox-merchant.iyzipay.com Log in with your customer information. When you access the panel, click on the “Subscriptions” menu on the right. In this area, you can create a new subscription or continue the old subscription process. After creating the product and payment plan, write the reference code here.
+
+
+
+ ID;
+
+ if(!empty($_POST['pricingPlanReferenceCode'])) {
+ $pricingPlanReferenceCode = $_POST['pricingPlanReferenceCode'];
+ } else {
+ $pricingPlanReferenceCode = false;
+ }
+
+ $createOrUpdateControl = false;
+
+
+ $pricingPlanReferenceCode = esc_sql($pricingPlanReferenceCode);
+
+ $pricingPlanReferenceCodeField = 'pricing_plan_code_'.$postId;
+ $pricingPlanReferenceCodeOption = get_option($pricingPlanReferenceCodeField);
+
+ /* Empty Post Control */
+ if(empty($pricingPlanReferenceCode)) {
+
+ delete_option($pricingPlanReferenceCodeField);
+ return;
+ }
+
+ /* Sleeping Data Control */
+ if($pricingPlanReferenceCode == $pricingPlanReferenceCodeOption) {
+
+ return;
+ }
+
+ if(!empty($pricingPlanReferenceCodeOption)) {
+
+ $createOrUpdateControl = true;
+ }
+
+ if(empty($createOrUpdateControl)) {
+
+ add_option($pricingPlanReferenceCodeField,$pricingPlanReferenceCode,'','no');
+
+ } else {
+
+ update_option($pricingPlanReferenceCodeField,$pricingPlanReferenceCode);
+ }
+
+ return;
+
+ }
+
+
+ private function versionCheck() {
+
+ $phpVersion = phpversion();
+ $requiredPhpVersion = 5.4;
+ $helper = new Iyzico_Subscription_For_WooCommerce_Helper();
+ $locale = $helper->cutLocale(get_locale());
+
+ /* Required PHP */
+ $warningMessage = 'Required PHP 5.4 and greater for iyzico WooCommerce Payment Gateway';
+ if($locale == 'tr') {
+ $warningMessage = 'iyzico WooCommerce eklentisini çalıştırabilmek için, PHP 5.4 veya üzeri versiyonları kullanmanız gerekmektedir. ';
+ }
+
+ if($phpVersion < $requiredPhpVersion) {
+ echo $warningMessage;
+ exit;
+ }
+
+ /* Required WOOCOMMERCE */
+ $wooCommerceVersion = WOOCOMMERCE_VERSION;
+ $requiredWoocommerceVersion = 3.0;
+
+ $warningMessage = 'Required WooCommerce 3.0 and greater for iyzico WooCommerce Payment Gateway';
+
+ if($locale == 'tr') {
+ $warningMessage = 'iyzico WooCommerce eklentisini çalıştırabilmek için, WooCommerce 3.0 veya üzeri versiyonları kullanmanız gerekmektedir. ';
+ }
+
+ if($wooCommerceVersion < $requiredWoocommerceVersion) {
+ echo $warningMessage;
+ exit;
+ }
+
+ /* Required TLS */
+ $tlsUrl = 'https://api.iyzipay.com';
+ $tlsVersion = get_option('iyziTLS');
+
+ if(!$tlsVersion) {
+
+ $result = $this->verifyTLS($tlsUrl);
+ if($result) {
+ add_option('iyziTLS',1.2,'','no');
+ $tlsVersion = get_option('iyziTLS');
+ }
+
+ } elseif($tlsVersion != 1.2) {
+
+ $result = $this->verifyTLS($tlsUrl);
+ if($result) {
+ update_option('iyziTLS',1.2);
+ $tlsVersion = get_option('iyziTLS');
+ }
+ }
+
+
+ $requiredTlsVersion = 1.2;
+
+ $warningMessage = 'WARNING! Minimum TLS v1.2 will be supported after March 2018. Please upgrade your openssl version to minimum 1.0.1.';
+
+ if($locale == 'tr') {
+ $warningMessage = "UYARI! Ödeme formunuzu görüntüleyebilmeniz için, TLS versiyonunuzun minimum TLS v1.2 olması gerekmektedir. Lütfen servis sağlayıcınız ile görüşerek openssl versiyonunuzu minimum 1.0.1'e yükseltin.";
+ }
+
+ if($tlsVersion < $requiredTlsVersion) {
+ echo $warningMessage;
+ exit;
+ }
+ }
+
+ private function verifyTLS($url) {
+
+ $curl = curl_init();
+
+ curl_setopt_array($curl, array(
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_URL => $url,
+ ));
+
+ $response = curl_exec($curl);
+
+ curl_close($curl);
+
+ return $response;
+ }
+
+}
diff --git a/media/js/valid_api.js b/media/js/valid_api.js
new file mode 100644
index 0000000..7b41136
--- /dev/null
+++ b/media/js/valid_api.js
@@ -0,0 +1 @@
+jQuery(document).ready(function(){jQuery("#mainform").submit(function(a){var e,i,r;if(e=jQuery("#woocommerce_iyzico_api_type").val(),i=jQuery("#woocommerce_iyzico_api_key").val(),r=jQuery("#woocommerce_iyzico_secret_key").val(),""!=i&&""!=r||alert("Api Key ve Secret Key Boş Bırakılamaz !"),"https://sandbox-api.iyzipay.com"==e){if("sandbox-"==i.substring(0,8))return;alert("Sandbox / Test API için Live API Anahtarları kullanılamaz !")}else if("https://api.iyzipay.com"==e){if("sandbox-"!=i.substring(0,8)&&"sandbox-"!=r.substring(0,8))return;alert("Live API için Sandbox / Test API Anahtarları kullanılamaz !")}a.preventDefault()})});
diff --git a/readme.txt b/readme.txt
new file mode 100644
index 0000000..726c63c
--- /dev/null
+++ b/readme.txt
@@ -0,0 +1,72 @@
+=== iyzico Subscription WooCommerce ===
+Contributors: iyzico,mehmetselim,FeyzullahDemir
+Tags: payment, ecommerce,credit card,checkout woocommerce,iyzico,wordpress ecommerce
+Tested up to: 6.0
+Stable tag: 2.0.0
+Requires at least: 4.7
+License: LGPL v3.0
+License URI: https://www.gnu.org/licenses/lgpl-3.0.en.html
+
+== Description ==
+- This is a WooCommerce module developed by iyzico Integration team.
+
+- You can easily integrate iyzico WooCommerce module into your e-commerce website and start receiving payment seamlessly and securely.
+Check out some of other advantages of iyzico WooCommerce Modul from below;
+
+- You can embed iyzico check-out form either as responsive or pop-up onto your payment screen and increase your sales conversion.
+
+- The module controlled by SUCURI and it is totally secure.
+
+- With the open source code, you can make easily make new developments on your website.
+
+- iyzico WooCommerce module supports SEO tools and is 100% compatible with Google.
+
+- You can test your website in Sandbox, one of the best test environments.
+
+- iyzico WooCommerce module allows you to sell with installments on your website.
+
+- After iyzico WooCommerce integration, with iyzico’s Buyer Protection feature you can offer your customers 24/7 live support as well as order tracking.
+
+- iyzico WooCommerce module is 100% compatible with WooCommerce and Wordpress systems.
+
+- After the integration you can offer manually created orders and payment support to your customers.
+
+
+Requirements
+PHP 5.4 and greater.
+cURL
+WooCommerce 3.5 requires WordPress 3.5+
+
+
+== Installation ==
+iyzico WooCommerce Plugin Download ZIP file and then Install with wordpress extension installer page
+
+Wordpress Marketplace in search "iyzico WooCommerce" and install
+
+== Screenshots ==
+
+1. Settings Page
+2. iyzico Settings Page
+3. Basket Page
+4. Payment Page
+5. Order Result Page
+6. Order List Page
+7. Order Management
+
+== Changelog ==
+
+= 1.0.3 =
+ * Form Class
+ * On Hold
+ * Bug Fixed
+ * Wordpress update 6.0 Tested
+
+
+= 1.0.0 =
+ * Initial Release
+
+
+== Upgrade Notice ==
+
+= 1.0.0 =
+ * Initial Release
diff --git a/woocommerce-gateway-subscription-iyzico.php b/woocommerce-gateway-subscription-iyzico.php
new file mode 100644
index 0000000..ccad4da
--- /dev/null
+++ b/woocommerce-gateway-subscription-iyzico.php
@@ -0,0 +1,128 @@
+prefix . 'subscription_iyzico';
+
+ $charset_collate = $wpdb->get_charset_collate();
+
+ $sql = "CREATE TABLE $table_name (
+ subscription_iyzico_id int(11) NOT NULL AUTO_INCREMENT,
+ subscription_reference_code varchar(45) NOT NULL,
+ order_id int(11) NOT NULL,
+ user_id int(11) NOT NULL,
+ created_at timestamp DEFAULT current_timestamp,
+ PRIMARY KEY (subscription_iyzico_id)
+ ) $charset_collate;";
+
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
+ dbDelta($sql);
+ }
+
+ public static function SubscriptionIyzicoDeactive() {
+
+ global $wpdb;
+
+ $table_name = $wpdb->prefix . 'subscription_iyzico';
+ $charset_collate = $wpdb->get_charset_collate();
+
+ $sql = "DROP TABLE IF EXISTS $table_name;";
+ $wpdb->query($sql);
+ flush_rewrite_rules();
+ }
+
+ public function init() {
+
+ $this->InitIyzicoPaymentGateway();
+ }
+
+
+ public static function installLanguage() {
+
+ load_plugin_textdomain('woocommerce-iyzico-subscription',false,IYZICO_LANG_PATH);
+
+ }
+
+ public function InitIyzicoPaymentGateway() {
+
+ if ( ! class_exists('WC_Payment_Gateway')) {
+ return;
+ }
+
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-fields.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-formobjectgenerate.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-helper.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-pkibuilder.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-authorization.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-request.php';
+ include_once IYZICO_PATH . '/library/iyzico-subscription-for-woocommerce-gateway-model.php';
+
+
+ add_action('woocommerce_payment_gateways',array($this,'AddIyzicoSubscriptionGateway'));
+
+ add_action('woocommerce_product_options_general_product_data',
+ array('Iyzico_Subscription_For_WooCommerce_Gateway',
+ 'pricingPlanMethod'));
+
+ add_action('woocommerce_process_product_meta',
+ array('Iyzico_Subscription_For_WooCommerce_Gateway',
+ 'pricingPlanMethodSave'));
+
+ }
+
+
+ public function AddIyzicoSubscriptionGateway($methods) {
+
+ $methods[] = 'Iyzico_Subscription_For_WooCommerce_Gateway';
+ return $methods;
+ }
+
+ }
+
+Iyzico_Subscription_For_WooCommerce::get_instance();
+add_action('plugins_loaded',array('Iyzico_Subscription_For_WooCommerce','installLanguage'));
+register_activation_hook(__FILE__, array('Iyzico_Subscription_For_WooCommerce','SubscriptionIyzicoActive'));
+register_deactivation_hook(__FILE__,array('Iyzico_Subscription_For_WooCommerce','SubscriptionIyzicoDeactive'));
+}