Skip to content

Commit

Permalink
Reduce minimal string length for UserId to 2 in DirectLinkPaymentRequ…
Browse files Browse the repository at this point in the history
…est (#83)

* Update mininal string length check for UserId

Reduce minimal string length for UserId to 2 in DirectLinkPaymentRequest

See: https://payment-services.ingenico.com/int/en/ogone/support/guides/integration%20guides/directlink/request-a-new%20order#requestparameters

* Update DirectLinkPaymentRequestTest.php

Set new UserId test value in DirectLinkPaymentRequestTest::provideBadParameters()
  • Loading branch information
mnokin authored and FabriZZio committed Mar 9, 2017
1 parent fdd854d commit 28ce8ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Ogone/DirectLink/DirectLinkPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getValidOgoneUris()

public function setUserId($userid)
{
if (strlen($userid) < 8) {
if (strlen($userid) < 2) {
throw new InvalidArgumentException("User ID is too short");
}
$this->parameters['userid'] = $userid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function provideBadParameters()
{
return array(
array('setPswd', '12'),
array('setUserid', '12'),
array('setUserid', '1'),
);
}

Expand Down

0 comments on commit 28ce8ab

Please sign in to comment.