paygate-checkout-sdk 1.0.21 → 1.0.23

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,5 @@
1
1
  interface CompletePayinPayload {
2
- transactionReference: string;
2
+ transactionReference?: string;
3
3
  otpCode: string;
4
4
  customerNumber: string;
5
5
  transactionAmount: number;
@@ -0,0 +1,7 @@
1
+ import { CountryApiResponse } from "@shared/types";
2
+ export declare const useGetCountries: () => {
3
+ result: CountryApiResponse | undefined;
4
+ loading: boolean;
5
+ error: string | null;
6
+ getCountries: () => Promise<any>;
7
+ };
@@ -21,12 +21,18 @@ interface PaymentPayload {
21
21
  }
22
22
  interface OpayResponse {
23
23
  responseDetails: {
24
- responseCodeode: string;
24
+ responseCode: string;
25
25
  responseMessage: string;
26
26
  failedReason?: string;
27
+ statusDescription?: string;
27
28
  };
29
+ processorReference?: string;
28
30
  transactionReference: string;
29
31
  redirectionRequired: boolean;
32
+ otpIsRequired?: boolean;
33
+ lengthOfOtp?: number;
34
+ paymentCompletionRequired?: boolean;
35
+ paymentCompletionUrl?: string;
30
36
  }
31
37
  interface OpayError {
32
38
  code: string;
@@ -205,6 +205,7 @@ export type MerchantDataProps = {
205
205
  successUrl?: string;
206
206
  errorUrl?: string;
207
207
  cancelUrl?: string;
208
+ initializationType?: string;
208
209
  };
209
210
  export type PaygateCheckoutSdkProps = {
210
211
  userData: MerchantDataProps;
@@ -216,3 +217,27 @@ export type PaygateCheckoutSdkProps = {
216
217
  onSuccess?: () => void;
217
218
  onError?: () => void;
218
219
  };
220
+ export interface CountryApiResponse {
221
+ status: boolean;
222
+ message: string;
223
+ data: WalletCountry[];
224
+ }
225
+ export interface WalletCountry {
226
+ id: number;
227
+ active: string;
228
+ avatar: string;
229
+ code: string;
230
+ isoCode: string;
231
+ name: string;
232
+ shortName: string;
233
+ currency: WalletCurrency;
234
+ }
235
+ export type WalletCurrency = {
236
+ id: number;
237
+ name: string;
238
+ code: string;
239
+ htmlCode: string;
240
+ isoCode: string;
241
+ unicode: string;
242
+ active: boolean;
243
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paygate-checkout-sdk",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "main": "dist/index.jsx",
5
5
  "type": "module",
6
6
  "module": "dist/index.esm.jsx",
@@ -39,6 +39,7 @@
39
39
  "credit-card-type": "^10.0.2",
40
40
  "fontawesome": "^5.6.3",
41
41
  "html2canvas": "^1.4.1",
42
+ "libphonenumber-js": "^1.12.24",
42
43
  "moment": "^2.30.1",
43
44
  "react-chartjs-2": "^5.3.0",
44
45
  "react-icons": "^5.5.0",