#Sudarshanan G

1 messages ยท Page 1 of 1 (latest)

topaz roverBOT
stray finch
#

Hi ๐Ÿ‘‹ can you elaborate on the problems you're running into?

main pike
#

yeah, What I need is, I need to store card details in stripe and retrieve it later. so that customer can use their stored card to finish payment

#

but I'm not able to store/retrieve card details

#

I'm using laravel and react for implementation

#

I used this line of code to create/retrieve cards. But always it throws source is null error.

create: $customer->sources->create(['source' => $paymentMethod->id]);

retrieve: $customer->sources->data

stray finch
#

Are you using Laravel Cashier?

main pike
#

no, I'm using this one stripe/stripe-php

#

but payment method are getting created

stray finch
#

Gotcha, so for new integrations I wouldn't recommend using Sources, they're a more legacy approach and Payment Methods are our recommended replacement for them.

main pike
#

okay thanks I will check