I am currently working on a WordPress/Woocomerce project I am trying to write a plugin which calls the stripe API using the following method
$stripe = new \Stripe\StripeClient('apikey');
$stripe->charges->create([
'amount' => 1500,
'currency' => 'gbp',
'source' => 'accountid',
]);
}
This API returns an object containing information regarding the call for example
"id": "callid",
"object": "payment_intent",
"amount":43650,
"amount_capturable":0,
I want to assign this ID in the return object to a local variable. How can I achieve this ? I am a .net developer and my PHP skills are limited I need the simple as possible solution.
Thank you.