yii2mod / yii2-cashier

Yii2 Cashier provides an interface to Stripe's subscription billing services.
MIT License
46 stars 25 forks source link

how to get $creditCardToken #7

Closed vickysw closed 7 years ago

vickysw commented 7 years ago

$user = User::findOne(1);

$user->newSubscription('main', 'monthly')->create($creditCardToken);

Can anyone tell me how to get $creditCardToken ?

ihorchepurnyi commented 7 years ago

Hi, try this https://github.com/yii2mod/yii2-cashier/blob/master/tests/CashierTest.php#L13