#akshaygoyal

1 messages · Page 1 of 1 (latest)

bitter summitBOT
hasty cape
#

Any specific reason you want to use an older API? It's discourage generally

cursive sigil
#

actually i am getting issue in creating payment in that version. In live site we are using that version and its working fine

hasty cape
#

You should work on resolving that issue instead. Do you have the specific issue? We are happy to look closer

cursive sigil
#

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

hasty cape
#

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

cursive sigil
#

okay but i can not change code actually live its working fine

hasty cape
#

Still, going with a version 5 years ago is way more riskier than that