#Mahdi_SN-checkout

1 messages ยท Page 1 of 1 (latest)

foggy elk
serene radish
#

Hi ๐Ÿ‘‹
Can you describe your integration?

#

Also can you provide some request IDs for

  1. A Checkout request that worked (local)
  2. A checkout request that failed (prod)
proven river
#

my project tructure

#

aja endpoint

half radish
#

๐Ÿ‘‹ 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

proven river
#

look on conole alway 500

half radish
#

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.

proven river
#

localy it work

#

fine

half radish
#

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

proven river
#

can u explain for me pl

half radish
#

I have a few times

#

Can you explain what you don't understand exactly?

proven river
#

you have not made one Checkout Session creation request in Live mode

#

thi

half radish
#

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

#

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

proven river
#

but locally it work fine

#

with live mode

half radish
#

Well it doesn't work in Live mode on that account, you've never used Checkout in Live mode on this account

proven river
#

so

#

the solution ?

#

there are a config ?

#

on stripe dashboard ?

#

to allow live mode ?

half radish
#

@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

proven river
#

[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/

half radish
#

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

proven river
#

thnku very much

#

done now

half radish
#

Does it work now?

proven river
#

yeee broo

#

thnk