payum/paypal-express-checkout-nvp
Payum extension for integrating PayPal Express Checkout (NVP) payments in PHP apps. Includes gateway implementation, resources and docs via Payum, with support links and MIT license.
Pros:
Cons:
payum/payum (core) + payum/paypal-express-checkout-nvp (extension).HttpClient, OptionsResolver) may need compatibility layers for Laravel.config/app.php or a custom service provider.payum/paypal-rest-gateway).payum/payum-db-orm) may be needed for order tracking.guzzlehttp/guzzle).composer.json constraints to lock versions.payum/paypal-rest-gateway is a lower-risk alternative.Laravel Compatibility:
composer constraints).payum/payum-bridge (if available) or custom service provider.guzzlehttp/guzzle (for HTTP requests) or Laravel’s Http client.srmklive/paypal) for REST-based solutions.Database:
payum/payum-db-orm for persistence (supports Eloquent).// migrations/table_payum_gateways.php
Schema::create('payum_gateways', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->json('config'); // Stores PayPal credentials
$table->timestamps();
});
payum/paypal-express-checkout-nvp in a sandbox environment.payum/paypal-rest-gateway alongside NVP.composer.json overrides:
"config": {
"platform": {
"php": "8.1"
}
}
v1.3.9) to avoid breaking changes.// routes/web.php
Route::post('/paypal/ipn', [PayPalIpnController::class, 'handle']);
// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->bind(\Payum\Core\GatewayInterface::class, function () {
return \Payum\Core\GatewayFactory::createGateway([
'factory' => 'Payum\Core\GatewayFactory',
'class' => \Payum\Paypal\ExpressCheckout\Nvp\Gateway::class,
'config' => [
'username' => config('paypal.username'),
'password' => config('paypal.password'),
'signature' => config('paypal.signature'),
'test' => env('PAYPAL_TEST_MODE', false),
],
]);
});
}
composer require payum/payum payum/paypal-express-checkout-nvp
# .env
PAYPAL_USERNAME=sandbox_user
PAYPAL_PASSWORD=sandbox_pass
PAYPAL_SIGNATURE=sandbox_signature
PAYPAL_TEST_MODE=true
$gateway->createToken()).$gateway->execute()).Payum\Core\Exception\LogicException).PAYPAL_TEST_MODE with PayPal’s simulator.payum/payum or guzzlehttp/guzzle.payum/paypal-rest-gateway).How can I help you explore Laravel packages today?