File tree Expand file tree Collapse file tree 5 files changed +27
-0
lines changed Expand file tree Collapse file tree 5 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,14 @@ class CardPreAuthorization extends Libraries\EntityBase
178
178
*/
179
179
public $ CardInfo ;
180
180
181
+ /**
182
+ * Allowed values: ECommerce (default), TelephoneOrder
183
+ *
184
+ * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments.
185
+ * @var string
186
+ */
187
+ public $ PaymentCategory ;
188
+
181
189
/**
182
190
* Get array with mapping which property is object and what type of object
183
191
* @return array
Original file line number Diff line number Diff line change @@ -109,6 +109,15 @@ class CardValidation extends Libraries\EntityBase
109
109
* Get array with mapping which property is object and what type of object
110
110
* @return array
111
111
*/
112
+
113
+ /**
114
+ * Allowed values: ECommerce (default), TelephoneOrder
115
+ *
116
+ * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments.
117
+ * @var string
118
+ */
119
+ public $ PaymentCategory ;
120
+
112
121
public function GetSubObjects ()
113
122
{
114
123
$ subObjects = parent ::GetSubObjects ();
Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ class PayIn extends Transaction
43
43
*/
44
44
public $ RecurringPayinRegistrationId ;
45
45
46
+ /**
47
+ * Allowed values: ECommerce (default), TelephoneOrder
48
+ *
49
+ * The channel through which the user provided their card details, used to indicate mail-order and telephone-order (MOTO) payments.
50
+ * @var string
51
+ */
52
+ public $ PaymentCategory ;
53
+
46
54
/**
47
55
* Get array with mapping which property depends on other property
48
56
* @return array
Original file line number Diff line number Diff line change @@ -655,6 +655,7 @@ protected function getNewPayInCardDirect($userId = null)
655
655
$ payIn ->ExecutionDetails = new \MangoPay \PayInExecutionDetailsDirect ();
656
656
$ payIn ->ExecutionDetails ->SecureModeReturnURL = 'http://test.com ' ;
657
657
$ payIn ->ExecutionDetails ->Culture = 'FR ' ;
658
+ $ payIn ->PaymentCategory = 'TelephoneOrder ' ;
658
659
659
660
$ address = new Address ();
660
661
$ address ->AddressLine1 = 'Main Street no 5 ' ;
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public function test_PayIns_Create_CardDirect()
69
69
$ this ->assertEquals ($ wallet ->Balance ->Amount , $ beforeWallet ->Balance ->Amount + $ payIn ->CreditedFunds ->Amount );
70
70
$ this ->assertEquals (PayInStatus::Succeeded, $ payIn ->Status );
71
71
$ this ->assertEquals ('PAYIN ' , $ payIn ->Type );
72
+ $ this ->assertEquals ('TelephoneOrder ' , $ payIn ->PaymentCategory );
72
73
73
74
$ this ->assertNotNull ($ payIn ->PaymentDetails ->CardInfo );
74
75
$ this ->assertNotNull ($ payIn ->PaymentDetails ->CardInfo ->BIN );
You can’t perform that action at this time.
0 commit comments