Skip to content

Commit

Permalink
Change card number for tests and fix to KycPage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-puslecki committed Nov 20, 2013
1 parent 96abee0 commit 69aed35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions MangoPaySDK/tools/apiUsers.inc
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,17 @@ class ApiUsers extends ApiBase {
$filePath = $file['tmp_name'];
}

if (empty($file))
throw new Exception('Path of file cannot be empty');
if (empty($filePath))
throw new \MangoPay\Exception('Path of file cannot be empty');

if (!file_exists($file))
throw new Exception('File not exist');
if (!file_exists($filePath))
throw new \MangoPay\Exception('File not exist');

$kycPage = new \MangoPay\KycPage();
$kycPage->File = base64_encode(file_get_contents($filePath));

if (empty($kycPage->File))
throw new Exception('Content of the file cannot be empty');
throw new \MangoPay\Exception('Content of the file cannot be empty');

$this->CreateKycPage($userId, $kycDocumentId, $kycPage);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/cases/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ protected function getPaylineCorrectRegistartionData($cardRegistration) {

$data = 'data=' . $cardRegistration->PreregistrationData .
'&accessKeyRef=' . $cardRegistration->AccessKey .
'&cardNumber=4970101122334406' .
'&cardExpirationDate=1214' .
'&cardNumber=4970100000000154' .
'&cardExpirationDate=1224' .
'&cardCvx=123';

$curlHandle = curl_init($cardRegistration->CardRegistrationURL);
Expand Down

0 comments on commit 69aed35

Please sign in to comment.