Skip to content

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Silviana Ghita committed Dec 21, 2023
1 parent 0c1ec2f commit 23f1bee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 0 additions & 6 deletions MangoPay/PayIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ class PayIn extends Transaction
*/
public $RecurringPayinRegistrationId;

/**
* Information of the card
* @var object
*/
public $CardInfo;

/**
* Get array with mapping which property depends on other property
* @return array
Expand Down
6 changes: 6 additions & 0 deletions MangoPay/PayInPaymentDetailsCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ class PayInPaymentDetailsCard extends Libraries\Dto implements PayInPaymentDetai
* @var string
*/
public $BankName;

/**
* Information of the card
* @var object
*/
public $CardInfo;
}
6 changes: 5 additions & 1 deletion tests/Cases/PayInsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public function test_PayIns_Create_CardDirect()
$this->assertEquals($wallet->Balance->Amount, $beforeWallet->Balance->Amount + $payIn->CreditedFunds->Amount);
$this->assertEquals(PayInStatus::Succeeded, $payIn->Status);
$this->assertEquals('PAYIN', $payIn->Type);

$this->assertNotNull($payIn->PaymentDetails->CardInfo);
$this->assertNotNull($payIn->PaymentDetails->CardInfo->BIN);
$this->assertNotNull($payIn->PaymentDetails->CardInfo->Type);
}

public function test_PayIns_Get_CardDirect()
Expand Down Expand Up @@ -605,7 +609,7 @@ public function test_Create_Recurring_PayIn_CIT_Check_CardInfo()
$result = $this->_api->PayIns->CreateRecurringPayInRegistrationCIT($cit);

$this->assertNotNull($result);
$card_info = $result->CardInfo;
$card_info = $result->PaymentDetails->CardInfo;
$this->assertNotEmpty($card_info);
$this->assertNotEmpty($card_info->Brand);
$this->assertNotEmpty($card_info->Type);
Expand Down

0 comments on commit 23f1bee

Please sign in to comment.