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

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -