Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

save right type card stripe-payment

 <?php
require_once('vendor/autoload.php');
include_once './vendor/stripe/stripe-php/lib/Stripe.php';
//secret key
\Stripe\Stripe::setApiKey("APY_key");
$token = $_POST['stripe-token'];
$customer = \Stripe\Customer::create([
"description" => "customer for carsharing",
"source" => $token // obtained with Stripe.js
]);
$customer->sources->create(["source" => "tok_visa"]);

how can save a card with type of card is dynamic??

source -> tok_visa put every card in visa type.

Comments