PHPackages                             talandis/laravel-paypal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. talandis/laravel-paypal

ActiveLibrary[Payment Processing](/categories/payments)

talandis/laravel-paypal
=======================

1.0.0(7y ago)478PHPPHP &gt;=7.0

Since Jul 2Pushed 6y ago2 watchersCompare

[ Source](https://github.com/talandis/laravel-paypal)[ Packagist](https://packagist.org/packages/talandis/laravel-paypal)[ RSS](/packages/talandis-laravel-paypal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Bundle for PayPal Website Payments Standard
===================================================

[](#laravel-bundle-for-paypal-website-payments-standard)

### Installation

[](#installation)

Require this package with composer:

```
composer require talandis/laravel-paypal

```

### Configuration

[](#configuration)

After updating composer, add the ServiceProvider to the providers array in config/app.php

```
'Talandis\LaravelPaypal\LaravelPaypalServiceProvider',

```

Copy the package config to your local config with the publish command:

```
php artisan config:publish talandis/laravel-paypal

```

Don't forget to enter your certificates and other details into configuration files. Paypal public certificate is not included. You have to download it manually.

### Usage

[](#usage)

#### Payment requests

[](#payment-requests)

Below is a simple sample of payment request.

```
$paypal = new \Talandis\LaravelPaypal\WebsitePaymentsStandard();

$paypal->setOrderId( 15 );
$paypal->addItem( 'Beer', 10.99 );
$paypal->setReturnUrl(URL::to('paypal/return'));
$paypal->setCallbackUrl(URL::to('paypal/callback'));
$paypal->setCancelUrl(URL::to('paypal/cancel')));

$requestData = $paypal->getCartUploadParams();
$requestUrl = $paypal->getRequestUrl();
```

Sample form

```
