目次一覧
状態:-
閲覧数:671
投稿日:2019-03-17
更新日:2019-03-21
質問履歴24 / A
質問履歴24 / A
質問履歴24
After attaching the source to the customer object, how do I check from the customer object?
・2019/3/16
$customer1 = \Stripe\Customer::create([
"description" => "test",
'email' => 'a@example.com',
]);
$customerObj = \Stripe\Customer::retrieve($customer1->id);
$sourceObj = $customer->sources->create(["source" => 'src_xxxx']);
The source object has been created. I can understand this.
I can not understand where in the Customer object the source object was created.
How can I check the source object created above from the Customer object?
var_export($customer->sources->source);
・After attaching the source to the customer object, how do I check from the customer object?
A
更新されたソースをソースのリストに表示するには?
・Customerオブジェクトをもう一度取得する必要がある
・これにはhttps://stripe.com/docs/api#retrieve_customerを使用してくれ
\Stripe\Stripe::setApiKey("sk_test_xxxx");
$customer = \Stripe\Customer::retrieve('cus_EhrAhwK7W4OB41');
foreach($customer->sources->data as $key => $val){
echo $val->id."<br>";
}
Stripe Q23。イベントで「新しい支払元が追加されました」と表示されているのに、「支払元がありません」
Stripe Q25。Why is it an error to use “token_xxxx” not associated with a Customer object for payment?