PluginProbe
MONEI Payments for WooCommerce / 4.2.0
MONEI Payments for WooCommerce v4.2.0
7.3.3 7.3.2 7.3.1 7.3.0 7.2.4 7.2.3 7.2.2 7.2.0 7.2.1 7.1.3 2.1.0 3.0.0 3.1.0 3.1.1 4.0.0 4.1.0 4.1.1 4.2.0 4.2.1 5.0 5.1.0 5.1.1 5.1.2 5.2.2 5.2.3 All 87 releases
monei / includes / README.md

README.md in MONEI Payments for WooCommerce 4.2.0, at includes/README.md

96 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # MONEI PHP SDK
2
3 The MONEI API is organized around [](https://en.wikipedia.org/wiki/Representational_State_TransferREST](https://en.wikipedia.org/wiki/Representational_State_Transfer](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
4
5 This library is intended to help you develop an integration around our API, by using the MONEI PHP Client and it's methods.
6
7 ## Docs in our portal
8
9 **You can find the complete information and details in [](https://docs.monei.net/api/our documentation portal](https://docs.monei.net/api/](https://docs.monei.net/api/).**
10
11 ## Requirements
12
13 PHP 5.5 and later
14
15 ## Installation & Usage
16
17 ### Composer
18
19 To install the bindings via [](http://getcomposer.org/Composer](http://getcomposer.org/](http://getcomposer.org/), run the following command:
20
21 ```bash
22 composer require monei/monei-php-sdk
23 ```
24
25 Or add the following to `composer.json`:
26
27 ```json
28 {
29 "require": {
30 "monei/monei-php-sdk": "^0.1.3"
31 }
32 }
33 ```
34
35 Then run `composer install`
36
37 ### Manual Installation
38
39 Download the files and include `autoload.php`:
40
41 ```php
42 require_once('/path/to/MONEI PHP SDK/vendor/autoload.php');
43 ```
44
45 ## Tests
46
47 To run the unit tests:
48
49 ```bash
50 composer install
51 ./vendor/bin/phpunit
52 ```
53
54
55 ## Authorization
56
57 The MONEI API uses API key to authenticate requests. You can view and manage your API key in the [](https://dashboard.monei.net/settings/apiMONEI Dashboard](https://dashboard.monei.net/settings/api](https://dashboard.monei.net/settings/api).
58
59 For more information about this process, please refer to [](https://docs.monei.net/api/#section/Authenticationour documentation portal](https://docs.monei.net/api/#section/Authentication](https://docs.monei.net/api/#section/Authentication).
60
61
62
63 ## Getting Started
64
65 Please follow the [](#installation--usageinstallation procedure](#installation--usage](#installation--usage) and then run the following:
66
67 ```php
68 <?php
69 require_once(__DIR__ . '/vendor/autoload.php');
70
71 // Instantiate the client using the API key
72 $monei = new Monei\MoneiClient('YOUR_API_KEY');
73
74 try {
75 $result = $monei->payments->create([
76 'amount' => 1250, // 12.50€
77 'orderId' => '100100000001',
78 'currency' => 'EUR',
79 'description' => 'Items decription',
80 'customer' => [
81 'email' => 'john.doe@monei.net',
82 'name' => 'John Doe'
83 ]
84 ]);
85 print_r($result);
86 } catch (Exception $e) {
87 echo 'Error while creating payment: ', $e->getMessage(), PHP_EOL;
88 }
89
90 ?>
91 ```
92
93 ## Documentation for API Endpoints
94
95 For more detailed information about this library and the full list of methods, please refer to [our documentation portal](https://docs.monei.net/api/).
96