Skip to content

Commit

Permalink
SkipPay vatin length changed from 10 to 12
Browse files Browse the repository at this point in the history
  • Loading branch information
Daaarkling authored and janlanger committed Nov 7, 2022
1 parent 7b8b281 commit 0378b04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/MallPay/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Customer implements Encodable
public const TITLE_LENGTH_MAX = 20;
public const EMAIL_LENGTH_MAX = 50;
public const PHONE_LENGTH_MAX = 16;
public const TIN_VATIN_LENGTH_MAX = 10;
public const TIN_LENGTH_MAX = 10;
public const VATIN_LENGTH_MAX = 12;

public function __construct(
private ?string $firstName,
Expand Down Expand Up @@ -52,10 +53,10 @@ public function __construct(
Validator::checkWhitespacesAndLength($titleAfter, self::TITLE_LENGTH_MAX);
}
if ($tin !== null) {
Validator::checkWhitespacesAndLength($tin, self::TIN_VATIN_LENGTH_MAX);
Validator::checkWhitespacesAndLength($tin, self::TIN_LENGTH_MAX);
}
if ($vatin !== null) {
Validator::checkWhitespacesAndLength($vatin, self::TIN_VATIN_LENGTH_MAX);
Validator::checkWhitespacesAndLength($vatin, self::VATIN_LENGTH_MAX);
}
}

Expand Down

0 comments on commit 0378b04

Please sign in to comment.