diff --git a/MangoPay/CardPreAuthorization.php b/MangoPay/CardPreAuthorization.php index 4cf3c8a9..5d0af6f1 100644 --- a/MangoPay/CardPreAuthorization.php +++ b/MangoPay/CardPreAuthorization.php @@ -178,6 +178,14 @@ class CardPreAuthorization extends Libraries\EntityBase */ public $CardInfo; + /** + * Allowed values: ECommerce (default), TelephoneOrder + * + * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments. + * @var string + */ + public $PaymentCategory; + /** * Get array with mapping which property is object and what type of object * @return array diff --git a/MangoPay/CardValidation.php b/MangoPay/CardValidation.php index e005a124..4f5167ee 100644 --- a/MangoPay/CardValidation.php +++ b/MangoPay/CardValidation.php @@ -109,6 +109,15 @@ class CardValidation extends Libraries\EntityBase * Get array with mapping which property is object and what type of object * @return array */ + + /** + * Allowed values: ECommerce (default), TelephoneOrder + * + * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments. + * @var string + */ + public $PaymentCategory; + public function GetSubObjects() { $subObjects = parent::GetSubObjects(); diff --git a/MangoPay/PayIn.php b/MangoPay/PayIn.php index a484137f..448f8020 100644 --- a/MangoPay/PayIn.php +++ b/MangoPay/PayIn.php @@ -43,6 +43,14 @@ class PayIn extends Transaction */ public $RecurringPayinRegistrationId; + /** + * Allowed values: ECommerce (default), TelephoneOrder + * + * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments. + * @var string + */ + public $PaymentCategory; + /** * Get array with mapping which property depends on other property * @return array diff --git a/tests/Cases/Base.php b/tests/Cases/Base.php index ae0fea15..17e5b952 100644 --- a/tests/Cases/Base.php +++ b/tests/Cases/Base.php @@ -655,6 +655,7 @@ protected function getNewPayInCardDirect($userId = null) $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); $payIn->ExecutionDetails->SecureModeReturnURL = 'http://test.com'; $payIn->ExecutionDetails->Culture = 'FR'; + $payIn->PaymentCategory = 'TelephoneOrder'; $address = new Address(); $address->AddressLine1 = 'Main Street no 5'; diff --git a/tests/Cases/PayInsTest.php b/tests/Cases/PayInsTest.php index 2373c2d1..604a5c50 100644 --- a/tests/Cases/PayInsTest.php +++ b/tests/Cases/PayInsTest.php @@ -69,6 +69,7 @@ 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->assertEquals('TelephoneOrder', $payIn->PaymentCategory); $this->assertNotNull($payIn->PaymentDetails->CardInfo); $this->assertNotNull($payIn->PaymentDetails->CardInfo->BIN);