mangopay4-nodejs-sdk 1.67.0 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/lib/apiMethods.js +10 -3
- package/lib/models/PayInPaymentType.js +0 -1
- package/lib/models/ReportFilterV2.js +2 -1
- package/lib/services/Acquiring.js +152 -0
- package/lib/services/PayIns.js +0 -18
- package/lib/services/index.js +2 -1
- package/package.json +1 -1
- package/test/helpers.js +3 -2
- package/test/services/Acquiring.js +338 -0
- package/test/services/Conversions.js +1 -1
- package/test/services/PayIns.js +1 -117
- package/typings/enums.d.ts +0 -1
- package/typings/index.d.ts +5 -5
- package/typings/index.test-d.ts +0 -15
- package/typings/models/acquiring.d.ts +763 -0
- package/typings/models/payIn.d.ts +20 -80
- package/typings/models/refund.d.ts +1 -0
- package/typings/models/reportV2.d.ts +2 -0
- package/typings/services/Acquiring.d.ts +44 -0
- package/typings/services/PayIns.d.ts +0 -8
- package/typings/types.d.ts +0 -2
- package/lib/models/PayInPaymentDetailsPayconiq.js +0 -23
|
@@ -29,7 +29,6 @@ export namespace payIn {
|
|
|
29
29
|
| CardWebPayInData
|
|
30
30
|
| BankWireDirectPayInData
|
|
31
31
|
| BankWireExternalInstructionPayInData
|
|
32
|
-
| PayconiqWebPayInData
|
|
33
32
|
| DirectDebitDirectPayInData
|
|
34
33
|
| MbwayWebPayInData
|
|
35
34
|
| BancontactWebPayInData
|
|
@@ -398,6 +397,11 @@ export namespace payIn {
|
|
|
398
397
|
* Authentication result
|
|
399
398
|
*/
|
|
400
399
|
AuthenticationResult?: AuthenticationResult;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Preferred Card Network
|
|
403
|
+
*/
|
|
404
|
+
PreferredCardNetwork?: string;
|
|
401
405
|
}
|
|
402
406
|
|
|
403
407
|
interface MbwayWebPayInData extends BasePayInData {
|
|
@@ -726,6 +730,11 @@ export namespace payIn {
|
|
|
726
730
|
* used by the fraud prevention solution to produce recommendations for the transaction using the profiling data.
|
|
727
731
|
*/
|
|
728
732
|
ProfilingAttemptReference?: string;
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Preferred Card Network
|
|
736
|
+
*/
|
|
737
|
+
PreferredCardNetwork?: string;
|
|
729
738
|
}
|
|
730
739
|
|
|
731
740
|
interface CreateMbwayWebPayIn {
|
|
@@ -1158,6 +1167,11 @@ export namespace payIn {
|
|
|
1158
1167
|
* The unique identifier of the line item.
|
|
1159
1168
|
*/
|
|
1160
1169
|
Sku: string;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* The discount applied to the item.
|
|
1173
|
+
*/
|
|
1174
|
+
Discount?: number;
|
|
1161
1175
|
}
|
|
1162
1176
|
|
|
1163
1177
|
interface CreateLineItem {
|
|
@@ -1197,6 +1211,11 @@ export namespace payIn {
|
|
|
1197
1211
|
* The unique identifier of the line item.
|
|
1198
1212
|
*/
|
|
1199
1213
|
Sku?: string;
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* The discount applied to the item.
|
|
1217
|
+
*/
|
|
1218
|
+
Discount?: number;
|
|
1200
1219
|
}
|
|
1201
1220
|
|
|
1202
1221
|
interface DirectDebitDirectPayInData extends BasePayInData {
|
|
@@ -1967,85 +1986,6 @@ export namespace payIn {
|
|
|
1967
1986
|
DataCollectionId?: string;
|
|
1968
1987
|
}
|
|
1969
1988
|
|
|
1970
|
-
interface PayconiqWebPayInData extends BasePayInData {
|
|
1971
|
-
ExecutionType: "WEB";
|
|
1972
|
-
PaymentType: "PAYCONIQ";
|
|
1973
|
-
|
|
1974
|
-
/**
|
|
1975
|
-
* Time in millis when the page consult will expire.
|
|
1976
|
-
*/
|
|
1977
|
-
ExpirationDate: Timestamp;
|
|
1978
|
-
|
|
1979
|
-
/**
|
|
1980
|
-
* The URL to redirect to after payment (whether successful or not)
|
|
1981
|
-
*/
|
|
1982
|
-
ReturnURL: string;
|
|
1983
|
-
|
|
1984
|
-
/**
|
|
1985
|
-
* The URL to redirect to user to for them to proceed with the payment
|
|
1986
|
-
*/
|
|
1987
|
-
RedirectURL: string;
|
|
1988
|
-
|
|
1989
|
-
/**
|
|
1990
|
-
* The URL to be used in App2App workflow
|
|
1991
|
-
*/
|
|
1992
|
-
DeepLinkURL: string;
|
|
1993
|
-
|
|
1994
|
-
Country: CountryISO;
|
|
1995
|
-
|
|
1996
|
-
QRCodeURL: string;
|
|
1997
|
-
|
|
1998
|
-
StatementDescriptor: string;
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
interface CreatePayconiqWebPayInData {
|
|
2002
|
-
ExecutionType: "WEB";
|
|
2003
|
-
PaymentType: "PAYCONIQ";
|
|
2004
|
-
|
|
2005
|
-
/**
|
|
2006
|
-
* Custom data that you can add to this item
|
|
2007
|
-
*/
|
|
2008
|
-
Tag?: string;
|
|
2009
|
-
|
|
2010
|
-
/**
|
|
2011
|
-
* A user's ID
|
|
2012
|
-
*/
|
|
2013
|
-
AuthorId: string;
|
|
2014
|
-
|
|
2015
|
-
/**
|
|
2016
|
-
* The ID of the wallet where money will be credited
|
|
2017
|
-
*/
|
|
2018
|
-
CreditedWalletId: string;
|
|
2019
|
-
|
|
2020
|
-
/**
|
|
2021
|
-
* Information about the funds that are being debited
|
|
2022
|
-
*/
|
|
2023
|
-
DebitedFunds: MoneyData;
|
|
2024
|
-
|
|
2025
|
-
/**
|
|
2026
|
-
* Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet)
|
|
2027
|
-
*/
|
|
2028
|
-
Fees: MoneyData;
|
|
2029
|
-
|
|
2030
|
-
/**
|
|
2031
|
-
* The URL to redirect to after payment (whether successful or not)
|
|
2032
|
-
*/
|
|
2033
|
-
ReturnURL: string;
|
|
2034
|
-
|
|
2035
|
-
/**
|
|
2036
|
-
* The Country of the Address
|
|
2037
|
-
*/
|
|
2038
|
-
Country: CountryISO;
|
|
2039
|
-
|
|
2040
|
-
StatementDescriptor?: string;
|
|
2041
|
-
|
|
2042
|
-
/**
|
|
2043
|
-
* The unique reference generated for the profiling session,
|
|
2044
|
-
* used by the fraud prevention solution to produce recommendations for the transaction using the profiling data.
|
|
2045
|
-
*/
|
|
2046
|
-
ProfilingAttemptReference?: string;
|
|
2047
|
-
}
|
|
2048
|
-
|
|
2049
1989
|
interface CreateCardPreAuthorizedDepositPayIn {
|
|
2050
1990
|
AuthorId?: string;
|
|
2051
1991
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {acquiring} from "../models/acquiring";
|
|
2
|
+
import {base} from "../base";
|
|
3
|
+
import MethodOverload = base.MethodOverload;
|
|
4
|
+
import TwoArgsMethodOverload = base.TwoArgsMethodOverload;
|
|
5
|
+
|
|
6
|
+
export class Acquiring {
|
|
7
|
+
createPayIn:
|
|
8
|
+
MethodOverload<acquiring.CreateCardDirectPayIn, acquiring.CardDirectPayInData> &
|
|
9
|
+
MethodOverload<acquiring.CreateIdealWebPayIn, acquiring.IdealWebPayInData> &
|
|
10
|
+
MethodOverload<acquiring.CreateApplePayPayIn, acquiring.ApplePayPayInData> &
|
|
11
|
+
MethodOverload<acquiring.CreateGooglePayDirectPayIn, acquiring.GooglePayDirectPayInData> &
|
|
12
|
+
MethodOverload<acquiring.CreatePayPalWebPayIn, acquiring.PayPalWebPayInData>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Send key pre-transaction data such as order details, buyer information,
|
|
16
|
+
* and merchant context before initiating a PayPal payment.
|
|
17
|
+
*
|
|
18
|
+
* Given that the payload can be anything, depending on what PayPal needs, there is no defined interface for it.
|
|
19
|
+
*
|
|
20
|
+
* @param dataCollection The data collection to be created
|
|
21
|
+
* @param callback Callback function
|
|
22
|
+
* @param options Request options
|
|
23
|
+
* @returns {Object} Request promise
|
|
24
|
+
*/
|
|
25
|
+
createPayPalDataCollection: MethodOverload<any, any>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Create refund for pay-in object
|
|
29
|
+
* @param payInId
|
|
30
|
+
* @param refundData
|
|
31
|
+
* @param options
|
|
32
|
+
*/
|
|
33
|
+
createPayInRefund: TwoArgsMethodOverload<string, acquiring.CreatePayInRefund, acquiring.RefundData>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Create a card validation
|
|
37
|
+
* @param cardId
|
|
38
|
+
* @param cardValidation
|
|
39
|
+
* @param callback
|
|
40
|
+
* @param options
|
|
41
|
+
* @returns {*|Promise}
|
|
42
|
+
*/
|
|
43
|
+
createCardValidation: TwoArgsMethodOverload<string, acquiring.CreateCardValidation, acquiring.CardValidationData>;
|
|
44
|
+
}
|
|
@@ -18,7 +18,6 @@ export class PayIns {
|
|
|
18
18
|
MethodOverload<payIn.CreateCardPreAuthorizedPayIn, payIn.CardPreAuthorizedPayInData> &
|
|
19
19
|
MethodOverload<payIn.CreateCardWebPayIn, payIn.CardWebPayInData> &
|
|
20
20
|
MethodOverload<payIn.CreateBankWireDirectPayIn, payIn.BankWireDirectPayInData> &
|
|
21
|
-
MethodOverload<payIn.CreatePayconiqWebPayInData, payIn.PayconiqWebPayInData> &
|
|
22
21
|
MethodOverload<payIn.CreateDirectDebitDirectPayIn, payIn.DirectDebitDirectPayInData> &
|
|
23
22
|
MethodOverload<payIn.CreateDirectDebitWebPayIn, payIn.DirectDebitWebPayInData> &
|
|
24
23
|
MethodOverload<payIn.CreateMbwayWebPayIn, payIn.MbwayWebPayInData> &
|
|
@@ -170,13 +169,6 @@ export class PayIns {
|
|
|
170
169
|
*/
|
|
171
170
|
getCardWebPayInExtendedDetails: MethodOverload<string, payIn.CardWebExtendedPayInData>;
|
|
172
171
|
|
|
173
|
-
/**
|
|
174
|
-
* Create new pay-in Payconiq Web, using the latest API url (/payment-methods/payconiq)
|
|
175
|
-
* @param payIn
|
|
176
|
-
* @param options
|
|
177
|
-
*/
|
|
178
|
-
createPayconiq: MethodOverload<payIn.CreatePayconiqWebPayInData, payIn.PayconiqWebPayInData>
|
|
179
|
-
|
|
180
172
|
/**
|
|
181
173
|
* Create a pay in intent authorization
|
|
182
174
|
* @param {payIn.CreatePayInIntentAuthorization} payInIntentAuthorization PayInIntentAuthorization object
|
package/typings/types.d.ts
CHANGED
|
@@ -65,8 +65,6 @@ export type ApiMethod =
|
|
|
65
65
|
| "payins_recurring_registration_put"
|
|
66
66
|
| "payins_create_recurring_card_direct"
|
|
67
67
|
| "payins_create_recurring_paypal"
|
|
68
|
-
| "payins_payconiq-web_create"
|
|
69
|
-
| "payins_payconiqv2-web_create"
|
|
70
68
|
| "payouts_bankwire_create"
|
|
71
69
|
| "payouts_bankwire_get"
|
|
72
70
|
| "payouts_get"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var PayInPaymentDetails = require('./PayInPaymentDetails');
|
|
2
|
-
var Money = require('./Money');
|
|
3
|
-
|
|
4
|
-
var PayInPaymentDetailsPayconiq = PayInPaymentDetails.extend({
|
|
5
|
-
defaults: {
|
|
6
|
-
Country: null,
|
|
7
|
-
AuthorId: null,
|
|
8
|
-
DebitedFunds: null,
|
|
9
|
-
Fees: null,
|
|
10
|
-
DeepLinkURL: null,
|
|
11
|
-
StatementDescriptor: null,
|
|
12
|
-
QRCodeURL: null
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
getSubObjects: function() {
|
|
16
|
-
return {
|
|
17
|
-
'DebitedFunds': Money,
|
|
18
|
-
'Fees': Money
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
module.exports = PayInPaymentDetailsPayconiq;
|