#MMunir-php-orders
1 messages · Page 1 of 1 (latest)
this is the error i see and when i try order-info it says slim application error
iukj
Have you checked specific what is at line 102? How much debugging have you done so far?
at line 102 $session = \Stripe\Checkout\Session::retrieve($request->get('session_id')); this is the code so what am i making it wrong arent we suppose to write this
i even asked for tutorial back a month ago and was said they be working on it but no updates yet
I'm not a PHP expert, but it's likely this part $request->get('session_id') that's wrong. You probably want to do $request->getQueryParams()['sessionId'] instead?
from this page i got that codes
It's possible for our docs to be wrong, so definitely try out what I suggested
'$request' (T_VARIABLE) in /Users/mmunir/Desktop/Final-Test-stripe/server/index.php on line 103
i even change $customer = \Stripe\Customer::retrieve($session->customer); to $request->getQueryParams()['customer']
if i skip customer then i get error on return $response->withJson([ 'session' => $session->session, 'customer' => $customer->customer]);
You keep saying there are errors, but you're not telling me what they are - what are the specific errors you get?
[Tue Sep 20 20:52:16 2022] ::1:51752 [200]: / - syntax error, unexpected '$request' (T_VARIABLE) in /Users/mmunir/Desktop/Final-Test-stripe/server/index.php on line 103
his is the error i get
and what specifically is at line 103?
$response->withJson([ 'session' => $session->session, 'customer' => $customer->customer]);
That line doesn't have $request in it at all
Taking a step back - how experienced are you with slim php? There could be a number of things that are wrong - it could be your PHP version, the version of Slim you're using, syntax errors, etc, and you need to be able to pinpoint these errors and correct them
If you're not super familiar with slim then I'd suggest looking through some of the samples we have (https://github.com/stripe-samples) as a starting point
can you request them to create a tutorial on checkout 101 php custom order as that can solve many doubt