Advertisement
Guest User

Untitled

a guest
Jul 17th, 2022
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 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 : 5.0.1.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.04.2022
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function easypay_MetaData()
  15. {
  16. return ['DisplayName' => 'Easypaisa', 'APIVersion' => '1.1', 'DisableLocalCredtCardInput' => true, 'TokenisedStorage' => false];
  17. }
  18.  
  19. function easypay_config()
  20. {
  21. $licenseFields = [
  22. 'FriendlyName' => ['Type' => 'System', 'Value' => 'Easypaisa']
  23. ];
  24. $command = 'GetPaymentMethods';
  25. $results = localAPI($command, []);
  26. if (($results['result'] == 'success') && !in_array('easypay', array_column($results['paymentmethods']['paymentmethod'], 'module'))) {
  27. return array_merge($licenseFields, [
  28. 'licenseKey' => ['FriendlyName' => 'License Key', 'Type' => 'text', 'Description' => 'Enter your License Key here. <br><a class=\'text-primary\' href=\'https://webit.pk/billing/cart.php?pid=136\'>Click here to buy a license</a>']
  29. ]);
  30. }
  31.  
  32. $gatewayParams = getGatewayVariables('easypay');
  33. $lisMsg = '';
  34.  
  35. if ($gatewayParams['licenseKey'] == NULL) {
  36. return array_merge($licenseFields, [
  37. 'licenseKey' => ['FriendlyName' => 'License Key', 'Type' => 'text', 'Description' => 'Enter your License Key here. <br><a class=\'text-primary\' href=\'https://webit.pk/billing/cart.php?pid=136\'>Click here to buy a license</a>']
  38. ]);
  39. }
  40.  
  41. $license = $gatewayParams['licenseKey'];
  42. $local = (file_get_contents(__DIR__ . '/callback/easypayloc') !== false ? file_get_contents(__DIR__ . '/callback/easypayloc') : '');
  43. $results = easypay_check($license, $local);
  44.  
  45. if ($results['status'] != 'Active') {
  46. switch ($results['status']) {
  47. case 'Invalid':
  48. $lisMsg = '<p class=\'text-danger\'>License key is Invalid</p><a class=\'text-primary\' href=\'https://webit.pk/billing/cart.php?pid=136\'>Click here to buy a license</a>';
  49. break;
  50. case 'Expired':
  51. $lisMsg = '<p class=\'text-danger\'>License key is Expired</p><a class=\'text-primary\' href=\'https://webit.pk/billing/cart.php?pid=136\'>Click here to buy a license</a>';
  52. break;
  53. case 'Suspended':
  54. $lisMsg = '<p class=\'text-danger\'>License key is Suspended</p><a class=\'text-primary\' href=\'https://webit.pk/billing/cart.php?pid=136\'>Click here to buy a license</a>';
  55. break;
  56. default:
  57. $lisMsg = '<p class=\'text-danger\'>Invalid Response</p>';
  58. return array_merge($licenseFields, [
  59. 'licenseKey' => ['FriendlyName' => 'License Key', 'Type' => 'text', 'Description' => $lisMsg]
  60. ]);
  61. }
  62. }
  63. else {
  64. if (isset($results['localkey'])) {
  65. file_put_contents(__DIR__ . '/callback/easypayloc', $results['localkey']);
  66. ........................................................................
  67. .........................................
  68. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement