@motopays/pay-form 2.0.3 → 2.1.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.4
4
+ ### Added
5
+ - paymentFlow field to settings model. Read more details in README.md
6
+ - createInvoice callback to moto-payment-form component for overriding invoice generation
7
+ - makePayment callback to moto-payment-form component for overriding payment flow
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
3
16
  ## 2.0.3
4
17
 
5
18
  ### Changed
@@ -17,7 +30,6 @@
17
30
 
18
31
 
19
32
  ## 2.0.2
20
-
21
33
  ### Fixed
22
34
  - Manage cards collapsed by default
23
35
  - Empty userPreferences checkboxes array causes an error
@@ -28,7 +40,6 @@
28
40
 
29
41
 
30
42
 
31
-
32
43
  ## 2.0.1
33
44
  - CHANGELOG.md updated
34
45
 
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
  }
@@ -113,6 +114,10 @@ export interface IEvents {
113
114
  };
114
115
  error: boolean;
115
116
  }
117
+ export interface IPaymentFlowSettings {
118
+ tokenizeCard?: boolean;
119
+ type?: TPaymentFlow;
120
+ }
116
121
  export interface ISettings {
117
122
  isCloseButtonVisible?: boolean;
118
123
  isProblemTipsListVisible?: boolean;
@@ -130,6 +135,7 @@ export interface ISettings {
130
135
  requiredFieldsBehavior?: IRequiredFieldsBehavior;
131
136
  events?: IEvents;
132
137
  apmsCollapse?: boolean;
138
+ paymentFlow?: IPaymentFlowSettings;
133
139
  }
134
140
  export interface ISimple<Value = any> {
135
141
  [key: string]: Value;
@@ -220,6 +226,77 @@ export interface IPaymentResponse {
220
226
  user: IUser;
221
227
  signature?: string;
222
228
  }
229
+ interface IBillingAddress$1 {
230
+ addressLine: string;
231
+ city: string;
232
+ state: string;
233
+ country: string;
234
+ zip: string;
235
+ }
236
+ declare enum ChallengeWindowSizeType {
237
+ SMALL = 1,
238
+ MEDIUM = 2,
239
+ LARGE = 3,
240
+ EXTRA_LARGE = 4,
241
+ FULL_SCREEN = 5
242
+ }
243
+ export interface IBrowserInfo {
244
+ timezoneOffsetUtcMinutes: number;
245
+ locale: string;
246
+ userAgent: string;
247
+ javaEnabled: boolean;
248
+ javaScriptEnabled: boolean;
249
+ colorDepth: number;
250
+ height: number;
251
+ width: number;
252
+ challengeWindowSize: ChallengeWindowSizeType;
253
+ }
254
+ export interface IDeviceInfo {
255
+ browserData: IBrowserInfo;
256
+ }
257
+ type TAmountType$1 = "GrossWithoutGst" | "Net" | "Gross";
258
+ type TOrderType$1 = "Regular" | "FreeTrial" | "Gems";
259
+ interface IOrder$1 {
260
+ amount?: number;
261
+ amountType?: TAmountType$1;
262
+ currency: string;
263
+ description?: string;
264
+ details?: string;
265
+ type?: TOrderType$1;
266
+ tax?: number;
267
+ }
268
+ export interface IPayer {
269
+ id: string;
270
+ email: string;
271
+ phoneNumber?: string;
272
+ ipAddress?: string;
273
+ deviceInfo: IDeviceInfo;
274
+ billingAddress?: IBillingAddress$1;
275
+ }
276
+ type TPaymentInitiator$1 = "Customer" | "Merchant";
277
+ export interface IRejectionPreferences {
278
+ showResolvingTips: boolean;
279
+ }
280
+ export interface IRequisites {
281
+ anchor: string;
282
+ cardHolder: string;
283
+ cardNumber: string;
284
+ cvv: string;
285
+ expiration: string;
286
+ paymentToken: string;
287
+ type: string;
288
+ }
289
+ export interface IPaymentRequest {
290
+ id: string;
291
+ initiator?: TPaymentInitiator$1;
292
+ returnUrl?: string;
293
+ webhookUrl?: string;
294
+ order: IOrder$1;
295
+ payer: IPayer;
296
+ requisites: IRequisites;
297
+ signature?: string;
298
+ rejectionPreferences: IRejectionPreferences;
299
+ }
223
300
  declare class ServiceAction<Type extends string, Payload = unknown | undefined> {
224
301
  type: Type;
225
302
  payload?: Payload | undefined;
@@ -245,6 +322,8 @@ export interface IApmsShowAnalytics {
245
322
 
246
323
  export {
247
324
  CreditCardTypeCardBrandId,
325
+ IBillingAddress$1 as IBillingAddressRequest,
326
+ IOrder$1 as IOrderRequest,
248
327
  };
249
328
 
250
329
  export {};