pkg6 / paypal
php client for PayPal SDK
dev-main
2024-09-23 07:16 UTC
Requires
- php: >=7.2
- ext-bcmath: *
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^6|^7
- nesbot/carbon: ^1.0|^2.0|^3.0
- psr/simple-cache: ^1.0|^2.0|^3.0
- symfony/http-foundation: ^5.0|^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.9
- jaeger/querylist: ^4.2
- mockery/mockery: >=0.9.9
- phpunit/phpunit: ^8.0|^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2024-12-23 07:54:54 UTC
README
composer require pkg6/paypal
Using the Documentation
$config = [
// Can only be 'sandbox' Or 'live'. If empty or invalid, 'live' will be used.
'mode' => 'live',
'client_id' => 'some-client-id',
'client_secret' => 'some-client-secret',
'app_id' => 'APP-80W284485P519543T',
// Can only be 'Sale', 'Authorization' or 'Order'
'payment_action' => 'Sale',
'currency' => 'USD',
// Change this accordingly for your application.
'notify_url' => 'https://your-app.com/paypal/notify',
// force gateway language i.e. it_IT, es_ES, en_US ... (for express checkout only)
'locale' => 'en_US',
// Validate SSL when creating api client.
'validate_ssl' => true,
];
$rest = new \pkg6\paypal\RestClient($config);
//Get Access Token
$rest->getAccessToken();
For more instructions, see the documentation: