本文整理匯總了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);
}