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

Commit

Permalink
getClient
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiodionisi committed Aug 21, 2017
1 parent 685d047 commit 3cb4fcf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ https://s3-eu-west-1.amazonaws.com/docs.online.satispay.com/index.html

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

// Get client
\SatispayOnline\Api::getClient();
```

### Examples
Expand Down
9 changes: 8 additions & 1 deletion lib/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace SatispayOnline;

define('SDKVERSION', '1.3.0');
define('SDKVERSION', '1.3.1');

class Api {
public static $securityBearer;
Expand All @@ -44,6 +44,13 @@ public static function setClient($client) {
self::$client = $client;
}

public static function getClient() {
return join(' ', array(
self::$client,
'PHP/'.phpversion()
))
}

public static function request($url, $method = null, $params = null) {
$opts = [];
$curl = curl_init();
Expand Down

0 comments on commit 3cb4fcf

Please sign in to comment.