graziano_68 Posted November 22, 2020 Share Posted November 22, 2020 (edited) Hello after updating to version 8 I continue to receive from Stripe email reporting that Webhook is failing. I checked in my Stripe Payment gateway and all is correct (Stripe API Key e.g.) and I can receive payments from Stripe. I understood from stripe logs that the problem happens when a customer tries to update credit card . Stripe log is reporting HTTP status code 500 (Internal Server Error) in Apache logs I see this 54.117.205.235 - - [20/Nov/2020:07:35:38 +0100] "POST /whmcs/modules/gateways/callback/stripe.php HTTP/1.1" 500 - "-" "Stripe/1.0 (+https://stripe.com/docs/webhooks)" and in Stripe admin section I see this Failed payment_method.updated evt_1HpTDZHdgpOFjtGMaZVln7uq Nov 20, 6:35 AM ResponseNo response body I contacted WHMCS support ( ticket JMX-068891 ) on 19th Nov 2020 (03:21) but they does not seem interested to solve the problem. They replies very slowww and are asking me for errors in log but I have only the error shown above. Anyone can help me to solve this issue ? Thank you Edited November 22, 2020 by graziano_68 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 22, 2020 Share Posted November 22, 2020 There is likely a php error within the callback. Turning debug, log errors, show errors under whmcs -> settings -> other tab may help. Once that is done, check the php error log for the errors after a webhook fails. The php error log can and usually are separate from the apache /nginx / whatever web server error log. 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 23, 2020 Author Share Posted November 23, 2020 debug is ON , however no error reported when I change credit card details . 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 23, 2020 Author Share Posted November 23, 2020 regarding php error_log are you talking about this ? /home/myuser/public_html/whmcs/error_log 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 23, 2020 Author Share Posted November 23, 2020 I found this in /home/myuser/public_html/whmcs/modules/gateways/callback/ (the folder where is located stripe webhook) [19-Nov-2020 11:23:46 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [19-Nov-2020 12:08:59 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [19-Nov-2020 13:53:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [19-Nov-2020 13:53:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [19-Nov-2020 14:09:12 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [19-Nov-2020 16:11:03 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:26:46 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:26:50 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:26:50 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 06:26:50 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:26:52 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:35:39 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 06:35:39 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 07:35:35 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 07:35:35 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 08:03:28 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 09:34:43 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 09:34:43 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 11:29:36 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 11:34:40 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 11:34:40 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 13:10:14 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:15:50 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:15:54 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:15:54 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 13:15:56 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:15:59 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:22:10 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:22:10 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:22:13 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:22:13 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 13:22:14 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:31:25 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:31:25 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId [20-Nov-2020 13:34:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:34:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted November 23, 2020 Share Posted November 23, 2020 Notices should not cause a 500 error as that is more of a fatal error. Though if the error was output or something beyond a json was given, it might have caused an error. The error log might be in /home/myuser/public_html/whmcs/error_log or each folder within whmcs or in a central file for php errors. You need to check a phpinfo() output. Check WHMCS -> Utilities -> System -> PHP Info and find error_log and the error log should be there. Check that file and see if there are any fatal errors or more then a notice. 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 24, 2020 Author Share Posted November 24, 2020 I have no fatal error in logs , I have only this [20-Nov-2020 13:34:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: id [20-Nov-2020 13:34:30 UTC] Stripe Notice: Undefined property of Stripe\StripeObject instance: clientId Still waiting a solution from support. 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 24, 2020 Author Share Posted November 24, 2020 (edited) I am still fighting with this issue, WHMCS support still useless ( ticket JMX-068891 ). In few words everything works in WHMCS but various files in /public_html/whmcs/modules/gateways/callback returns a 500 internal error https://mydomain/whmcs/modules/gateways/callback/index.php works but various other files in the folder https://mydomain/whmcs/modules/gateways/callback/stripe.php https://mydomain/whmcs/modules/gateways/callback/paypal.php returns a 500 internal error . In the log there is nothing useful, all error logs sets to show any possible error. I asked support to debug the file using a decoded version, but they ignore my request. Damn , what can I do now, since the file are encrypted and support is useless ? I tried to reupload all v8 files it didn't help too Edited November 24, 2020 by graziano_68 0 Quote Link to comment Share on other sites More sharing options...
graziano_68 Posted November 26, 2020 Author Share Posted November 26, 2020 Latest hours I have seen more interest in WHMCS support and finally they started to work on the issue seriously. 0 Quote Link to comment Share on other sites More sharing options...
alebeta Posted November 30, 2020 Share Posted November 30, 2020 On 11/26/2020 at 8:12 AM, graziano_68 said: Latest hours I have seen more interest in WHMCS support and finally they started to work on the issue seriously. Did you receive any update about this? thanks 0 Quote Link to comment Share on other sites More sharing options...
mustardman Posted January 1, 2021 Share Posted January 1, 2021 (edited) I am on v8.0.4 using PHP v7.3 and I am also having this problem when someone tries to update their credit card details. My system health looks ok. In my case I get a 400 error, not 500. Here are a couple relevant things I see in my Apache logs with the same timestamp at the exact time I try re-initiate the callback manually on the Stripe end. In access log "POST /clients/modules/gateways/callback/stripe.php HTTP/1.1" 400 - "-" "Stripe/1.0 (+https://stripe.com/docs/webhooks)" In error log PHP message: Stripe Notice: Undefined property of Stripe\\StripeObject instance: id PHP message: Stripe Notice: Undefined property of Stripe\\StripeObject instance: clientId PHP message: Stripe Notice: Undefined property of Stripe\\StripeObject instance: email Edited January 1, 2021 by mustardman 0 Quote Link to comment Share on other sites More sharing options...
mustardman Posted January 2, 2021 Share Posted January 2, 2021 (edited) In my case, if I go into Gateway Transaction Log I see a "Client Not Found" error. The debug data there shows the failing webhook is missing the Client ID and Pay Method ID for some reason. So that is why Stripe is seeing a 400 error. If I use my test client account I can add and edit credit cards and get successful "payment_method.updated" webhooks back from Stripe so I can't seem to reproduce the error of missing Client ID and Pay Method ID. Edited January 2, 2021 by mustardman 0 Quote Link to comment Share on other sites More sharing options...
HostingMe Posted January 4, 2021 Share Posted January 4, 2021 I saw a very similar issues with web hooks failing a while back during beta testing. I found the issue was related to Stripe having the wrong metadata information for some customers. To resolve the issue I logged into Stripe > Customers > Selected the customer > Scrolled down to the Metadata section and checked the information there matched WHMCS. If not update to match WHMCS. As an example if the Customer ID within WHMCS is 10 and Stipe has the metadata ID as 15 the web hook would fail. Changing the metadata ID to 10 in Stripe would fix the issue. 0 Quote Link to comment Share on other sites More sharing options...
RockTBN Posted January 6, 2021 Share Posted January 6, 2021 On 1/3/2021 at 1:03 AM, mustardman said: In my case, if I go into Gateway Transaction Log I see a "Client Not Found" error. The debug data there shows the failing webhook is missing the Client ID and Pay Method ID for some reason. So that is why Stripe is seeing a 400 error. If I use my test client account I can add and edit credit cards and get successful "payment_method.updated" webhooks back from Stripe so I can't seem to reproduce the error of missing Client ID and Pay Method ID. I'm having the same issue on 8.1.0 . Did WHMCS support provide any resolutions? 0 Quote Link to comment Share on other sites More sharing options...
mustardman Posted January 6, 2021 Share Posted January 6, 2021 (edited) 12 hours ago, RockTBN said: I'm having the same issue on 8.1.0 . Did WHMCS support provide any resolutions? In my case, I think it may have had something to do with my SSL intermediate certificate bundle no longer working after it renewed. SSL was still working for browser access but I think Stripe webhook uses the intermediate certificate bundle. I have not been able to reproduce it since I fixed that. Edited January 6, 2021 by mustardman 0 Quote Link to comment Share on other sites More sharing options...
keyboardmls Posted January 21, 2021 Share Posted January 21, 2021 I'm having the same issue after updating to 8.1. This appears to be a widespread issue. Did anyone find a solution? 0 Quote Link to comment Share on other sites More sharing options...
RockTBN Posted January 22, 2021 Share Posted January 22, 2021 On 1/21/2021 at 10:58 AM, keyboardmls said: I'm having the same issue after updating to 8.1. This appears to be a widespread issue. Did anyone find a solution? Nope. We have been receiving the email notifications from Stripe that the issue was resolved then after a few days it appeared again. Cannot find a root cause of this, I will open a ticket with WHMCS soon. 0 Quote Link to comment Share on other sites More sharing options...
keyboardmls Posted January 22, 2021 Share Posted January 22, 2021 After testing just about everything I found the cause of mine to be an outdated addon module (tawkto). 0 Quote Link to comment Share on other sites More sharing options...
tripsis Posted January 28, 2021 Share Posted January 28, 2021 On 1/4/2021 at 1:58 PM, HostingMe said: I saw a very similar issues with web hooks failing a while back during beta testing. I found the issue was related to Stripe having the wrong metadata information for some customers. To resolve the issue I logged into Stripe > Customers > Selected the customer > Scrolled down to the Metadata section and checked the information there matched WHMCS. If not update to match WHMCS. As an example if the Customer ID within WHMCS is 10 and Stipe has the metadata ID as 15 the web hook would fail. Changing the metadata ID to 10 in Stripe would fix the issue. Thank you. This fixed the issue for me too. Specifically the email address in Stripe did not match the email address in WHMCS. Changing them to match appears to have fixed the problem. This definitely needs to get fixed in WHMCS though... 0 Quote Link to comment Share on other sites More sharing options...
UNBXD Posted February 5, 2021 Share Posted February 5, 2021 I have similiar issue with webhook after updateing to 8.1.0. My SSL page stopped works - we received solution from SUPPORT already. Basically in the database (tblproducts table) SSL id need to match ID from tblproducts roup for SSL. Now I have issue with STRIPE webhook. When some fields at checkout are not filled up it not showing errors and hangs. Direct Debit method works fine...any ideas? Also STRIPE support contacted me that webhooks has problems with communication. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.