I'm using the stripe api with php, and the basic process is as follows:
- Submitted with the payment form and a stripe token is created via php stripe sdk.
- If the customer exists in the local database, I grab their
customer_id
and fingerprint. Otherwise a new customer is created using the token as the source/card. - If the customer and same fingerprint exists in the local database, if the token object response fingerprint and my local database fingerprint different means.
- I retrieve the customer details using existing customer id and I create a new card using customer source create
api($customer->sources->create(array("source" => "tok_18hAe4DdoStEhOoYr2TTQlaL")); )
.
- I retrieve the customer details using existing customer id and I create a new card using customer source create
Card creation time: how can I validate cvc, expmonth and year?