#GiuseppeB

1 messages · Page 1 of 1 (latest)

quaint haloBOT
acoustic quiver
#

hello! what specifically doesn't work? All the parameters are not expanding? or only one specific parameter?

winter reef
#

all parameters

acoustic quiver
#

can you share the request id? and the exact response that you're receiving?

winter reef
#

I'm not sure about the request id but I believe is this one:
req_jO7L75Lm31W5Dn

acoustic quiver
#

alright, gimme a while to look at it

winter reef
#

so what it's wrong here:

$ret = Subscription::retrieve('<id-of-subscription>', ['expand' => $expand]);

acoustic quiver
#

have you tried logging what's in $expand just before retrieving the subscription?

winter reef
#

yes

#

anyway I even tried to hardcore it:
Subscription::retrieve('id-subscription', ['expand' => ['latest_invoice.payment_intent']]);

#

and still not expanding the element

#

$ret = Subscription::retrieve($subscription->id, ['expand' => ['latest_invoice.payment_intent']]);
dd($ret->getLastResponse()->json);

#

this is the full code

#

dd is to dump the variable

acoustic quiver
#

Your code should probably be something like

Subscription::retrieve(['id' =>'sub_1Mp1Q8JQtHgRImA7uNe4ibLd', 'expand' => ['latest_invoice.payment_intent']]);
winter reef
#

mh... let me try

#

it worked