Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("MyLiqPay.php");
- if (!isset($_REQUEST["email"]) || !isset($_REQUEST["amount"]) )
- {
- echo "{ Method \"GET\" not allowed }";
- exit();
- }
- else {
- $public_key = '3245324534534';
- $private_key = 'dfdfgfhn<snhgfnfsnfgnfsngfnsgnsgnsf';
- $email = $_REQUEST['email'];
- $amount = $_REQUEST['amount'];
- $currency = $_REQUEST['currency'];
- $regcode = $_REQUEST['regcode'];
- $product_name = $_REQUEST['product_name'];
- $order_id = "SE".time(); # set random order_id
- $liqpay = new LiqPay($public_key, $private_key);
- $html = $liqpay->cnb_form2(array(
- 'action' => 'pay',
- 'amount' => $amount,
- 'currency' => $currency,
- 'description' => 'Платеж на сайт SeTracker.org',
- 'order_id' => $order_id,
- 'version' => '3',
- 'server_url' => 'https://pay.setracker.org/billing/liqpay-pay-callback/',
- 'info' => $email, // email
- 'product_name' => $product_name, # take prodyct type. Values - reset or newid is required.
- 'product_description' => $regcode, # regcode for reset
- ));
- echo $html;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement