#steel971 - Checkout PHP

1 messages · Page 1 of 1 (latest)

vagrant condor
elfin lichen
#

Thank you so much for your quick answer

#

i tried to expand the fields as it's say on the doc

#

$session = \Stripe\Checkout\Session::retrieve($session_id, ['expand' => ['customer', 'line_items']]);

#

but i cannot make it work

#

it's seem to ignore my expand fileds

vagrant condor
elfin lichen
#

hum kind of weird

#

i doesn't see the request

#

but you can see the session object here

#

but nothing in the logs

vagrant condor
#

Make sure you're not filtering out GET requests.

#

GET requests are filtered out by default I believe.

elfin lichen
#

you was right

#

here it is req_JxRjvuRVj3S8MG

vagrant condor
#

Looking...

#

Looks like your code didn't actually send in any expansion information. Is the code above the exact code you used?

elfin lichen
#

it's a direct copy/paste

vagrant condor
#

Try this instead:

$session = \Stripe\Checkout\Session::retrieve([
  'id' => $session_id,
  'expand' => ['customer', 'line_items'],
]);
elfin lichen
#

this is working

#

the syntax is different between

#

and what I use

#

is there any documentation for the composer

#

version ?

vagrant condor
elfin lichen
#

oh

#

i use the legacy approach

#

i'll change my code in order to do the newest version

vagrant condor
#

Yep, the legacy approach is fine, but the API reference uses the new version.

elfin lichen
#

thank you

#

maybe this page need an update on the PHP version

#

in order to be on the newest version

#

Thank you so much for your help !
Best regards,

vagrant condor
#

Yep, all the docs still use the legacy PHP approach.