Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require __DIR__."/vendor/autoload.php";
- $sk = "some_key";
- \Stripe\Stripe::setApiKey($sk);
- $ckout = Stripe\Checkout\Session::create([
- "mode" => "payment",
- "success_url" => "http://localhost/success.php",
- "line_items"=>[
- [
- "quantity"=>1,
- "price_data"=>[
- "currency"=>"usd",
- "unit_amount" => 2000,
- "product_data" => [
- "name" => "T-shirt"
- ]
- ]
- ]
- ]
- ]);
- http_response_code(303);
- header("Location:" .$ckout->url);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement