From 0f2cbb5400394bee67750d83290522c9e690de88 Mon Sep 17 00:00:00 2001 From: Iulian Masar Date: Wed, 22 May 2024 17:22:51 +0300 Subject: [PATCH] added CardHolderName param --- MangoPay/Card.php | 6 ++++++ MangoPay/CardRegistration.php | 6 ++++++ tests/Cases/Base.php | 1 + tests/Cases/CardsTest.php | 1 + 4 files changed, 14 insertions(+) diff --git a/MangoPay/Card.php b/MangoPay/Card.php index a396c814..fae4a5ed 100644 --- a/MangoPay/Card.php +++ b/MangoPay/Card.php @@ -78,4 +78,10 @@ class Card extends Libraries\EntityBase * @var string */ public $Fingerprint; + + /** + * The cardholder’s name shown on the payment card. + * @var string + */ + public $CardHolderName; } diff --git a/MangoPay/CardRegistration.php b/MangoPay/CardRegistration.php index b9e10f38..16200b0d 100644 --- a/MangoPay/CardRegistration.php +++ b/MangoPay/CardRegistration.php @@ -74,6 +74,12 @@ class CardRegistration extends Libraries\EntityBase */ public $Status; + /** + * The cardholder’s name shown on the payment card. + * @var string + */ + public $CardHolderName; + /** * Get array with read-only properties * @return array diff --git a/tests/Cases/Base.php b/tests/Cases/Base.php index d9ec13bf..ae0fea15 100644 --- a/tests/Cases/Base.php +++ b/tests/Cases/Base.php @@ -631,6 +631,7 @@ protected function getNewPayInCardDirect($userId = null) $cardRegistration->Currency = 'EUR'; $cardRegistration = $this->_api->CardRegistrations->Create($cardRegistration); $cardRegistration->RegistrationData = $this->getPaylineCorrectRegistrationData($cardRegistration); + $cardRegistration->CardHolderName = "John Silver"; $cardRegistration = $this->_api->CardRegistrations->Update($cardRegistration); $card = $this->_api->Cards->Get($cardRegistration->CardId); diff --git a/tests/Cases/CardsTest.php b/tests/Cases/CardsTest.php index 890e036e..4a50c71e 100644 --- a/tests/Cases/CardsTest.php +++ b/tests/Cases/CardsTest.php @@ -25,6 +25,7 @@ public function test_CardsByFingerprint_Get() foreach ($cardsByFingerprint as $cardByFingerprint) { $this->assertSame($card->Fingerprint, $cardByFingerprint->Fingerprint); + $this->assertNotNull($card->CardHolderName); } }