<commit_before># Get it started.

In this chapter we are going to setup payum package and do simple purchase using paypal express checkout. 
Look at sandbox to find more examples.

## Installation

```bash
php composer.phar require "payum/payum-laravel-package:*@stable" "payum/paypal-express-checkout-nvp:*@stable"
```

Now you have all codes prepared and ready to be used.

## Configuration

First publish the package configuration files:

```bash
$ php artisan config:publish payum/payum-laravel-package
```

If everything went well you have to have `config.php` in `app/config/packages/payum/payum-larvel-package` directory. 
Let's put some paypal config there:

```php
// app/config/packages/payum/payum-laravel-package/config.php

use Payum\Core\Storage\FilesystemStorage;
use Payum\Paypal\ExpressCheckout\Nvp\Api;
use Payum\Paypal\ExpressCheckout\Nvp\PaymentFactory as PaypalPaymentFactory;

$detailsClass = 'Payum\Core\Model\ArrayObject';
$tokenClass = 'Payum\Core\Model\Token';

$paypalPayment = PaypalPaymentFactory::create(new Api(array(
    'username' => $_SERVER['payum.paypal_express_checkout.username'],
    'password' => $_SERVER['payum.paypal_express_checkout.password'],
    'signature' => $_SERVER['payum.paypal_express_checkout.signature'],
    'sandbox' => true
)));<commit_msg>[doc] fix<commit_after># Get it started.

In this chapter we are going to setup payum package and do simple purchase using paypal express checkout. 
Look at sandbox to find more examples.

## Installation

```bash
php composer.phar require "payum/payum-laravel-package:*@stable" "payum/xxx:*@stable"
```

_**Note**: Where payum/xxx is a payum package, for example it could be payum/paypal-express-checkout-nvp. Look at [supported payments](supported-payments.md) to find out what you can use._

_**Note**: Use payum/payum if you want to install all payments at once._

Now you have all codes prepared and ready to be used.

## Configuration

First publish the package configuration files:

```bash
$ php artisan config:publish payum/payum-laravel-package
```

If everything went well you have to have `config.php` in `app/config/packages/payum/payum-larvel-package` directory. 
Let's put some paypal config there:

```php
// app/config/packages/payum/payum-laravel-package/config.php

use Payum\Core\Storage\FilesystemStorage;
use Payum\Paypal\ExpressCheckout\Nvp\Api;
use Payum\Paypal\ExpressCheckout\Nvp\PaymentFactory as PaypalPaymentFactory;

$detailsClass = 'Payum\Core\Model\ArrayObject';
$tokenClass = 'Payum\Core\Model\Token';

$paypalPayment = PaypalPaymentFactory::create(new Api(array(
    'username' => $_SERVER['payum.paypal_express_checkout.username'],
    'password' => $_SERVER['<PASSWORD>um.paypal_express_checkout.password'],
    'signature' => $_SERVER['payum.paypal_express_checkout.signature'],
    'sandbox' => true
)));
{'fraction_non_alphanumeric': 0.11932418162618796, 'fraction_numerical': 0.0, 'mean_word_length': 5.315555555555555, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5287351', 'n_tokens_mistral': 903, 'n_tokens_neox': 883, 'n_words': 241}