mainstack-payments 0.4.6 → 0.4.7

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,6 +1,6 @@
1
1
  import { TMetadata } from 'types';
2
2
 
3
- export declare const useGetTransactionFees: ({ account_id, currency, amount, slug, apply_tranche_fee, ip, country, postal_code, product_id, }: {
3
+ export declare const useGetTransactionFees: ({ account_id, currency, amount, slug, apply_tranche_fee, ip, country, postal_code, product_id, apply_switching_fee, apply_currency_conversion_fee, }: {
4
4
  account_id: string;
5
5
  currency: string;
6
6
  amount: number;
@@ -10,6 +10,8 @@ export declare const useGetTransactionFees: ({ account_id, currency, amount, slu
10
10
  country?: string | undefined;
11
11
  postal_code?: string | undefined;
12
12
  product_id?: string | undefined;
13
+ apply_switching_fee?: boolean | undefined;
14
+ apply_currency_conversion_fee?: boolean | undefined;
13
15
  }, Request: any) => {
14
16
  data: any;
15
17
  isLoading: boolean;
@@ -1,5 +1,6 @@
1
- /** @format */
2
- declare const CheckoutDetailsForm: ({ currency, amount, metadata, formik, isFree, showPayment, onCancel, btn_color, onPaymentComplete, Request, }: {
1
+ import { TPaymentModel } from 'types';
2
+
3
+ declare const CheckoutDetailsForm: ({ currency, amount, metadata, formik, isFree, showPayment, onCancel, btn_color, onPaymentComplete, Request, paymentModel, }: {
3
4
  currency: string;
4
5
  amount: number;
5
6
  metadata?: any;
@@ -11,5 +12,6 @@ declare const CheckoutDetailsForm: ({ currency, amount, metadata, formik, isFree
11
12
  btn_color: string;
12
13
  onPaymentComplete: (payload: object) => void;
13
14
  Request: any;
15
+ paymentModel: TPaymentModel;
14
16
  }) => import("react/jsx-runtime").JSX.Element;
15
17
  export default CheckoutDetailsForm;
@@ -4,13 +4,5 @@ export declare enum CURRENCIES {
4
4
  NGN = "NGN",
5
5
  UGX = "UGX",
6
6
  USD = "USD",
7
- GBP = "GBP",
8
- EUR = "EUR",
9
- BGN = "BGN",
10
- CZK = "CZK",
11
- DKK = "DKK",
12
- HUF = "HUF",
13
- PLN = "PLN",
14
- RON = "RON",
15
- SEK = "SEK"
7
+ GBP = "GBP"
16
8
  }
@@ -1,5 +1,6 @@
1
1
  /** @format */
2
2
  type TPaymentOption = "wallet" | "startbutton" | "stripe" | "paystack";
3
+ type TPaymentModel = "ips" | "default";
3
4
  type TMetadata = {
4
5
  reference?: string;
5
6
  actual_price?: string;
@@ -43,7 +44,8 @@ type TPaymentConfig = {
43
44
  STRIPE_SECRET_KEY: string;
44
45
  STRIPE_SECRET_KEY_GBP: string;
45
46
  applyTrancheFee?: boolean;
46
- ip?: string;
47
+ ip: string;
47
48
  shouldApplyTax?: boolean;
49
+ paymentModel?: TPaymentModel;
48
50
  };
49
- export type { TPaymentConfig, TMetadata, TCustomizations, TPaymentOption };
51
+ export type { TPaymentConfig, TMetadata, TCustomizations, TPaymentOption, TPaymentModel, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "0.4.6",
4
+ "version": "0.4.7",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
7
  "files": [