@motopays/pay-form 2.1.0 → 2.2.0-rc.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 +12 -2
- package/index.d.ts +79 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## 2.2.0
|
|
3
|
+
### Added
|
|
4
|
+
- paymentFlow field to settings model. Read more details in README.md
|
|
5
|
+
- createInvoice callback to moto-payment-form component for overriding invoice generation
|
|
6
|
+
- makePayment callback to moto-payment-form component for overriding payment flow
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
2
14
|
|
|
3
15
|
## 2.1.0
|
|
4
16
|
|
|
@@ -32,7 +44,6 @@
|
|
|
32
44
|
|
|
33
45
|
|
|
34
46
|
## 2.0.2
|
|
35
|
-
|
|
36
47
|
### Fixed
|
|
37
48
|
- Manage cards collapsed by default
|
|
38
49
|
- Empty userPreferences checkboxes array causes an error
|
|
@@ -43,7 +54,6 @@
|
|
|
43
54
|
|
|
44
55
|
|
|
45
56
|
|
|
46
|
-
|
|
47
57
|
## 2.0.1
|
|
48
58
|
- CHANGELOG.md updated
|
|
49
59
|
|
package/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type TOrderType = "regular" | "free-trial" | "gems";
|
|
|
7
7
|
export type TPaymentInitiator = "customer" | "merchant";
|
|
8
8
|
export type TButtonStateUntilFilled = "enabled" | "disabled" | "hidden-enabled";
|
|
9
9
|
export type TLanguageCode = "en-US" | "es-ES" | "fr-FR" | string;
|
|
10
|
+
export type TPaymentFlow = "default" | "invoice-overridden" | "payment-overridden";
|
|
10
11
|
export interface ITextContainer {
|
|
11
12
|
text: Partial<Record<TLanguageCode, string>>;
|
|
12
13
|
}
|
|
@@ -114,6 +115,10 @@ export interface IEvents {
|
|
|
114
115
|
};
|
|
115
116
|
error: boolean;
|
|
116
117
|
}
|
|
118
|
+
export interface IPaymentFlowSettings {
|
|
119
|
+
tokenizeCard?: boolean;
|
|
120
|
+
type?: TPaymentFlow;
|
|
121
|
+
}
|
|
117
122
|
export interface ISettings {
|
|
118
123
|
isCloseButtonVisible?: boolean;
|
|
119
124
|
isProblemTipsListVisible?: boolean;
|
|
@@ -132,6 +137,7 @@ export interface ISettings {
|
|
|
132
137
|
requiredFieldsBehavior?: IRequiredFieldsBehavior;
|
|
133
138
|
events?: IEvents;
|
|
134
139
|
apmsCollapse?: boolean;
|
|
140
|
+
paymentFlow?: IPaymentFlowSettings;
|
|
135
141
|
}
|
|
136
142
|
export interface ISimple<Value = any> {
|
|
137
143
|
[key: string]: Value;
|
|
@@ -222,6 +228,77 @@ export interface IPaymentResponse {
|
|
|
222
228
|
user: IUser;
|
|
223
229
|
signature?: string;
|
|
224
230
|
}
|
|
231
|
+
interface IBillingAddress$1 {
|
|
232
|
+
addressLine: string;
|
|
233
|
+
city: string;
|
|
234
|
+
state: string;
|
|
235
|
+
country: string;
|
|
236
|
+
zip: string;
|
|
237
|
+
}
|
|
238
|
+
declare enum ChallengeWindowSizeType {
|
|
239
|
+
SMALL = 1,
|
|
240
|
+
MEDIUM = 2,
|
|
241
|
+
LARGE = 3,
|
|
242
|
+
EXTRA_LARGE = 4,
|
|
243
|
+
FULL_SCREEN = 5
|
|
244
|
+
}
|
|
245
|
+
export interface IBrowserInfo {
|
|
246
|
+
timezoneOffsetUtcMinutes: number;
|
|
247
|
+
locale: string;
|
|
248
|
+
userAgent: string;
|
|
249
|
+
javaEnabled: boolean;
|
|
250
|
+
javaScriptEnabled: boolean;
|
|
251
|
+
colorDepth: number;
|
|
252
|
+
height: number;
|
|
253
|
+
width: number;
|
|
254
|
+
challengeWindowSize: ChallengeWindowSizeType;
|
|
255
|
+
}
|
|
256
|
+
export interface IDeviceInfo {
|
|
257
|
+
browserData: IBrowserInfo;
|
|
258
|
+
}
|
|
259
|
+
type TAmountType$1 = "GrossWithoutGst" | "Net" | "Gross";
|
|
260
|
+
type TOrderType$1 = "Regular" | "FreeTrial" | "Gems";
|
|
261
|
+
interface IOrder$1 {
|
|
262
|
+
amount?: number;
|
|
263
|
+
amountType?: TAmountType$1;
|
|
264
|
+
currency: string;
|
|
265
|
+
description?: string;
|
|
266
|
+
details?: string;
|
|
267
|
+
type?: TOrderType$1;
|
|
268
|
+
tax?: number;
|
|
269
|
+
}
|
|
270
|
+
export interface IPayer {
|
|
271
|
+
id: string;
|
|
272
|
+
email: string;
|
|
273
|
+
phoneNumber?: string;
|
|
274
|
+
ipAddress?: string;
|
|
275
|
+
deviceInfo: IDeviceInfo;
|
|
276
|
+
billingAddress?: IBillingAddress$1;
|
|
277
|
+
}
|
|
278
|
+
type TPaymentInitiator$1 = "Customer" | "Merchant";
|
|
279
|
+
export interface IRejectionPreferences {
|
|
280
|
+
showResolvingTips: boolean;
|
|
281
|
+
}
|
|
282
|
+
export interface IRequisites {
|
|
283
|
+
anchor: string;
|
|
284
|
+
cardHolder: string;
|
|
285
|
+
cardNumber: string;
|
|
286
|
+
cvv: string;
|
|
287
|
+
expiration: string;
|
|
288
|
+
paymentToken: string;
|
|
289
|
+
type: string;
|
|
290
|
+
}
|
|
291
|
+
export interface IPaymentRequest {
|
|
292
|
+
id: string;
|
|
293
|
+
initiator?: TPaymentInitiator$1;
|
|
294
|
+
returnUrl?: string;
|
|
295
|
+
webhookUrl?: string;
|
|
296
|
+
order: IOrder$1;
|
|
297
|
+
payer: IPayer;
|
|
298
|
+
requisites: IRequisites;
|
|
299
|
+
signature?: string;
|
|
300
|
+
rejectionPreferences: IRejectionPreferences;
|
|
301
|
+
}
|
|
225
302
|
declare class ServiceAction<Type extends string, Payload = unknown | undefined> {
|
|
226
303
|
type: Type;
|
|
227
304
|
payload?: Payload | undefined;
|
|
@@ -247,6 +324,8 @@ export interface IApmsShowAnalytics {
|
|
|
247
324
|
|
|
248
325
|
export {
|
|
249
326
|
CreditCardTypeCardBrandId,
|
|
327
|
+
IBillingAddress$1 as IBillingAddressRequest,
|
|
328
|
+
IOrder$1 as IOrderRequest,
|
|
250
329
|
};
|
|
251
330
|
|
|
252
331
|
export {};
|