paygate-checkout-sdk 0.0.6 → 0.0.8

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,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { ButtonProps, TextProps } from './index';
3
- export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, ButtonProps>> & string;
3
+ export declare const StyledButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
5
+ }>, never>, ButtonProps>> & string;
4
6
  export declare const secondary: import("styled-components").RuleSet<ButtonProps>;
5
- export declare const Text: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>, never>, TextProps>> & string;
7
+ export declare const Text: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
8
+ ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
9
+ }>, never>, TextProps>> & string;
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { TextProps } from './index';
3
- export declare const StyledText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>, never>, TextProps>> & string;
3
+ export declare const StyledText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
5
+ }>, never>, TextProps>> & string;
@@ -1,7 +1,8 @@
1
- declare const PaymentFailedView: ({ reason, merchantSiteUrl, handleReset, handleSelectedMethod }: {
1
+ declare const PaymentFailedView: ({ reason, merchantSiteUrl, handleReset, handleSelectedMethod, onError }: {
2
2
  reason?: string | undefined;
3
- merchantSiteUrl: string;
3
+ merchantSiteUrl?: string | undefined;
4
4
  handleReset: () => void;
5
5
  handleSelectedMethod: () => void;
6
+ onError?: (() => void) | undefined;
6
7
  }) => import("react/jsx-runtime").JSX.Element;
7
8
  export default PaymentFailedView;
@@ -1,5 +1,7 @@
1
- declare const PaymentSuccessView: ({ reason, merchantSiteUrl, }: {
1
+ declare const PaymentSuccessView: ({ reason, merchantSiteUrl, transactionRef, onSuccess }: {
2
2
  reason?: string | undefined;
3
- merchantSiteUrl: string;
3
+ merchantSiteUrl?: string | undefined;
4
+ transactionRef?: string | undefined;
5
+ onSuccess?: (() => void) | undefined;
4
6
  }) => import("react/jsx-runtime").JSX.Element;
5
7
  export default PaymentSuccessView;
@@ -31,9 +31,9 @@ export declare const SecureBox: import("styled-components/dist/types").IStyledCo
31
31
  export declare const DivBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
32
32
  export declare const CardNumbertext: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
33
33
  export declare const AccountCard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
34
- export declare const Row: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<any, {
35
- isLast?: boolean | undefined;
36
- }>> & string & Omit<({ isLast, ...rest }: any) => import("react/jsx-runtime").JSX.Element, keyof React.Component<any, {}, any>>;
34
+ export declare const Row: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
35
+ $isLast?: boolean | undefined;
36
+ }>> & string;
37
37
  export declare const InfoBanner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
38
38
  export declare const TimerRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
39
39
  export declare const QRContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -41,11 +41,15 @@ export declare const OpayBox: import("styled-components/dist/types").IStyledComp
41
41
  export declare const MobileHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
42
42
  export declare const MobileSubText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
43
43
  export declare const MobileTextBox: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
44
- export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>, never>> & string;
44
+ export declare const StyledInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>, "ref"> & {
45
+ ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
46
+ }, never>> & string;
45
47
  export declare const PasswordWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
46
48
  export declare const TogglePassword: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
47
- export declare const NextButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "isDisable"> & {
49
+ export declare const NextButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "isDisable"> & {
48
50
  isDisable?: boolean | undefined;
51
+ }, "ref"> & {
52
+ ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
49
53
  }, never>> & string;
50
54
  export declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
51
55
  export declare const BodyText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
@@ -77,5 +81,5 @@ export declare const LoadingText: import("styled-components/dist/types").IStyled
77
81
  export declare const spin: import("styled-components/dist/models/Keyframes").default;
78
82
  export declare const Spinner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
79
83
  export declare const Iframe: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, never>> & string;
80
- declare const PaygateCheckoutSdk: ({ userData }: PaygateCheckoutSdkProps) => import("react/jsx-runtime").JSX.Element;
84
+ declare const PaygateCheckoutSdk: ({ userData, config, onSuccess, onError, }: PaygateCheckoutSdkProps) => import("react/jsx-runtime").JSX.Element;
81
85
  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 PaygateSdk: {
@@ -43,6 +43,13 @@ declare const PaygateSdk: {
43
43
  props: PaygateCheckoutSdkProps;
44
44
  }) => void;
45
45
  };
46
+ declare global {
47
+ interface Window {
48
+ PaygateCheckoutSDK?: {
49
+ PaygateSdk: typeof PaygateSdk;
50
+ };
51
+ }
52
+ }
46
53
 
47
54
  export { PaygateSdk };
48
55
  export type { MerchantDataProps, PaygateCheckoutSdkProps };