<?php
require_once('./config.php');
//需要用到的参数传过来就好. 这是纯php后台完成支付,如果你先使用js创建了token对象那么直接把token传过来就好了.不用创建token对象
$token_id = $_POST['stripeToken'];
$email = $_POST['stripeEmail'];
$amount = $_POST['data-amount'];
$currency = $_POST['data-currency'];
// \Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); //私钥
//创建token
//通过这个创建一个卡并在后面将它绑定到一个customer
// $token = \Stripe\Token::create(array(
// "card" => array( //这个就是卡
//
require_once('./config.php');
//需要用到的参数传过来就好. 这是纯php后台完成支付,如果你先使用js创建了token对象那么直接把token传过来就好了.不用创建token对象
$token_id = $_POST['stripeToken'];
$email = $_POST['stripeEmail'];
$amount = $_POST['data-amount'];
$currency = $_POST['data-currency'];
// \Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); //私钥
//创建token
//通过这个创建一个卡并在后面将它绑定到一个customer
// $token = \Stripe\Token::create(array(
// "card" => array( //这个就是卡
//