yii2mod / yii2-cashier

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

how to get $creditCardToken #7

Closed vickysw closed 6 years ago

vickysw commented 6 years ago

$user = User::findOne(1);

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

Can anyone tell me how to get $creditCardToken ?

ihorchepurnyi commented 6 years ago

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