#Mahdi_SN-checkout
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Can you describe your integration?
Also can you provide some request IDs for
- A Checkout request that worked (local)
- A checkout request that failed (prod)
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
๐ Step 1 is to debug the 500. This usually is a PHP error, you can read the error log file on your server for example to debug
You can also look at the errors in the Dashboard at https://dashboard.stripe.com/logs and see whether there's anything obvious, it's likely a configuration issue in your account
sure but that's 100% your own code
that's what you, as the developer, have to debug
add logs to your code, read the error log, etc.
for example right now the code isn't even catching any API errors that can be returned by Stripe: https://stripe.com/docs/api/errors
and sure the fact that it works locally doesn't really change much
I looked at your logs, you have not made one Checkout Session creation request in Live mode. You are likely mixing up your API keys or overall integration for now and that's what you need to debug next
can u explain for me pl
You have PHP code, that code isn't working. The next step is to debug why it's not working by either writing more PHP code, such as adding clear echo and such to debug your code, or by reading the PHP error log file on your server for example
Right now if you look at your Stripe Dashboard and the Logs panel at https://dashboard.stripe.com/logs you won't see any /v1/checkout/sessions in Live mode
which means either you mixed up your API keys or are using a different Stripe account, or your code on your server is not even running up to that Checkout creation
Unfortunately it's really hard to help on my end without explicit/clear details. So that's your first step, to debug this
Well it doesn't work in Live mode on that account, you've never used Checkout in Live mode on this account
so
the solution ?
there are a config ?
on stripe dashboard ?
to allow live mode ?
@proven river the solution is for you to spend some time debugging this?
Like I';m sorry but you're demanding answers when it's really limited to your own code/set up
What have you tried? Did you look at the server's error logs? If not, that's what you need to do
[Mon Mar 14 18:16:15.034007 2022] [php7:error] [pid 17168] [client 102.106.198.176:4560] PHP Fatal error: Uncaught Error: Call to undefined function curl_version() in /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php:85\nStack trace:\n#0 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php(73): Stripe\HttpClient\CurlClient->initUserAgentInfo()\n#1 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php(34): Stripe\HttpClient\CurlClient->__construct()\n#2 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/ApiRequestor.php(493): Stripe\HttpClient\CurlClient::instance()\n#3 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/ApiRequestor.php(349): Stripe\ApiRequestor->httpClient()\n#4 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/ApiRequestor.php(117): Stripe\ApiRequestor->_requestRaw('post', '/v1/checkout/se...', Array, Array)\n#5 /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-ph in /var/www/html/subscription/b9ded908c236bd1996d/vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php on line 85, referer: https://subscription.flsport.tv/b9ded908c236bd1996d/
okay so now you know!
that error is clearly indicating your code is not running at all because curl_version doesn't exist. You likely don't have curl enabled on your server. You need to talk to your hosting provider
Does it work now?