%PDF- %PDF-
Direktori : /home/eirtvhdf/logobrainiacs.com/logodesign/stripe/ |
Current File : /home/eirtvhdf/logobrainiacs.com/logodesign/stripe/checkout.php |
<?php /*foreach ($_POST as $key => $value) { echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>"; }*/ ?> <?php require_once('../root_stripe/stripe/init.php'); ?> <?php // Set your secret key: remember to change this to your live secret key in production // See your keys here: https://dashboard.stripe.com/account/apikeys //\Stripe\Stripe::setApiKey("sk_test_yAeBLEexLzniHQPix52aXQ4H"); \Stripe\Stripe::setApiKey("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"); // Token is created using Checkout or Elements! // Get the payment token ID submitted by the form: $token = $_POST['stripeToken']; $amount = $_POST['amount']; $desc = $_POST['desc']; $charge = \Stripe\Charge::create([ 'amount' => $amount, 'currency' => 'usd', 'description' => $desc, 'source' => $token, 'receipt_email' => 'fahadansari91@gmail.com', ]); //echo $charge; //header('Location: '.'/eirtechs/'); echo '<script type="text/javascript"> window.location = "../thankyou.php" </script>'; ?>