Skip to content

Commit b61d7ff

Browse files
committed
feat: Add ReadMe and Licence
1 parent 391c52c commit b61d7ff

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

LICENCE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) Dans Ma Culotte <contact@dansmaculotte.fr>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

ReadMe.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Monetico PHP SDK
2+
3+
This library aims to facilitate the usage of Monetico Payment Service
4+
5+
## Installation
6+
7+
### Requirements
8+
9+
- PHP 7.0
10+
11+
You can install the package via composer:
12+
13+
``` bash
14+
composer require dansmaculotte/monetico-php
15+
```
16+
17+
## Usage
18+
19+
```php
20+
use DansMaCulotte\Monetico\Monetico;
21+
22+
$monetico = new Monetico(
23+
'EPT_CODE',
24+
'SECURITY_KEY',
25+
'COMPANY_CODE',
26+
'RETURN_URL',
27+
'RETURN_SUCCESS_URL',
28+
'RETURN_ERROR_URL'
29+
);
30+
```
31+
32+
```php
33+
use DansMaCulotte\Monetico\Payment\Payment;
34+
35+
$payment = new Payment(array(
36+
'reference' => 'ABCDEF123',
37+
'description' => 'Documentation',
38+
'language' => 'FR',
39+
'email' => 'john@snow.stark',
40+
'amount' => 42,
41+
'currency' => 'EUR',
42+
'datetime' => Carbon::create(2019, 1, 1),
43+
));
44+
45+
$url = $monetico->getPaymentUrl();
46+
$fields = $monetico->getPaymentFields($payment);
47+
```
48+
49+
```php
50+
Use DansMaCulotte\Monetico\Payment\Response;
51+
use DansMaCulotte\Monetico\Payment\Receipt;
52+
53+
// $data = json_decode($body, true);
54+
55+
$response = new Response($data);
56+
57+
$result = $monetico->validateSeal($response);
58+
59+
$receipt = new Receipt($result);
60+
```
61+
62+
## License
63+
64+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)