@@ -6,7 +6,21 @@ https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html
66### Install with Composer
77` composer require satispay/online-api-php-sdk `
88
9- ### Check bearer
9+ ### Configuration
10+ ``` php
11+ // Set security bearer
12+ \SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
13+
14+ // Set staging, true or false (not mandatory)
15+ \SatispayOnline\Api::setStaging(true);
16+
17+ // Set client, use this format: Platform/x.x.x (not mandatory)
18+ \SatispayOnline\Api::setClient('WordPress/4.8 WooCommerce/3.1.1');
19+ ```
20+
21+ ### Examples
22+
23+ #### Check bearer
1024
1125``` php
1226\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
1933}
2034```
2135
22- ### Users
36+ #### Users
2337
24- #### Create user
38+ Create user
2539``` php
2640\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
2741
@@ -30,23 +44,23 @@ $user = \SatispayOnline\User::create([
3044]);
3145```
3246
33- #### Get users
47+ Get users
3448``` php
3549\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
3650
3751$users = \SatispayOnline\User::all();
3852```
3953
40- #### Get user
54+ Get user
4155``` php
4256\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
4357
4458$user = \SatispayOnline\User::get('userid');
4559```
4660
47- ### Charges
61+ #### Charges
4862
49- #### Create charge
63+ Create charge
5064``` php
5165\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
5266
@@ -57,21 +71,21 @@ $charge = \SatispayOnline\Charge::create([
5771]);
5872```
5973
60- #### Get charges
74+ Get charges
6175``` php
6276\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
6377
6478$charges = \SatispayOnline\Charge::all();
6579```
6680
67- #### Get charge
81+ Get charge
6882``` php
6983\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
7084
7185$charge = \SatispayOnline\Charge::get('chargeid');
7286```
7387
74- #### Update charge
88+ Update charge
7589``` php
7690\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
7791
@@ -80,9 +94,9 @@ $charge = \SatispayOnline\Charge::update('chargeid', [
8094]);
8195```
8296
83- ### Refunds
97+ #### Refunds
8498
85- #### Create refund
99+ Create refund
86100``` php
87101\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
88102
@@ -93,14 +107,14 @@ $refund = \SatispayOnline\Refund::create([
93107]);
94108```
95109
96- #### Get refunds
110+ Get refunds
97111``` php
98112\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
99113
100114$refunds = \SatispayOnline\Refund::all();
101115```
102116
103- #### Get refund
117+ Get refund
104118``` php
105119\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
106120
0 commit comments