Cpanel 在 paypal api 中找不到我的 bootsrap.php 文件(内置 netbeans)

Cpanel doesn't find my bootsrap.php file in paypal api (built in netbeans)

我在带有本地环境服务器 (xampp) 的 Netbeans 中构建了一个 PayPal API。 API 在本地环境中正常工作。当我将文件上传到 Cpanel 环境时,当我键入付款按钮时出现以下错误:

A PHP Error was encountered
Severity: Warning
/////////
Message: require_once(/home/roeyfr/public_html/A.T_system/application/libraries/paypal-php-sdk/paypal/rest-api-sdk-php/sample/bootstrap.php): failed to open stream: No such file or directory

Filename: controllers/Paypal_controller.php

Line Number: 6

Backtrace:

File: /home/roeyfr/public_html/A.T_system/application/controllers/Paypal_controller.php
Line: 6
Function: _error_handler
////

Fatal error: require_once(): Failed opening required '/home/roeyfr/public_html/A.T_system/application/libraries/paypal-php-sdk/paypal/rest-api-sdk-php/sample/bootstrap.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/roeyfr/public_html/A.T_system/application/controllers/Paypal_controller.php on line 9

密码是:

<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

require_once(APPPATH . 'libraries/paypal-php-sdk/paypal/rest-api-sdk-php/sample/bootstrap.php'); // require paypal files

use PayPal\Api\ItemList;
use PayPal\Api\Payment;
use PayPal\Api\RedirectUrls;
use PayPal\Api\PaymentExecution;

您非常需要自己排查和解决此类文件路径/文件不存在错误; Whosebug 社区远程调试不是问题。

此外,PayPal-PHP-SDK is deprecated and should not be used for any new integrations。您应该使用 v2 Checkout-PHP-SDK。