mainstack-payments 2.1.9 → 2.2.10
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.
- package/build/{CashAppPayment-Bky3IPBo.js → CashAppPayment-qTPkH3L2.js} +24 -22
- package/build/{CryptoPayments-BkVRR6Nl.js → CryptoPayments-DX1zzo3h.js} +23 -21
- package/build/{index-Cw2Ampzx.js → index-BqCILFs4.js} +1236 -1225
- package/build/mainstack-payments.js +1 -1
- package/build/src/api/index.d.ts +9 -1
- package/build/src/components/PaymentOptions/CashAppPayment.d.ts +2 -1
- package/build/src/components/PaymentOptions/CryptoPayments.d.ts +2 -1
- package/build/src/components/WalletPay.d.ts +2 -1
- package/build/src/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-
|
|
1
|
+
import { d as e, e as t, S as n, M as y, f as P, P as m, g as o, h as r, W as u, c as i, b as c, i as l, j as d, k, u as C, a as M, l as h, m as F } from "./index-BqCILFs4.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CheckoutForm,
|
|
4
4
|
t as ContactForm,
|
package/build/src/api/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export interface IChargePayment {
|
|
|
55
55
|
metadata?: Record<string, unknown>;
|
|
56
56
|
source?: string;
|
|
57
57
|
payment_method_id?: string;
|
|
58
|
+
businessId: string;
|
|
58
59
|
}
|
|
59
60
|
export interface IChargePaymentResponse {
|
|
60
61
|
reference: string;
|
|
@@ -66,7 +67,7 @@ export interface IChargePaymentResponse {
|
|
|
66
67
|
};
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
export declare const buildChargePaymentPayload: ({ initResponse, metadata, callbackUrl, paymentToken, paymentMethodId, ip, paymentMethod, }: {
|
|
70
|
+
export declare const buildChargePaymentPayload: ({ initResponse, metadata, callbackUrl, paymentToken, paymentMethodId, ip, paymentMethod, businessId, }: {
|
|
70
71
|
initResponse: IInitPaymentResponse;
|
|
71
72
|
feesResponse: ITransactionFeesResponse;
|
|
72
73
|
metadata: Record<string, any>;
|
|
@@ -76,6 +77,7 @@ export declare const buildChargePaymentPayload: ({ initResponse, metadata, callb
|
|
|
76
77
|
paymentMethodId?: string | undefined;
|
|
77
78
|
ip?: string | undefined;
|
|
78
79
|
paymentMethod?: "crypto" | "cashapp" | "card" | "transfer" | "mobile_money" | "google_pay" | "apple_pay" | "bank_transfer" | "ussd" | "payattitude" | "qr" | "wechat_pay" | undefined;
|
|
80
|
+
businessId: string;
|
|
79
81
|
}) => IChargePayment;
|
|
80
82
|
/**
|
|
81
83
|
* Submits a payment charge. Returns `IChargePaymentResponse` directly (envelope unwrapped).
|
|
@@ -84,6 +86,12 @@ export declare const useChargePayment: (PaymentRequest: AxiosInstance) => import
|
|
|
84
86
|
export interface IIntentPaymentResponse {
|
|
85
87
|
client_secret?: string;
|
|
86
88
|
[key: string]: unknown;
|
|
89
|
+
next_action?: {
|
|
90
|
+
redirect_to_url: {
|
|
91
|
+
url: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
reference: string;
|
|
87
95
|
}
|
|
88
96
|
/**
|
|
89
97
|
* Creates a Stripe / wallet payment intent. Returns `IIntentPaymentResponse` directly.
|
|
@@ -11,6 +11,7 @@ interface CashAppPaymentProps {
|
|
|
11
11
|
checkForErrors: () => Promise<boolean>;
|
|
12
12
|
feesResponse?: ITransactionFeesResponse;
|
|
13
13
|
ip: string;
|
|
14
|
+
businessId: string;
|
|
14
15
|
}
|
|
15
|
-
declare const CashAppPayment: import('react').MemoExoticComponent<({ ProductRequest, PaymentRequest, metadata, subAmount, totalAmount, currency, redirectUrl, checkForErrors, feesResponse, ip, }: CashAppPaymentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
|
+
declare const CashAppPayment: import('react').MemoExoticComponent<({ ProductRequest, PaymentRequest, metadata, subAmount, totalAmount, currency, redirectUrl, checkForErrors, feesResponse, ip, businessId, }: CashAppPaymentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
17
|
export default CashAppPayment;
|
|
@@ -11,6 +11,7 @@ interface CryptoPaymentsProps {
|
|
|
11
11
|
checkForErrors: () => Promise<boolean>;
|
|
12
12
|
feesResponse?: ITransactionFeesResponse;
|
|
13
13
|
ip: string;
|
|
14
|
+
businessId: string;
|
|
14
15
|
}
|
|
15
|
-
declare const CryptoPayments: ({ ProductRequest, PaymentRequest, metadata, subAmount, totalAmount, currency, redirectUrl, checkForErrors, feesResponse, ip, }: CryptoPaymentsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const CryptoPayments: ({ ProductRequest, PaymentRequest, metadata, subAmount, totalAmount, currency, redirectUrl, checkForErrors, feesResponse, ip, businessId, }: CryptoPaymentsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export default CryptoPayments;
|
|
@@ -18,6 +18,7 @@ interface WalletPayProps {
|
|
|
18
18
|
totalAmount: number;
|
|
19
19
|
feesResponse?: ITransactionFeesResponse;
|
|
20
20
|
ip: string;
|
|
21
|
+
businessId: string;
|
|
21
22
|
}
|
|
22
|
-
declare const WalletPay: import('react').MemoExoticComponent<({ currency, metadata, amount, formik, checkForErrors, onPaymentComplete, ProductRequest, PaymentRequest, stripeCountry, onInitializePayment, onToggleWallet, subAmount, totalAmount, feesResponse, ip, }: WalletPayProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
|
+
declare const WalletPay: import('react').MemoExoticComponent<({ currency, metadata, amount, formik, checkForErrors, onPaymentComplete, ProductRequest, PaymentRequest, stripeCountry, onInitializePayment, onToggleWallet, subAmount, totalAmount, feesResponse, ip, businessId, }: WalletPayProps) => import("react/jsx-runtime").JSX.Element>;
|
|
23
24
|
export default WalletPay;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mainstack-payments",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.10",
|
|
5
5
|
"main": "build/mainstack-payments.js",
|
|
6
6
|
"types": "build/src/index.d.ts",
|
|
7
7
|
"style": "build/index.css",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@stripe/react-stripe-js": "^2.7.1",
|
|
50
50
|
"@stripe/stripe-js": "^4.0.0",
|
|
51
|
-
"axios": "
|
|
51
|
+
"axios": "1.7.2",
|
|
52
52
|
"eslint-config-prettier": "^8.6.0",
|
|
53
53
|
"eslint-plugin-prettier": "^4.2.1",
|
|
54
54
|
"formik": "^2.4.6",
|