Zoka
Zoka

Reputation: 445

Laravel Cashier (Stripe) - createAsStripeCustomer function throws error

I'm using Laravel 5.7 with Laravel Cashier v9.0. Just installed it today. I've updated User model and migration with additional field as stated in the documentation. The problem is, when I try to call a function createAsStripeCustomer() on existing User instance and I pass $token that is created on Android app as a parameter I get Received unknown parameters: mCard, mCreated, mId, mLivemode, mType, mUsed... Is it the API version incompatibility or am I missing something? Thanks in advance!

Upvotes: 1

Views: 2171

Answers (1)

user1914790
user1914790

Reputation: 11

$user->createOrGetStripeCustomer([
        'source' =>  $token,
       
    ]);

Pass stripe token in source key as an array and it should work fine

Upvotes: 1

Related Questions