#akshaygoyal
1 messages · Page 1 of 1 (latest)
Any specific reason you want to use an older API? It's discourage generally
actually i am getting issue in creating payment in that version. In live site we are using that version and its working fine
You should work on resolving that issue instead. Do you have the specific issue? We are happy to look closer
actually i created a secondary account for testing in stripe the main account is working on live is on that version.
\Stripe\Stripe::setApiKey(SECRET_KEY);
$customer = \Stripe\Customer::retrieve($customerId);
$card = $customer->sources->create(array("source" => $token));
its not working in this way
getting null error on sources
but when i use that version (sending in header) its working fine
You can Create a Source first https://stripe.com/docs/api/sources/create then attach it to the Customer later https://stripe.com/docs/api/sources/attach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay but i can not change code actually live its working fine
Still, going with a version 5 years ago is way more riskier than that