Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <?php
  2. #Below is full list of available characters.
  3. #"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
  4. $fp=fopen("/dev/urandom","r") or die;
  5. $available_chars="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz";
  6. do{
  7. $minikey='S';
  8. for($i=0;$i<29;$i++){
  9. while(($c=ord(fgetc($fp)))>=strlen($available_chars));
  10. $minikey.=substr($available_chars,$c,1);
  11. }
  12. $check=hash('sha256',$minikey . '?') . "n";
  13. }while(substr($check,0,2)!='00');
  14. fclose($fp);
  15. $priv=hash('sha256',$minikey);
  16. print "Minikey: $minikeyn";
  17. print "Privkey: $privn";
  18. ?>
  19.  
  20. <?
  21. require_once( "cryptobox.class.php" );
  22.  
  23. $options = array(
  24. "private_key" => "", // private key from gourl.io
  25. "orderID" => "your_product1_or_signuppage1_etc",
  26. "amountUSD" => 2 // 2 USD
  27. );
  28.  
  29. // Initialise Payment Class
  30. $box1 = new Cryptobox ($options);
  31.  
  32. // Display Payment Box or successful payment result
  33. $paymentbox = $box1->display_cryptobox();
  34.  
  35. // A. Process Received Payment
  36. if ($box1->is_paid())
  37. {
  38.  
  39. // Your code here to handle a successful cryptocoin payment
  40. // ...
  41. }
  42. else $message .= "The payment has not been made yet";
  43. ?>
  44. <!DOCTYPE html>
  45. <html><head></head>
  46. <body>
  47. <?= $paymentbox ?>
  48. <?= $message ?>
  49. </body>
  50. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement