简体   繁体   English

Paypal 支出 PHP 创建新的生产环境时发生内部服务器错误 object

[英]Paypal payout PHP internal server error when creating new ProductionEnvironment object

I'm trying to integrate PaypalPayoutSDK in my project.我正在尝试将PaypalPayoutSDK集成到我的项目中。 I've tried setting up the project like described in the instructions.我已尝试按照说明中的说明设置项目。

Here is what I have:这是我所拥有的:

use PaypalPayoutsSDK\Core\PayPalHttpClient;
use PaypalPayoutsSDK\Core\ProductionEnvironment;

// Creating an environment
$clientId = "myid";
$clientSecret = "mysecret";

$environment = new ProductionEnvironment($clientId, $clientSecret);

And the folder structure is just:文件夹结构只是:

-payment
  -myfile.php
  -PaypalPayoutsSDK

When I try to use new ProductionEnvironment() I get an 500 Internal Server Error I'm not very adept in PHP so I might not easily understand what's going on an how to fix it.当我尝试使用new ProductionEnvironment()时,我得到一个500 Internal Server Error我不太擅长 PHP 所以我可能不容易理解发生了什么以及如何修复它。 For example I'm not using composer and I probably won't be able to unless it is absolutely necessary to get this to work.例如,我没有使用作曲家,除非绝对有必要让它工作,否则我可能无法使用。 My project is purely PHP without anything added to it.我的项目纯粹是 PHP 没有添加任何东西。

Here is the error message I get:这是我收到的错误消息:

Fatal error: Uncaught Error: Class 'PaypalPayoutsSDK\Core\ProductionEnvironment' not found in /hermes/bosnaweb27a/b1507/dom.mynamestudios/myname/payment/payuser.php:14 Stack trace: #0 {main} thrown in /hermes/bosnaweb27a/b1507/dom.mynamestudios/myname/payment/payuser.php on line 14

What could be the problem here?这里可能是什么问题? And how can I fix it?我该如何解决?

If you add things like:如果您添加以下内容:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

To the top of your PHP file, you may get a more meaningful error message在 PHP 文件的顶部,您可能会收到更有意义的错误消息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM