-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from hyperwallet/DEV-v4
Dev v4
- Loading branch information
Showing
10 changed files
with
634 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ php: | |
- '5.6' | ||
- '7.0' | ||
- '7.3' | ||
- hhvm-3.18 | ||
- hhvm-3.24 | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ Installation | |
$ composer require hyperwallet/sdk | ||
``` | ||
|
||
|
||
Documentation | ||
------------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Hyperwallet/Model/BusinessStakeholderStatusTransition.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
|
||
namespace Hyperwallet\Model; | ||
|
||
/** | ||
* Represents a V4 Business Stakeholder Status Transition | ||
* | ||
* @package Hyperwallet\Model | ||
*/ | ||
class BusinessStakeholderStatusTransition extends StatusTransition | ||
{ | ||
const TRANSITION_ACTIVATED = 'ACTIVATED'; | ||
const TRANSITION_DE_ACTIVATED = 'DE_ACTIVATED'; | ||
|
||
/** | ||
* Creates a instance of BusinessStakeholderStatusTransition | ||
* | ||
* @param string[] $properties The default properties | ||
*/ | ||
public function __construct(array $properties = array()) | ||
{ | ||
parent::__construct($properties); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
namespace Hyperwallet\Util; | ||
use GuzzleHttp\Client; | ||
use GuzzleHttp\Exception\BadResponseException; | ||
use GuzzleHttp\Exception\ConnectException; | ||
use GuzzleHttp\UriTemplate; | ||
use Hyperwallet\Exception\HyperwalletApiException; | ||
use Hyperwallet\Exception\HyperwalletException; | ||
use Hyperwallet\Model\BaseModel; | ||
use Hyperwallet\Response\ErrorResponse; | ||
use Composer\Autoload\ClassLoader; | ||
use phpseclib\Crypt\RSA; | ||
use phpseclib\Math\BigInteger; | ||
use phpseclib\Crypt\Hash; | ||
use JOSE_URLSafeBase64; | ||
use JOSE_JWS; | ||
use JOSE_JWE; | ||
use JOSE_JWK; | ||
use JOSE_JWT; | ||
|
||
/** | ||
* The encryption service for Hyperwallet client's requests/responses | ||
* | ||
* @package Hyperwallet\Util | ||
*/ | ||
class HyperwalletUUID { | ||
|
||
/** | ||
* Generates UUID | ||
* | ||
* @return string | ||
* | ||
* @throws HyperwalletException | ||
*/ | ||
public static function v4() { | ||
return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | ||
|
||
// 32 bits for "time_low" | ||
mt_rand(0, 0xffff), mt_rand(0, 0xffff), | ||
|
||
// 16 bits for "time_mid" | ||
mt_rand(0, 0xffff), | ||
|
||
// 16 bits for "time_hi_and_version", | ||
// four most significant bits holds version number 4 | ||
mt_rand(0, 0x0fff) | 0x4000, | ||
|
||
// 16 bits, 8 bits for "clk_seq_hi_res", | ||
// 8 bits for "clk_seq_low", | ||
// two most significant bits holds zero and one for variant DCE1.1 | ||
mt_rand(0, 0x3fff) | 0x8000, | ||
|
||
// 48 bits for "node" | ||
mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) | ||
); | ||
} | ||
} |
Oops, something went wrong.