2017 © Pedro Peláez
 

library laravel-paymill

Laravel wrapper for the Paymill API

image

speakman/laravel-paymill

Laravel wrapper for the Paymill API

  • Tuesday, October 4, 2016
  • by Ben-Speakman
  • Repository
  • 3 Watchers
  • 14 Stars
  • 602 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

Laravel Paymill

Build Status Latest Stable Version Packagist Packagist, (*1)

Laravel Paymill is a Laravel 5 specific wrapper for the Paymill PHP library., (*2)

Please use the 1.0.0 release for Laravel 4, (*3)

Install

Simply add the following line to your composer.json and run install/update:, (*4)

"threesquared/laravel-paymill": "~1.3"

Configuration

Publish the package config files to configure your api keys:, (*5)

php artisan vendor:publish

You will also need to add the service provider and the facade alias to your config/app.php:, (*6)

'providers' => array(
  Threesquared\LaravelPaymill\LaravelPaymillServiceProvider::class
)

'aliases' => array(
  'Paymill'   => Threesquared\LaravelPaymill\Facades\Paymill::class
),

By default the package will use your test keys. In order to use the live Paymill keys you need to set the PAYMILL_ENV enviroment variable., (*7)

PAYMILL_ENV=live

Usage

Please see the Paymill API for full documentation on all available entities, actions and methods., (*8)

First start with instantiating the Paymill entity you want to work with., (*9)

$transaction = Paymill::Transaction();

Available entities are:, (*10)

Then add in any additional information the request requires with setter methods., (*11)

$transaction->setAmount(4200)
    ->setCurrency('EUR')
    ->setPayment('pay_2f82a672574647cd911d')
    ->setDescription('Test Transaction');

Finally chose which action you want to perform., (*12)

$transaction->create();

Available actions are:, (*13)

  • create()
  • details()
  • update()
  • all()
  • delete()

So an example to create a transaction would be:, (*14)

try {

    Paymill::Transaction()
        ->setAmount(4200)
        ->setCurrency('EUR')
        ->setPayment('pay_2f82a672574647cd911d')
        ->setDescription('Test Transaction')
        ->create();

} catch(PaymillException $e) {

    $e->getResponseCode();
    $e->getStatusCode();
    $e->getErrorMessage();

}

You can set the ID of an entity by passing it as an argument., (*15)

Paymill::Client('client_8127a65bf3c84676c918')->details();

Payment create can also take the token as an argument., (*16)

Paymill::Payment()->create('098f6bcd4621d373cade4e832627b4f6');

You can also use the $paymill_public_key variable across all blade views., (*17)

<script type="text/javascript">
  var PAYMILL_PUBLIC_KEY = '{{ $paymill_public_key }}';
</script>

The Versions

04/10 2016

dev-master

9999999-dev

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ben Speakman

laravel payments package billing paymill

30/09 2016

1.3.2

1.3.2.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ben Speakman

laravel payments package billing paymill

19/01 2016

1.3.1

1.3.1.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ben Speakman

laravel payments package billing paymill

16/01 2016

1.3.0

1.3.0.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ben Speakman

laravel payments package billing paymill

19/08 2015

1.2.0

1.2.0.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

by Ben Speakman

laravel payments package billing paymill

07/07 2015

1.1.1

1.1.1.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

by Ben Speakman

laravel payments package billing paymill

04/02 2015

1.1.0

1.1.0.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

by Ben Speakman

laravel payments package billing paymill

04/02 2015

1.0.0

1.0.0.0

Laravel wrapper for the Paymill API

  Sources   Download

MIT

The Requires

 

by Ben Speakman

laravel payments package billing paymill