本文整理汇总了PHP中Stripe::customer_create方法的典型用法代码示例。如果您正苦于以下问题:PHP Stripe::customer_create方法的具体用法?PHP Stripe::customer_create怎么用?PHP Stripe::customer_create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stripe
的用法示例。
在下文中一共展示了Stripe::customer_create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chargestripe
public function chargestripe()
{
$token = $this->input->get("token");
$email = $this->input->get("email");
$amount = $this->input->get("amount");
$name = $this->input->get("name");
$this->load->library('stripe');
// Configuration options
$config['stripe_key_test_public'] = 'pk_test_4etgLi16WbODEDr4YBFdcbP0';
$config['stripe_key_test_secret'] = 'sk_test_h3I0MijdGsdeA4FnOT9CCkcJ';
$config['stripe_key_live_public'] = 'pk_live_I1udSOaNJK4si3FCMwvHsY4g';
$config['stripe_key_live_secret'] = 'sk_live_eqZA0JiLo45803pp3nvOmmNC';
$config['stripe_test_mode'] = FALSE;
$config['stripe_verify_ssl'] = FALSE;
// Create the library object
$stripe = new Stripe($config);
// Run the required operations
$customer = json_decode($stripe->customer_create($token, $email));
$data['message'] = json_decode($stripe->charge_customer($amount, $customer->id, $name));
$this->load->view("json", $data);
}