Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cannonb4ll/larapay
Laravel pay.nl wrapper to make payments even more simple through their API
https://github.com/cannonb4ll/larapay
Last synced: 29 days ago
JSON representation
Laravel pay.nl wrapper to make payments even more simple through their API
- Host: GitHub
- URL: https://github.com/cannonb4ll/larapay
- Owner: Cannonb4ll
- License: mit
- Created: 2016-03-02T20:33:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-24T07:00:50.000Z (over 7 years ago)
- Last Synced: 2024-07-11T20:20:05.000Z (6 months ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LaraPay
This class makes it more easy to integrate the payment provider *Pay.nl* into your website.
## Requirements
- Laravel 5.x
- Pay.nl account## Installation
Require this package by doing:
`composer require cannonb4ll/larapay`
After installing, register the service provider inside `config/app.php`:
`LaraPay\ServiceProvider::class,`
Now you can publish the configuration file with the following command:
`php artisan vendor:publish --provider="LaraPay\ServiceProvider"`
After this you have to setup 2 variables inside your `.env` file:
```
PAY_TOKEN=
PAY_SERVICE_ID=
```You can get these credentials fromout https://admin.pay.nl
## Available methods:
```php
$larapay = new LaraPay;$larapay->methods(); // Returns list of payment methods
$larapay->banks(); // Returns list of banks (iDEAL)
// Starts a transaction, you can apply more data here according to the pay's API documentation.
$larapay->startTransaction([
'amount' => $total,
'returnUrl' => 'http://www.example.com/thanks',
'exchangeUrl' => 'http://www.example.com/webhook',
'paymentMethod' => 138,
'description' => 'ORder',
'testmode' => 1
]);$larapay->getTransaction($id); // Returns a transaction
```