0
<?php
require_once('Stripe/lib/Stripe.php');
Stripe::setApiKey(trim($pkey));
try
{
$customer = Stripe_Customer::create(array(
'email' => $_POST['stripeEmail'],
'source' => $_POST['stripeToken'],
'plan' => trim($plan)
));
}
catch(Exception $e)
{
//header('Location:oops.html');
error_log("unable to sign up customer:" . $_POST['stripeEmail'].
", error:" . $e->getMessage());
}
?>
在這裏,我想獲得客戶ID,所以我打印$客戶對象時,它給人的條紋對象,但我不不知道如何從結果中檢索客戶ID。 如果有人知道請幫助我。 在此先感謝
感謝您的回覆我試過$ customer-> id它適用於我 –
請接受我的anser如果它可以幫助你。 –
@ravikumar請接受我的回答。它真的鼓勵他人的貢獻。謝謝。 –