@@ -6,7 +6,21 @@ https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html
6
6
### Install with Composer
7
7
` composer require satispay/online-api-php-sdk `
8
8
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
10
24
11
25
``` php
12
26
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
19
33
}
20
34
```
21
35
22
- ### Users
36
+ #### Users
23
37
24
- #### Create user
38
+ Create user
25
39
``` php
26
40
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
27
41
@@ -30,23 +44,23 @@ $user = \SatispayOnline\User::create([
30
44
]);
31
45
```
32
46
33
- #### Get users
47
+ Get users
34
48
``` php
35
49
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
36
50
37
51
$users = \SatispayOnline\User::all();
38
52
```
39
53
40
- #### Get user
54
+ Get user
41
55
``` php
42
56
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
43
57
44
58
$user = \SatispayOnline\User::get('userid');
45
59
```
46
60
47
- ### Charges
61
+ #### Charges
48
62
49
- #### Create charge
63
+ Create charge
50
64
``` php
51
65
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
52
66
@@ -57,21 +71,21 @@ $charge = \SatispayOnline\Charge::create([
57
71
]);
58
72
```
59
73
60
- #### Get charges
74
+ Get charges
61
75
``` php
62
76
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
63
77
64
78
$charges = \SatispayOnline\Charge::all();
65
79
```
66
80
67
- #### Get charge
81
+ Get charge
68
82
``` php
69
83
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
70
84
71
85
$charge = \SatispayOnline\Charge::get('chargeid');
72
86
```
73
87
74
- #### Update charge
88
+ Update charge
75
89
``` php
76
90
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
77
91
@@ -80,9 +94,9 @@ $charge = \SatispayOnline\Charge::update('chargeid', [
80
94
]);
81
95
```
82
96
83
- ### Refunds
97
+ #### Refunds
84
98
85
- #### Create refund
99
+ Create refund
86
100
``` php
87
101
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
88
102
@@ -93,14 +107,14 @@ $refund = \SatispayOnline\Refund::create([
93
107
]);
94
108
```
95
109
96
- #### Get refunds
110
+ Get refunds
97
111
``` php
98
112
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
99
113
100
114
$refunds = \SatispayOnline\Refund::all();
101
115
```
102
116
103
- #### Get refund
117
+ Get refund
104
118
``` php
105
119
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
106
120
0 commit comments