How to do refund in Stripe PHP -


i'm trying make refund in stripe.

\stripe\stripe::setapikey("sk_test_mhsahbkatvieiwsdsvc7qfwj");  $re = \stripe\refund::create(array(   "charge" => "ch_19dvsliagnbxqsqzfjhop8jq" )); 

but did not work. 1 guide me wrong doing. i'm getting error:
fatal error: class 'stripe_apiresource' not found

thanks folks

you can refund below

\stripe\stripe::setapikey("sk_test_mhsahbkatvieiwsdsvc7qfwj");   $refund = \stripe\refund::create([             'charge' => 'ch_19dvsliagnbxqsqzfjhop8jq',             'amount' => 1000,  // 10 $             'reason' => 'refund'         ]);  $balancetransaction = \stripe\balancetransaction::retrieve($refund->balance_transaction); 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -