@spot-flow/checkout-inline-js 0.1.24 → 0.1.26

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.
@@ -14,6 +14,8 @@ type Props = {
14
14
  rdtCode?: string;
15
15
  url?: string;
16
16
  reference?: string;
17
+ callBackUrl: string;
18
+ metadata: Record<string, unknown>;
17
19
  };
18
20
  declare class Card {
19
21
  private contents;
@@ -41,7 +43,9 @@ declare class Card {
41
43
  private reference?;
42
44
  private creditCardTypes;
43
45
  private switchTab;
44
- constructor({ amount, closeModal, container, email, encryption, planId, switchTab, token, currency, rdtCode, url, reference, onSuccess, }: Props);
46
+ private callBackUrl;
47
+ private metadata;
48
+ constructor({ amount, closeModal, container, email, encryption, planId, switchTab, token, currency, rdtCode, url, reference, onSuccess, callBackUrl, metadata, }: Props);
45
49
  private displayCardTypes;
46
50
  get currentStep(): number;
47
51
  set currentStep(step: number);
@@ -12,6 +12,8 @@ type Props = {
12
12
  rdtCode?: string;
13
13
  url?: string;
14
14
  reference?: string;
15
+ callBackUrl: string;
16
+ metadata: Record<string, unknown>;
15
17
  };
16
18
  declare class Transfer {
17
19
  private container;
@@ -38,7 +40,9 @@ declare class Transfer {
38
40
  private timeLeft;
39
41
  private timerId;
40
42
  private abortController;
41
- constructor({ amount, closeModal, container, email, token, currency, rdtCode, url, reference, onSuccess, }: Props);
43
+ private callBackUrl;
44
+ private metadata;
45
+ constructor({ amount, closeModal, container, email, token, currency, rdtCode, url, reference, onSuccess, callBackUrl, metadata, }: Props);
42
46
  get currentStep(): number;
43
47
  set currentStep(step: number);
44
48
  attachInputListeners(): void;
@@ -11,6 +11,8 @@ type Props = {
11
11
  url?: string;
12
12
  closeModal: () => void;
13
13
  switchTab: (val: number) => void;
14
+ callBackUrl: string;
15
+ metadata: Record<string, unknown>;
14
16
  };
15
17
  declare class Ussd {
16
18
  private contents;
@@ -38,7 +40,9 @@ declare class Ussd {
38
40
  private intervalPayment?;
39
41
  private rdtCode?;
40
42
  private url?;
41
- constructor({ container, onSuccess, secret, amount, currency, email, fullname, reference, rdtCode, url, closeModal, switchTab, }: Props);
43
+ private callBackUrl;
44
+ private metadata;
45
+ constructor({ container, onSuccess, secret, amount, currency, email, fullname, reference, rdtCode, url, closeModal, switchTab, callBackUrl, metadata }: Props);
42
46
  get currentStep(): number;
43
47
  set currentStep(step: number);
44
48
  private onCodeSelect;
@@ -15,6 +15,7 @@ export type PaymentRequestPayload = {
15
15
  planId?: string;
16
16
  callbackUrl?: string;
17
17
  regionId?: number;
18
+ metadata?: Record<string, unknown>;
18
19
  };
19
20
  export type CardDetails = {
20
21
  pan: string;
package/dist/types.d.ts CHANGED
@@ -14,5 +14,7 @@ export type SpotflowProps = {
14
14
  firstname?: string;
15
15
  lastname?: string;
16
16
  onTransferConfirmationPending?: (_val?: any) => void;
17
+ callBackUrl?: string;
18
+ metadata?: Record<string, unknown>;
17
19
  url?: string;
18
20
  };
@@ -20,6 +20,8 @@ type Props = {
20
20
  reference?: string;
21
21
  onSuccess?: (_val?: any) => void;
22
22
  onClose?: () => void;
23
+ callBackUrl: string;
24
+ metadata: Record<string, unknown>;
23
25
  };
24
26
  export declare class MainPageScreen {
25
27
  modalContainer: HTMLDivElement;
@@ -47,7 +49,9 @@ export declare class MainPageScreen {
47
49
  url?: string;
48
50
  reference?: string;
49
51
  isMobile: boolean;
50
- constructor({ container, email, encryption, merchantKey, modalContainer, amount, onClose, onSuccess, planId, rdtCode, url, reference, }: Props);
52
+ callBackUrl: string;
53
+ metadata: Record<string, unknown>;
54
+ constructor({ container, email, encryption, merchantKey, modalContainer, amount, onClose, onSuccess, planId, rdtCode, url, reference, callBackUrl, metadata, }: Props);
51
55
  mountScreen(values: GetMerchantPlanDetail, currency: string): void;
52
56
  attachInputListeners(): void;
53
57
  closeBTN(): void;
@@ -8,6 +8,7 @@ type Props = {
8
8
  rdtCode?: string;
9
9
  url?: string;
10
10
  onSuccess: (_val: any) => void;
11
+ callBackUrl: string;
11
12
  };
12
13
  export declare class TransferConfirmationProgress {
13
14
  container: HTMLDivElement;
@@ -22,6 +23,7 @@ export declare class TransferConfirmationProgress {
22
23
  timerId: null | number;
23
24
  private rdtCode?;
24
25
  private url?;
26
+ private callBackUrl;
25
27
  constructor(props: Props);
26
28
  attachListeners(): void;
27
29
  verifyTransfer(token: string, initialInterval: number, onSuccess: (data: PaymentResponseData) => void, onError: (error: Error) => void): Promise<void>;
@@ -13,6 +13,8 @@ type Props = {
13
13
  rdtCode?: string;
14
14
  url?: string;
15
15
  onError?: (_val: string) => void;
16
+ callBackUrl: string;
17
+ metadata: Record<string, unknown>;
16
18
  };
17
19
  export declare class UssdViewCode {
18
20
  container: HTMLElement;
@@ -29,6 +31,8 @@ export declare class UssdViewCode {
29
31
  private abortController;
30
32
  private activeRef;
31
33
  private pageLoader;
34
+ private callBackUrl;
35
+ private metadata;
32
36
  onError: (_val: string) => void;
33
37
  constructor(props: Props);
34
38
  private makePayment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spot-flow/checkout-inline-js",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "",
5
5
  "main": "dist/checkout-inline.js",
6
6
  "module": "dist/checkout-inline.es.js",
@@ -57,6 +57,7 @@
57
57
  ],
58
58
  "dependencies": {
59
59
  "@types/mixpanel-browser": "^2.50.2",
60
+ "fast-luhn": "^2.0.2",
60
61
  "mixpanel-browser": "^2.55.1"
61
62
  }
62
63
  }