Skip to content

Commit 649924c

Browse files
authored
Merge pull request #1 from james-ingold/allow-network-transaction-id-to-be-null
Fix for paypal#10 - Allow NetworkTransactionReference id to not be required
2 parents de24c9e + 683bacc commit 649924c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Models/NetworkTransactionReference.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class NetworkTransactionReference implements \JsonSerializable
1919
{
2020
/**
21-
* @var string
21+
* @var string|null
2222
*/
2323
private $id;
2424

@@ -38,9 +38,9 @@ class NetworkTransactionReference implements \JsonSerializable
3838
private $acquirerReferenceNumber;
3939

4040
/**
41-
* @param string $id
41+
* @param string|null $id
4242
*/
43-
public function __construct(string $id)
43+
public function __construct(?string $id = null)
4444
{
4545
$this->id = $id;
4646
}
@@ -52,7 +52,7 @@ public function __construct(string $id)
5252
* is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is
5353
* numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
5454
*/
55-
public function getId(): string
55+
public function getId(): ?string
5656
{
5757
return $this->id;
5858
}
@@ -64,10 +64,9 @@ public function getId(): string
6464
* is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is
6565
* numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -.
6666
*
67-
* @required
6867
* @maps id
6968
*/
70-
public function setId(string $id): void
69+
public function setId(?string $id): void
7170
{
7271
$this->id = $id;
7372
}

0 commit comments

Comments
 (0)