array("public_key" => "-your public key for Bitcoin box-", "private_key" => "-your private key for Bitcoin box-"), "bitcoincash" => array("public_key" => "-your public key for BitcoinCash box-", "private_key" => "-your private key for BitcoinCash box-"), "litecoin" => array("public_key" => "-your public key for Litecoin box-", "private_key" => "-your private key for Litecoin box-")); // etc. // Demo Keys; for tests (example - 5 coins) $all_keys = array( "bitcoin" => array("public_key" => "25654AAo79c3Bitcoin77BTCPUBqwIefT1j9fqqMwUtMI0huVL", "private_key" => "25654AAo79c3Bitcoin77BTCPRV0JG7w3jg0Tc5Pfi34U8o5JE"), "bitcoincash" => array("public_key" => "25656AAeOGaPBitcoincash77BCHPUBOGF20MLcgvHMoXHmMRx", "private_key" => "25656AAeOGaPBitcoincash77BCHPRV8quZcxPwfEc93ArGB6D"), "litecoin" => array("public_key" => "25657AAOwwzoLitecoin77LTCPUB4PVkUmYCa2dR770wNNstdk", "private_key" => "25657AAOwwzoLitecoin77LTCPRV7hmp8s3ew6pwgOMgxMq81F"), "dogecoin" => array("public_key" => "25678AACxnGODogecoin77DOGEPUBZEaJlR9W48LUYagmT9LU8", "private_key" => "25678AACxnGODogecoin77DOGEPRVFvl6IDdisuWHVJLo5m4eq")); // Demo keys! // IMPORTANT: Add in file /lib/cryptobox.config.php your database settings and your gourl.io coin private keys (need for Instant Payment Notifications) - /* if you use demo keys above, please add to /lib/cryptobox.config.php - $cryptobox_private_keys = array("25654AAo79c3Bitcoin77BTCPRV0JG7w3jg0Tc5Pfi34U8o5JE", "25656AAeOGaPBitcoincash77BCHPRV8quZcxPwfEc93ArGB6D", "25657AAOwwzoLitecoin77LTCPRV7hmp8s3ew6pwgOMgxMq81F", "25678AACxnGODogecoin77DOGEPRVFvl6IDdisuWHVJLo5m4eq", "25658AAo79c3Dash77DASHPRVG7w3jg0Tc5Pfi34U8o5JEiTss", "20116AA36hi8Speedcoin77SPDPRVNOwjzYNqVn4Sn5XOwMI2c"); Also create table "crypto_payments" in your database, sql code - https://github.com/cryptoapi/Payment-Gateway#mysql-table Instruction - https://gourl.io/api-php.html */ // Re-test - all gourl public/private keys $def_coin = strtolower($def_coin); if (!in_array($def_coin, $coins)) $coins[] = $def_coin; foreach($coins as $v) { if (!isset($all_keys[$v]["public_key"]) || !isset($all_keys[$v]["private_key"])) die("Please add your public/private keys for '$v' in \$all_keys variable"); elseif (!strpos($all_keys[$v]["public_key"], "PUB")) die("Invalid public key for '$v' in \$all_keys variable"); elseif (!strpos($all_keys[$v]["private_key"], "PRV")) die("Invalid private key for '$v' in \$all_keys variable"); elseif (strpos(CRYPTOBOX_PRIVATE_KEYS, $all_keys[$v]["private_key"]) === false) die("Please add your private key for '$v' in variable \$cryptobox_private_keys, file /lib/cryptobox.config.php."); } // Current selected coin by user $coinName = cryptobox_selcoin($coins, $def_coin); // Current Coin public/private keys $public_key = $all_keys[$coinName]["public_key"]; $private_key = $all_keys[$coinName]["private_key"]; /** PAYMENT BOX **/ $options = array( "public_key" => $public_key, // your public key from gourl.io "private_key" => $private_key, // your private key from gourl.io "webdev_key" => "", // optional, gourl affiliate key "orderID" => $orderID, // order id or product name "userID" => $userID, // unique identifier for every user "userFormat" => $userFormat, // save userID in COOKIE, IPADDRESS, SESSION or MANUAL "amount" => 0, // product price in btc/bch/bsv/ltc/doge/etc OR setup price in USD below "amountUSD" => $amountUSD, // we use product price in USD "period" => $period, // payment valid period "language" => $def_language // text on EN - english, FR - french, etc ); // Initialise Payment Class $box = new Cryptobox ($options); // coin name $coinName = $box->coin_name(); // php code end :) // --------------------- // NOW PLACE IN FILE "lib/cryptobox.newpayment.php", function cryptobox_new_payment(..) YOUR ACTIONS - // WHEN PAYMENT RECEIVED (update database, send confirmation email, update user membership, etc) // IPN function cryptobox_new_payment(..) will automatically appear for each new payment two times - payment received and payment confirmed // Read more - https://gourl.io/api-php.html#ipn ?> Payment Box Demo Text - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

"; $custom_text .= "

Please contact us for any questions on aaa@example.com

"; // Display payment box echo $box->display_cryptobox_bootstrap($coins, $def_coin, $def_language, $custom_text, 70, 200, true, "default", "default", 250, "", "curl", true); // You can setup method='curl' in function above and use code below on this webpage - // if successful bitcoin payment received .... allow user to access your premium data/files/products, etc. // if ($box->is_paid()) { ... your code here ... } ?>