First time I am working with Payment System with PHP and Stripe API.
I have html form where user can Add their credit card info. Form fields are bellow :
- Card Number
I can successfully add user credit card to my stripe account as Customer Account.
Now After added the credit card and I can get the card details using stripe API and...
Is it require to show the credit card number to the form field called
If so, then I can't see any full credit card number, I can see one of stripe object called
last4. I know it's a last 4 digit of user credit card
Okey, If I show only 4 digit to the
Card Numberfield then when I update the form It's showing
The card number is not a valid credit card number.because the field is only showing
If I again enter my card number to that
Card Numberfield then it's successfully updated.
Now how can I update the user credit card without again enter the credit card number to the
Card Number field ?
and Update Code is following :
$updateCustomer = \Stripe\Customer::retrieve("$acc_id"); $updateCustomer->description = "Customer account of $fname_db $lname_db - #$u_id ($accountFor Account)"; $updateCustomer->source = "$stripToken"; $updateCustomer->save();