paygate-checkout-sdk 1.0.8 → 1.0.9

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.
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
- declare const PaymentFailedView: ({ reason, merchantSiteUrl, handleReset, handleSelectedMethod }: {
2
+ declare const PaymentFailedView: ({ reason, merchantSiteUrl, handleReset, handleSelectedMethod, onError }: {
3
3
  reason?: string | undefined;
4
- merchantSiteUrl: string;
4
+ merchantSiteUrl?: string | undefined;
5
5
  handleReset: () => void;
6
6
  handleSelectedMethod: () => void;
7
+ onError?: (() => void) | undefined;
7
8
  }) => import("react").JSX.Element;
8
9
  export default PaymentFailedView;
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
- declare const PaymentSuccessView: ({ reason, merchantSiteUrl, }: {
2
+ declare const PaymentSuccessView: ({ reason, merchantSiteUrl, transactionRef, onSuccess }: {
3
3
  reason?: string | undefined;
4
- merchantSiteUrl: string;
4
+ merchantSiteUrl?: string | undefined;
5
+ transactionRef?: string | undefined;
6
+ onSuccess?: (() => void) | undefined;
5
7
  }) => import("react").JSX.Element;
6
8
  export default PaymentSuccessView;
@@ -78,5 +78,5 @@ export declare const LoadingText: import("styled-components/dist/types").IStyled
78
78
  export declare const spin: import("styled-components/dist/models/Keyframes").default;
79
79
  export declare const Spinner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
80
80
  export declare const Iframe: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, never>> & string;
81
- declare const PaygateCheckoutSdk: ({ userData }: PaygateCheckoutSdkProps) => JSX.Element;
81
+ declare const PaygateCheckoutSdk: ({ userData, config, onSuccess, onError, }: PaygateCheckoutSdkProps) => JSX.Element;
82
82
  export default PaygateCheckoutSdk;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ type MerchantDataProps = {
7
7
  countryCode: string;
8
8
  currencyCode: string;
9
9
  transactionCurrency?: string;
10
+ transactionRef: string;
10
11
  merchantName?: string;
11
12
  amount: number;
12
13
  merchantReference?: string;
@@ -22,9 +23,8 @@ type MerchantDataProps = {
22
23
  metadataProductInfo?: string;
23
24
  redirectUrl?: string;
24
25
  merchantPublicKey?: string;
25
- merchantSecretKey?: string;
26
26
  merchantAPIKey?: string;
27
- merchantSiteUrl: string;
27
+ mode: string;
28
28
  };
29
29
  type PaygateCheckoutSdkProps = {
30
30
  userData: MerchantDataProps;
@@ -33,8 +33,8 @@ type PaygateCheckoutSdkProps = {
33
33
  environment?: "test" | "live";
34
34
  [key: string]: any;
35
35
  };
36
- onSuccess?: (response: any) => void;
37
- onError?: (error: any) => void;
36
+ onSuccess?: () => void;
37
+ onError?: () => void;
38
38
  };
39
39
 
40
40
  declare const sdk: {