https://github.com/ck-developer/payline-module
Payline module for Zend Framework 2
https://github.com/ck-developer/payline-module
Last synced: 12 months ago
JSON representation
Payline module for Zend Framework 2
- Host: GitHub
- URL: https://github.com/ck-developer/payline-module
- Owner: ck-developer
- Created: 2016-06-23T16:22:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-29T11:29:36.000Z (over 9 years ago)
- Last Synced: 2025-01-11T04:29:07.003Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PaylineModule
=============
[](https://travis-ci.org/ck-developer/payline-module) [](https://packagist.org/packages/ck-developer/payline-module) [](https://packagist.org/packages/ck-developer/payline-module) [](https://packagist.org/packages/ck-developer/payline-module) [](https://packagist.org/packages/ck-developer/payline-module)
Based on Payline SDK, PaylineModule allows you to use it in a zend Framework 2 service. Payline is a way to do credit card payments online.
## Installation
Installation of DoctrineModule uses composer. For composer documentation, please refer to
[getcomposer.org](http://getcomposer.org/).
```sh
php composer.phar require ck-developer/payline-module
```
Then add `PaylineModule` to your `config/application.config.php`
## Usage ##
#### Configuration ####
First, Copy the payline.local.php.dist in your application config and set the file with your own configuration.
Then, you can get the payline service with the following code :
#### Basic Usage ####
```php
use PaylineModule\Utils\Action;
use PaylineModule\Utils\Currency;
use PaylineModule\Utils\Payment;
$response = $this->getServiceLocator->get('payline')->doWebPayment([
'payment' => [
'amount' => 100,
'action' => Action::AUTHORIZATION_VALIDATION,
'currency' => Currency::EURO,
'mode' => Payment::CASH,
],
'order' => [
'ref' => 1,
]
]);
```