#velix - php expansion
1 messages ยท Page 1 of 1 (latest)
Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐
Hey there, what is missing in your result/response?
Can you share the request ID?
Lots of stuff, when I use $stripe = new \Stripe\StripeClient(....); $session = $stripe->checkout->sessions->retrieve(..), I'm getting the full details.
For example: cs_test_b1hAfS3GCqqgxuhm5B8VcfFHS6U6mOeasU9qd8kYeQtlVNpxZSkdsBYsUd
Maybe it's implemented for StripeClient only?
oh i see, its specific to the old vs new style for the pHP client?
I think the syntax is just a bit different, its definitely supported
hang on
But \Stripe\Check out\Session::retrieve allows an array as second parameter.
I think that you need to make the first param the array with id => cs_123
and expand in there, not the second param
ah yes, like this:
$checkoutSession = \Stripe\Checkout\Session::retrieve([
'id' => 'cs_test_123',
'expand' => ['line_items'],
]);
give that a shot
* Retrieves a Session object.
*
* @param string $id
* @param null|array $params
* @param null|array|\Stripe\Util\RequestOptions $opts
*
* @throws \Stripe\Exception\ApiErrorException if the request fails
*
* @return \Stripe\Checkout\Session
*/
The first parameter needs to be string
what version of the client are you using?
Updated about 3 weeks ago
if you have the other pattern it must be above 7.33
1 sec please
what i shared should work, what is the snippet you're using now?