Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.1.0.1
- * @ Author : DeZender
- * @ Release on : 29.08.2020
- * @ Official site : http://DeZender.Net
- *
- */
- class Nestpay
- {
- public function __construct($core)
- {
- $this->core = $core;
- $this->core->title = $this->core->get_option('nestpay_title');
- $this->core->description = $this->core->get_option('nestpay_desc');
- $this->core->talimatlar = $this->core->get_option('nestpay_talimatlar');
- }
- public function ayarlar($fields)
- {
- $ayarlar = [
- 'nestpay_3d' => ['title' => __('NestPay 3D', 'mrova'), 'type' => 'checkbox', 'label' => __('Nestpay için 3D ödeme aktifleştirilsin mi ?', 'mrova'), 'default' => 'no'],
- 'nestpay_title' => ['title' => __('Başlık', 'ds-ccnow'), 'type' => 'text', 'description' => __('', 'ds-ccnow'), 'default' => 'Kredi Kartı'],
- 'nestpay_desc' => ['title' => __('Açıklama', 'ds-ccnow'), 'type' => 'textarea', 'description' => __('', 'ds-ccnow'), 'default' => 'Kredi Kartı ile Ödeme'],
- 'nestpay_talimatlar' => ['title' => __('Talimatlar', 'ds-ccnow'), 'type' => 'textarea', 'description' => __('', 'woocommerce'), 'default' => '', 'desc_tip' => true],
- 'clientid' => ['title' => __('Müşteri NO', 'mrova'), 'type' => 'text', 'description' => __('Müşteri numaranız')],
- 'storekey' => ['title' => __('Store KEY', 'mrova'), 'type' => 'text', 'description' => __('Store keyiniz.')],
- 'api_username' => ['title' => __('API Kullanıcı Adı', 'mrova'), 'type' => 'text', 'description' => __('API Kullanıcı adı')],
- 'api_password' => ['title' => __('API Şifresi', 'mrova'), 'type' => 'text', 'description' => __('API Şifreniz.')],
- 'taksit2' => ['title' => __('2 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit3' => ['title' => __('3 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit4' => ['title' => __('4 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit5' => ['title' => __('5 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit6' => ['title' => __('6 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit7' => ['title' => __('7 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit8' => ['title' => __('8 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')],
- 'taksit9' => ['title' => __('9 Taksit Komisyon', 'mrova'), 'type' => 'text', 'description' => __('Kapatmak için boş bırakın, komisyon almamak için 0 yazın.', 'mrova'), 'default' => __('1.00', 'mrova')]
- ];
- return array_merge($fields, $ayarlar);
- }
- public function hidden_olustur($order)
- {
- }
- public function print_form($tema, $temaURL, $order)
- {
- $this->hidden_olustur($order);
- include 'temalar/' . $tema . '/form.php';
- }
- public function SecOdemeYap($order)
- {
- $son = explode('/', $_POST['son']);
- $krediKartiNumarasi = str_replace(' ', '', $_POST['numara']);
- $sonKullanmaTarihi = trim($son[1]) . trim($son[0]);
- $kartTipi = (substr($krediKartiNumarasi, 0, 1) == '4' ? 1 : 2);
- $tutar = number_format($order->order_total, 2, '.', '');
- $paraKodu = $this->core->get_option('currency');
- $taksit = intval($_POST['taksit']);
- $islemNumarasi = uniqid();
- $username = $this->core->get_option('api_username');
- $password = $this->core->get_option('api_password');
- $SuccessURL = $this->core->acturl . '&sa=&Fail=false';
- $FailureURL = $this->core->acturl . '&sa=&Fail=true';
- $ekVeri = implode('|sa|', ['order' => $order->id, 'karttipi' => $kartTipi, 'numara' => $krediKartiNumarasi, 'sonKullanmaTarihi' => '20' . $sonKullanmaTarihi, 'guvenlik' => $_POST['guvenlik'], 'taksit' => $taksit]);
- $clientId = $this->core->get_option('clientid');
- $amount = $tutar;
- $oid = $order->id;
- $okUrl = $SuccessURL;
- $failUrl = $FailureURL;
- $rnd = microtime();
- $storekey = $this->core->get_option('storekey');
- $storetype = '3d';
- $hashstr = $clientId . $oid . $amount . $okUrl . $failUrl . $rnd . $storekey;
- $taksitSayisi = $taksit;
- $taksitim = '<input type="hidden" name="staksit" value="' . $taksitSayisi . '"/>';
- $hash = base64_encode(pack('H*', sha1($hashstr)));
- $this->hidden_form = '<input type="hidden" name="clientid" value="' . $clientId . '">' . "\r\n" . ' ' . "\t\t\t" . $taksitim . "\r\n" . ' <input type="hidden" name="amount" value="' . $amount . '">' . "\r\n" . ' <input type="hidden" name="oid" value="' . $oid . '"> ' . "\r\n" . ' <input type="hidden" name="okUrl" value="' . $okUrl . '">' . "\r\n" . ' <input type="hidden" name="failUrl" value="' . $failUrl . '">' . "\r\n" . ' <input type="hidden" name="rnd" value="' . $rnd . '" >' . "\r\n" . ' <input type="hidden" name="hash" value="' . $hash . '" >' . "\r\n" . ' <input type="hidden" input name="pan" value="' . $krediKartiNumarasi . '">' . "\r\n" . '<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Year" value="' . trim($son[1]) . '" >' . "\r\n" . '<input type="hidden" input name="Ecom_Payment_Card_ExpDate_Month" value="' . trim($son[0]) . '">' . "\r\n" . '<input type="hidden" name="cv2" value="' . $_POST['guvenlik'] . '" />' . "\r\n" . ' ' . "\r\n" . ' <input type="hidden" name="storetype" value="3d" > ' . "\r\n" . ' <input type="hidden" name="lang" value="tr">' . "\r\n" . ' <input type="hidden" name="currency" value="' . $this->core->get_option('currency') . '">';
- echo "\r\n\t\t" . '<form name="downloadForm" action="https://sanalpos.sekerbank.com.tr/fim/est3Dgate" method="POST">' . "\r\n\t\t" . $this->hidden_form . "\r\n\t\t" . '<input type="submit" value="Otomatik yönlendirlmezseniz buraya tıklayınız.">' . "\r\n\t\t" . '</form>' . "\r\n\t\t" . '<SCRIPT LANGUAGE="Javascript" >' . "\r\n\t\t" . 'document.downloadForm.submit();' . "\r\n\t\t" . '</SCRIPT>';
- return true;
- }
- public function SecStepOdemeYap($order)
- {
- $hashparams = $_POST['HASHPARAMS'];
- $hashparamsval = $_POST['HASHPARAMSVAL'];
- $hashparam = $_POST['HASH'];
- $storekey = $this->core->get_option('storekey');
- $paramsval = '';
- $index1 = 0;
- $index2 = 0;
- while ($index1 < strlen($hashparams)) {
- $index2 = strpos($hashparams, ':', $index1);
- $vl = $_POST[substr($hashparams, $index1, $index2 - $index1)];
- if ($vl == NULL) {
- $vl = '';
- }
- $paramsval = $paramsval . $vl;
- $index1 = $index2 + 1;
- }
- $storekey = $this->core->get_option('storekey');
- $hashval = $paramsval . $storekey;
- $hash = base64_encode(pack('H*', sha1($hashval)));
- if (($paramsval != $hashparamsval) || ($hashparam != $hash)) {
- echo '<h4>Güvenlik Uyarisi. Sayisal Imza Geçerli Degil</h4>';
- }
- $xid = $_POST['xid'];
- $eci = $_POST['eci'];
- ...........................................................................
- ..............................................
- ......................
Add Comment
Please, Sign In to add comment