#MMunir-php-orders

1 messages · Page 1 of 1 (latest)

deep plank
#

Hello! What specific errors are you getting?

distant kiln
#

this is the error i see and when i try order-info it says slim application error

#

iukj

deep plank
#

Have you checked specific what is at line 102? How much debugging have you done so far?

distant kiln
#

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

deep plank
#

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?

distant kiln
#

from this page i got that codes

deep plank
#

It's possible for our docs to be wrong, so definitely try out what I suggested

distant kiln
#

'$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]);

deep plank
#

You keep saying there are errors, but you're not telling me what they are - what are the specific errors you get?

distant kiln
#

[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

deep plank
#

and what specifically is at line 103?

distant kiln
#

$response->withJson([ 'session' => $session->session, 'customer' => $customer->customer]);

deep plank
#

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

distant kiln
#

can you request them to create a tutorial on checkout 101 php custom order as that can solve many doubt