Skip to content

Commit

Permalink
added CardHolderName param
Browse files Browse the repository at this point in the history
  • Loading branch information
Iulian Masar committed May 22, 2024
1 parent 531af5e commit 0f2cbb5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MangoPay/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
6 changes: 6 additions & 0 deletions MangoPay/CardRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/Cases/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions tests/Cases/CardsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function test_CardsByFingerprint_Get()

foreach ($cardsByFingerprint as $cardByFingerprint) {
$this->assertSame($card->Fingerprint, $cardByFingerprint->Fingerprint);
$this->assertNotNull($card->CardHolderName);
}
}

Expand Down

0 comments on commit 0f2cbb5

Please sign in to comment.