-
Notifications
You must be signed in to change notification settings - Fork 20
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 #34 from Nuvei/development
Align methods to current API + PHPUnit tests
- Loading branch information
Showing
20 changed files
with
1,953 additions
and
55 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
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,90 @@ | ||
<?php | ||
namespace Nuvei\Api\Service; | ||
|
||
use Nuvei\Api\Service\BaseService; | ||
use Nuvei\Api\RestClient; | ||
|
||
class KYC extends BaseService | ||
{ | ||
/** | ||
* Orders constructor. | ||
* | ||
* @param RestClient $client | ||
* | ||
* @throws \Nuvei\Api\Exception\ConfigurationException | ||
*/ | ||
public function __construct(RestClient $client) | ||
{ | ||
parent::__construct($client); | ||
} | ||
|
||
/** | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Nuvei\Api\Exception\ConnectionException | ||
* @throws \Nuvei\Api\Exception\ResponseException | ||
* @throws \Nuvei\Api\Exception\ValidationException | ||
* @link https://docs.nuvei.com/api/advanced/indexAdvanced.html?json#eKYC | ||
*/ | ||
public function getEKYC($params = []) | ||
{ | ||
$mandatory = [ | ||
'merchantId', | ||
'merchantSiteId', | ||
'userTokenId', | ||
'userId', | ||
'clientUniqueId', | ||
'clientRequestId', | ||
'userDetails', | ||
'ekycUserDetails', | ||
'timeStamp', | ||
'checksum' | ||
]; | ||
|
||
$checksumParametersOrder = [ | ||
'merchantId', | ||
'merchantSiteId', | ||
'clientRequestId', | ||
'timeStamp', | ||
'merchantSecretKey' | ||
]; | ||
|
||
return $this->call($params, $mandatory, 'eKYC.do', $checksumParametersOrder, true); | ||
} | ||
|
||
/** | ||
* @param array $params | ||
* | ||
* @return mixed | ||
* @throws \Nuvei\Api\Exception\ConnectionException | ||
* @throws \Nuvei\Api\Exception\ResponseException | ||
* @throws \Nuvei\Api\Exception\ValidationException | ||
* @link https://docs.nuvei.com/api/advanced/indexAdvanced.html?json#getDocumentUploadUrl | ||
*/ | ||
public function getDocumentUploadUrl($params = []) | ||
{ | ||
$mandatory = [ | ||
'merchantId', | ||
'merchantSiteId', | ||
'userTokenId', | ||
'userId', | ||
'clientUniqueId', | ||
'clientRequestId', | ||
'userDetails', | ||
'kycUserDetails', | ||
'timeStamp', | ||
'checksum' | ||
]; | ||
|
||
$checksumParametersOrder = [ | ||
'merchantId', | ||
'merchantSiteId', | ||
'clientRequestId', | ||
'timeStamp', | ||
'merchantSecretKey' | ||
]; | ||
|
||
return $this->call($params, $mandatory, 'getDocumentUploadUrl.do', $checksumParametersOrder, true); | ||
} | ||
} |
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
Oops, something went wrong.