I built a PayPal API in Netbeans with a local environment server (xampp). The API worked properly in the local environment. When I upload the files to the Cpanel environment I got the following error when i type the payment button:
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
The code is:
<?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;
You pretty much need to troubleshoot and solve that type of file path / file nonexistence error on your own; it's not an issue for the Stackoverflow community to remotely debug.
Moreover, the PayPal-PHP-SDK is deprecated and should not be used for any new integrations. You should be using the v2 Checkout-PHP-SDK.