File tree 7 files changed +89
-1
lines changed
7 files changed +89
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ module.exports = {
30
30
31
31
// pay ins URLs
32
32
"payins_card-web_create" : [ "/${apiVersion}/${clientId}/payins/card/web/" , "POST" ] ,
33
+ "payins_card-web_get_details" : [ "/${apiVersion}/${clientId}/payins/card/web/${id}/extended" , "GET" ] ,
33
34
"payins_card-direct_create" : [ "/${apiVersion}/${clientId}/payins/card/direct/" , "POST" ] ,
34
35
"payins_preauthorized-direct_create" : [ "/${apiVersion}/${clientId}/payins/preauthorized/direct/" , "POST" ] ,
35
36
"payins_bankwire-direct_create" : [ "/${apiVersion}/${clientId}/payins/bankwire/direct/" , "POST" ] ,
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ var User = EntityBase.extend({
23
23
*/
24
24
TermsAndConditionsAccepted : null ,
25
25
26
+ TermsAndConditionsAcceptedDate : null ,
27
+
26
28
/**
27
29
* Category of the user. May take one of the following values:
28
30
* PAYER - Users who only use MANGOPAY to give money to other users
29
31
* OWNER - Users who use MANGOPAY to receive funds. Please note that a user needs to be KYC validated to perform payouts
30
32
*/
31
- UserCategory : null
33
+ UserCategory : null ,
34
+
35
+ UserStatus : null
32
36
} ,
33
37
34
38
/**
Original file line number Diff line number Diff line change @@ -281,6 +281,16 @@ var PayIns = Service.extend({
281
281
return this . _api . method ( 'add_tracking_info' , callback , options ) ;
282
282
} ,
283
283
284
+ getCardWebPayInExtendedDetails : function ( payInId , callback , options ) {
285
+ options = this . _api . _getOptions ( callback , options , {
286
+ path : {
287
+ id : payInId
288
+ }
289
+ } ) ;
290
+
291
+ return this . _api . method ( 'payins_card-web_get_details' , callback , options ) ;
292
+ } ,
293
+
284
294
getPaymentKey : function ( payIn ) {
285
295
if ( payIn . PaymentType ) {
286
296
return payIn . PaymentType . toLowerCase ( ) . replaceAll ( '_' , '' ) ;
Original file line number Diff line number Diff line change @@ -54,6 +54,23 @@ describe('PayIns', function () {
54
54
expect ( getPayIn . ReturnURL ) . not . to . be . undefined ;
55
55
} ) ;
56
56
} ) ;
57
+
58
+ describe . skip ( 'Get extended details' , function ( ) {
59
+ console . warn ( 'Cannot be tested because a Succeeded Card Web PayIn cannot be generated from the tests' ) ;
60
+ var extendedDetails ;
61
+ before ( function ( done ) {
62
+ api . PayIns . getCardWebPayInExtendedDetails ( payIn . Id , function ( data , response ) {
63
+ extendedDetails = data ;
64
+ done ( ) ;
65
+ } ) ;
66
+ } ) ;
67
+
68
+ it ( 'should get the PayIn' , function ( ) {
69
+ expect ( extendedDetails . Id ) . not . to . be . undefined ;
70
+ expect ( extendedDetails . PaymentType ) . to . equal ( 'CARD' ) ;
71
+ expect ( extendedDetails . ExecutionType ) . to . equal ( 'WEB' ) ;
72
+ } ) ;
73
+ } ) ;
57
74
} ) ;
58
75
59
76
describe ( 'Card Direct' , function ( ) {
Original file line number Diff line number Diff line change @@ -190,6 +190,48 @@ export namespace payIn {
190
190
BankName : string ;
191
191
}
192
192
193
+ interface CardWebExtendedPayInData {
194
+ /**
195
+ * The unique identifier of the object.
196
+ */
197
+ Id : string ;
198
+
199
+ /**
200
+ * The type of payin
201
+ */
202
+ PaymentType : PayInPaymentType ;
203
+
204
+ /**
205
+ * The type of execution for the payin
206
+ */
207
+ ExecutionType : PayInExecutionType ;
208
+
209
+ /**
210
+ * Time in millis when the page consult will expire.
211
+ */
212
+ ExpirationDate : Timestamp ;
213
+
214
+ /**
215
+ * A partially obfuscated version of the credit card number
216
+ */
217
+ Alias : string ;
218
+
219
+ /**
220
+ * The type of card
221
+ */
222
+ CardType : card . CardType ;
223
+
224
+ /**
225
+ * The Country of the Card
226
+ */
227
+ Country : CountryISO ;
228
+
229
+ /**
230
+ * A unique representation of a 16-digits card number
231
+ */
232
+ Fingerprint : string ;
233
+ }
234
+
193
235
interface CreateCardWebPayIn {
194
236
ExecutionType : "WEB" ;
195
237
Original file line number Diff line number Diff line change @@ -107,12 +107,19 @@ export namespace user {
107
107
*/
108
108
TermsAndConditionsAccepted ?: boolean ;
109
109
110
+ /**
111
+ * The date when the user has accepted the MANGOPAY Terms and Conditions.
112
+ */
113
+ TermsAndConditionsAcceptedDate ?: number ;
114
+
110
115
/**
111
116
* Category of the user. May take one of the following values:
112
117
* PAYER - Users who only use MANGOPAY to give money to other users
113
118
* OWNER - Users who use MANGOPAY to receive funds. Please note that a user needs to be KYC validated to perform payouts
114
119
*/
115
120
UserCategory ?: UserCategory ;
121
+
122
+ UserStatus ?: string ;
116
123
}
117
124
118
125
interface UserLegalData extends UserData {
Original file line number Diff line number Diff line change @@ -130,4 +130,11 @@ export class PayIns {
130
130
addPayPalTrackingInformation : TwoArgsMethodOverload < string ,
131
131
payIn . PayPalWebTrackingData ,
132
132
payIn . PayPalWebPayInData > ;
133
+
134
+ /**
135
+ * View card details for a Web Card PayIn
136
+ * @param payInId
137
+ * @param options
138
+ */
139
+ getCardWebPayInExtendedDetails : MethodOverload < string , payIn . CardWebExtendedPayInData > ;
133
140
}
You can’t perform that action at this time.
0 commit comments