#gironimo4 - php checkout

1 messages · Page 1 of 1 (latest)

wispy sandal
#

hey there, what exactly are you trying to do? If you're set up Prices you'd want to be using the Price API to retrieve those from.

lapis sigil
#

So I'm trying to update a PHP include page that includes a bunch of different price plans in an array so that each separate client facing page can pull from that plan directory rather than having to hard code the price to each page. So what the "plan" page actually looks like on that line in our legacy code is:
${'tboIOSLevel' . $examLevel . 'WeeklyPlan'} = Stripe_Plan::retrieve(${'tboIOSLevel' . $examLevel . 'WeeklyPlanId'});
${'tboIOSLevel' . $examLevel . 'WeeklyPlanName'} = ${'tboIOSLevel' . $examLevel . 'WeeklyPlan'}['name'];
${'tboIOSLevel' . $examLevel . 'WeeklyPlanPrice'} = planPrice(${'tboIOSLevel' . $examLevel . 'WeeklyPlan'});

And I guess it's an API error, but the Stripe_Plan is being reported as an unfound object type, so not sure if there's a new object that has a ::retrieve function or not

wispy sandal
#

Sure that doesn't sound like an API error but instead an issue with something in the code referring to something thats not in the SDK or not imported etc

lapis sigil
#

Understood, I'll get back to digging through the documentation

wispy sandal
#

Generally speaking the Plan API still exists and can still be used, so that should be an issue

#

Ok yea thats a lot of version changes of stripe-php

lapis sigil
#

I'll give it a try, thanks again

wispy sandal
#

but \Stripe\Plan::retrieve('plan_123'); should also still work

lapis sigil
#

OK, great, I'll keep all of these links handy

wispy sandal
#

try replacing Stripe_Plan with that maybe?

lapis sigil
#

Looks like we're past that error. So that syntax works, which should help. Probably have a chain of errors coming up to chase, but you've helped for now, thanks again

wispy sandal
#

Great! Glad i was able to help 🙂