Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Another README update
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiodionisi committed Jul 26, 2017
1 parent a839309 commit e68b71c
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html
### Install with Composer
`composer require satispay/online-api-php-sdk`

### Check bearer
### Configuration
```php
// Set security bearer
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

// Set staging, true or false (not mandatory)
\SatispayOnline\Api::setStaging(true);

// Set client, use this format: Platform/x.x.x (not mandatory)
\SatispayOnline\Api::setClient('WordPress/4.8 WooCommerce/3.1.1');
```

### Examples

#### Check bearer

```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');
Expand All @@ -19,9 +33,9 @@ try {
}
```

### Users
#### Users

#### Create user
Create user
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

Expand All @@ -30,23 +44,23 @@ $user = \SatispayOnline\User::create([
]);
```

#### Get users
Get users
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

$users = \SatispayOnline\User::all();
```

#### Get user
Get user
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

$user = \SatispayOnline\User::get('userid');
```

### Charges
#### Charges

#### Create charge
Create charge
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

Expand All @@ -57,21 +71,21 @@ $charge = \SatispayOnline\Charge::create([
]);
```

#### Get charges
Get charges
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

$charges = \SatispayOnline\Charge::all();
```

#### Get charge
Get charge
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

$charge = \SatispayOnline\Charge::get('chargeid');
```

#### Update charge
Update charge
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

Expand All @@ -80,9 +94,9 @@ $charge = \SatispayOnline\Charge::update('chargeid', [
]);
```

### Refunds
#### Refunds

#### Create refund
Create refund
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

Expand All @@ -93,14 +107,14 @@ $refund = \SatispayOnline\Refund::create([
]);
```

#### Get refunds
Get refunds
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

$refunds = \SatispayOnline\Refund::all();
```

#### Get refund
Get refund
```php
\SatispayOnline\Api::setSecurityBearer('yoursecuritybearer');

Expand Down

0 comments on commit e68b71c

Please sign in to comment.