Guest User

WEBSITE SIDED

a guest
Feb 9th, 2016
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <?php
  2. $sql_host = "localhost";
  3. $sql_user = "rapidpkn_store";
  4. $sql_pass = "Australia77";
  5. $sql_data = "rapidpkn_store";
  6.  
  7. $pp_config = array(
  8. 'business' => "luisantonio.victoria@hotmail.com", // edit
  9. 'cmd' => "_xclick",
  10. 'item_name' => "Donation", // edit if you want
  11. 'address_override' => 1,
  12. 'no_shipping' => 1,
  13. 'return' => "http://rapidpk.net/store/", // edit
  14. 'cancel_return' => "http://rapidpk.net/store/", // edit
  15. 'notify_url' => "http://rapidpk.net/store/pp_ipn.php", // edit
  16. 'cpp_header_image' => "http://rapidpk.net/store/assets/img/logo.png" // edit
  17. );
  18.  
  19. define("DEBUG", 1);
  20. define("USE_SANDBOX", 0);
  21. define("LOG_FILE", "./ipn.log");
  22.  
  23. function formatName($string) {
  24. return ucwords(str_replace("_", " ", $string));
  25. }
  26.  
  27. function cleanPass($string) {
  28. return preg_replace("/[^A-Za-z0-9 \-]/", ' ', $string);
  29. }
  30.  
  31. function cleanString($string) {
  32. return preg_replace("/[^A-Za-z0-9 ]/", ' ', $string);
  33. }
  34.  
  35. function cleanInt($string) {
  36. return preg_replace("/[^0-9]/", ' ', $string);
  37. }
  38.  
  39. function encrypt($data, $key) {
  40. $size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);
  41. $iv = mcrypt_create_iv($size, MCRYPT_RAND);
  42. $crypt = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_CBC, $iv);
  43. return bin2hex($iv . $crypt);
  44. }
  45.  
  46. function decrypt($data, $key) {
  47. $iv = pack("H*", substr($data, 0, 16));
  48. $x = pack("H*", substr($data, 16));
  49. $res = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $x, MCRYPT_MODE_CBC, $iv);
  50. return $res;
  51. }
  52.  
  53. ?>
Add Comment
Please, Sign In to add comment