Skip to content

Commit

Permalink
Merge pull request #22 from dokobit/DEV-1729
Browse files Browse the repository at this point in the history
DEV-1729 GitHub: minor gateway-sdk-php updates
  • Loading branch information
koliaq authored Oct 14, 2021
2 parents ab34db2 + de7bd9c commit cbb02ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Query/File/FileFieldsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getFileFields($path)

return [
'name' => basename($path),
'digest' => sha1($content),
'digest' => hash('sha256', $content),
'content' => base64_encode($content)
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Query/File/UploadFromUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class UploadFromUrl implements QueryInterface
/** @var string url of the file to be uploded */
private $url;

/** @var string SHA1 digest of the file to be uploded */
/** @var string SHA256 digest of the file to be uploded */
private $digest;

/** @var string|null file name which will be sent to Gateway */
private $filename;

/**
* @param string $url url of the file to be uploded
* @param string $digest SHA1 digest of the file to be uploded
* @param string $digest SHA256 digest of the file to be uploded
* @param string|null $filename file name which will be sent to Gateway.
* If null or not set, original file name will be sent.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/Query/Signing/AddSignerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class AddSignerTest extends TestCase
const SIGNER_ID = 'RandomNotReally';
const SIGNER_NAME = 'Kraft';
const SIGNER_SURNAME = 'Lawrence';
const SIGNER_CODE = '51001091072';
const SIGNER_PHONE = '+37060000007';
const SIGNER_CODE = '50001018865';
const SIGNER_PHONE = '+37060000666';

/** @var Archive */
private $query;
Expand Down
4 changes: 2 additions & 2 deletions tests/Query/Signing/CreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class CreateTest extends TestCase
const SIGNER_ID = 'FirstSignerId';
const SIGNER_NAME = 'Kraft';
const SIGNER_SURNAME = 'Lawrence';
const SIGNER_CODE = '51001091072';
const SIGNER_PHONE = '+37060000007';
const SIGNER_CODE = '50001018865';
const SIGNER_PHONE = '+37060000666';
const FILE_TOKEN = 'UploadedFileToken';
const POSTBACK_URL = 'https://www.example.org/postback.php';
const LANGUAGE = 'lt';
Expand Down

0 comments on commit cbb02ea

Please sign in to comment.