dorv56831 2018-11-26 11:57
浏览 65

条纹Webhooks

I am having a similar problem with Stripe webhooks. Spent all weekend trying to diagnose without success. Getting a general 500 error when running test through stripe dashboard. If I just load the page directly, it generates a blank page or if I echo something like echo http_response_code(200);, I get 200 back. My code is pretty straightforward.

require('/stripe/init.php');

\Stripe\Stripe::setApiKey("[intentionally deleted for post]");

$payload = file_get_contents("php://input");

$event_json = json_decode($payload);

http_response_code(200);

PHP runs fine on the site in all other contexts. There are no issues with implementing charges, both one time and subscriptions. Posts and Get work fine on all other pages. It's sharing hosting so have pretty limited access to error logs, etc...

I have already looked through the one or two stackoverflow responses to stripe webhook errors with through a 500 error but unfortunately these did not help. Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dongshimao7115 2018-11-27 13:29
    关注

    With code 500 it is Internal Server error. So looks like the issue is on the server side.

    Please see the various status codes for your reference, this will help you with debugging web requests.

    http://www.w3.org/Protocols/HTTP/HTRESP.html

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog