mainstack-payments 1.0.58 → 1.0.60
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/README.md +81 -84
- package/build/{CashAppPayment-ec1303ed.js → CashAppPayment-d1f2d636.js} +17 -17
- package/build/{CryptoPayments-018fa85c.js → CryptoPayments-73071cf0.js} +17 -17
- package/build/index-35e9efb8.js +12265 -0
- package/build/mainstack-payments.js +17 -22
- package/build/payments-a2629fa6.js +421 -0
- package/build/src/components/Payment.d.ts +4 -6
- package/build/src/hooks/useSmoothScroll.d.ts +4 -0
- package/build/src/types/index.d.ts +0 -3
- package/build/ui-bf54450a.js +11610 -0
- package/package.json +2 -3
- package/build/index-b2bd5651.js +0 -29044
package/README.md
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
+
<!-- @format -->
|
|
2
|
+
|
|
1
3
|
<!--@@joggrdoc@@-->
|
|
2
4
|
<!-- @joggr:version(v2):end -->
|
|
3
5
|
<!-- @joggr:warning:start -->
|
|
4
|
-
<!--
|
|
5
|
-
_ _ _ __ __ _ ____ _ _ ___ _ _ ____ _ _ _
|
|
6
|
+
<!--
|
|
7
|
+
_ _ _ __ __ _ ____ _ _ ___ _ _ ____ _ _ _
|
|
6
8
|
| | | | | | \ \ / / / \ | _ \ | \ | | |_ _| | \ | | / ___| | | | | | |
|
|
7
9
|
| | | | | | \ \ /\ / / / _ \ | |_) | | \| | | | | \| | | | _ | | | | | |
|
|
8
10
|
|_| |_| |_| \ V V / / ___ \ | _ < | |\ | | | | |\ | | |_| | |_| |_| |_|
|
|
9
11
|
(_) (_) (_) \_/\_/ /_/ \_\ |_| \_\ |_| \_| |___| |_| \_| \____| (_) (_) (_)
|
|
10
|
-
|
|
11
|
-
This document is managed by Joggr. Editing this document could break Joggr's core features, i.e. our
|
|
12
|
-
ability to auto-maintain this document. Please use the Joggr editor to edit this document
|
|
12
|
+
|
|
13
|
+
This document is managed by Joggr. Editing this document could break Joggr's core features, i.e. our
|
|
14
|
+
ability to auto-maintain this document. Please use the Joggr editor to edit this document
|
|
13
15
|
(link at bottom of the page).
|
|
14
16
|
-->
|
|
15
17
|
<!-- @joggr:warning:end -->
|
|
18
|
+
|
|
16
19
|
## Installation
|
|
17
20
|
|
|
18
21
|
To install the Mainstack Payments library, you need to run the following command in your terminal:
|
|
@@ -61,121 +64,121 @@ function MyApp({ Component, pageProps }: AppProps) {
|
|
|
61
64
|
|
|
62
65
|
The config object should contain the following properties:
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
- `amount*`: The amount for the product to be paid
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
- `accountId*`: The account ID of the user making the payment
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
- `currency*`: The currency to be used for the payment
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
- `transactionFeesSlug*`: The slug of the transaction fees to be applied to the payment usually determined by the backend, e.g 'store-pro-plan'
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
- `userAllowsWalletPayment*`: A boolean value that states if the merchant has allowed wallet payment
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
- `userAllowsCardPayment*`: A boolean value that states if the merchant has allowed card payment
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
- `userAllowsCryptoPayment*`: A boolean value that states if the merchant has allowed crypto wallet payments.
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
- `metadata*`: An object that contains additional information about the payment. See more on this [here](#metadata)
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
- `baseUrl*`: The base URL of the legacy API. This API is what is used primarily to make payments. It is used initialise, charge and verify payment.
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
- `hasDiscountCode`: A optional boolean to show the discount code input. Default is false.
|
|
83
86
|
|
|
84
|
-
|
|
87
|
+
- `mainstackProductId`: A User's ID for a particular product, e.g store_id, bookings_id etc.
|
|
85
88
|
|
|
86
|
-
|
|
89
|
+
- `STRIPE_SECRET_KEY*`: Stripe secret key for stripe payments, usually stored in an env.
|
|
87
90
|
|
|
88
|
-
|
|
91
|
+
- `STRIPE_SECRET_KEY_GBP*`: Stripe secret key for stripe payments in GBP, usually stored in an env.
|
|
89
92
|
|
|
90
|
-
|
|
93
|
+
- `STRIPE_SECRET_KEY_CAD*`: Stripe secret key for stripe payments in CAD, usually stored in an env.
|
|
91
94
|
|
|
92
|
-
|
|
95
|
+
- `merchantBearsTax` : This is a boolean to indicate if the merchant bears tax charges or not.
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
- `applyTrancheFee`: Boolean that is passed to the transaction fees endpoint and dictates if a tranch fee should be applied for transaction fees.This is specifically for Pay In Tranches payments. Default is false.
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
- `shouldApplyTax`: A boolean that determines if tax fees should be calculated and collected. Default is false.
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
- `ip`: This is for the user's ip address to determine their tax fee. Only needed if you want to collect tax fees.
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
- `paymentOptions`: An array of payment options that should be enabled for the user can select from. The options are 'paystack', 'startbutton', 'wallet', 'stripe', 'crypto'
|
|
101
104
|
|
|
102
|
-
|
|
105
|
+
- `paymentRedirectUrl`: The URL to redirect to after a successful payment with Paystack, Startbutton or Stripe UK payments (which may require 3DS). More on this can be found [here](#paystackredirecturl)
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
- `cryptoRedirectUrl`: The URL to redirect to after a successful crypto wallet payment. This is different to `paymentRedirectUrl` as you are fully in control of this page and should ideally be the receipt page. The following url query parameters will be added to the url from the payment library: `reference` : payment reference generated by mainstack, `payment_intent` : generated by stripe. This is required if `userAllowsCryptoPayment` is true.
|
|
105
108
|
|
|
106
|
-
|
|
109
|
+
- `customizations`: This is an object that takes values that adjust layout, styling or display of elements on the library. See full description [here](https://app.joggr.io/app/documents/b5b2ff2f-550d-4057-bed3-441870eaaf5d/edit#customizations).
|
|
107
110
|
|
|
108
|
-
|
|
111
|
+
- `paymentModel`: string that specifies if the payment model is 'ips' or 'default'
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
- `isFreeTrial`: Boolean to specify if a subscription payment is a free trial.
|
|
111
114
|
|
|
112
|
-
|
|
115
|
+
- `merchantCountry`: A string that returns the country of the merchant.
|
|
113
116
|
|
|
114
|
-
|
|
117
|
+
- `isPowerUser`: A Boolean to specify if a merchant is a power user.
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
- `itemsList`: This is an Array of objects used when multiple products are being purchased at once. e.g: event tickets or cart products. See object values [here](https://app.joggr.io/app/documents/b5b2ff2f-550d-4057-bed3-441870eaaf5d/edit#items-list)
|
|
117
120
|
|
|
118
|
-
|
|
121
|
+
- `payment_plan_id` : The Payment plan ID for IPS related payments.
|
|
119
122
|
|
|
120
123
|
#### metadata
|
|
121
124
|
|
|
122
125
|
The `metadata` object should contain the following properties:
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
- `productName`: The name of the product being paid for.
|
|
125
128
|
|
|
126
|
-
|
|
129
|
+
- `productImage`: The image url of the product.
|
|
127
130
|
|
|
128
|
-
|
|
131
|
+
- `type`: The type of product being paid for.
|
|
129
132
|
|
|
130
|
-
|
|
133
|
+
- `account_id`: The account ID of the user making the payment
|
|
131
134
|
|
|
132
|
-
|
|
135
|
+
- `user_id`: The user ID of the user making the payment
|
|
133
136
|
|
|
134
|
-
|
|
137
|
+
- `product_id`: The product ID of the product being paid for
|
|
135
138
|
|
|
136
|
-
|
|
139
|
+
- `mainstack_product_type`: What Category of Mainstack Product is being paid for, accepted values are 'store', 'editor', 'bookings', 'mediakit', 'invoicing', 'hosted_courses'
|
|
137
140
|
|
|
138
|
-
|
|
141
|
+
- `quantity`: The quantity of a product being purchased.
|
|
139
142
|
|
|
140
|
-
|
|
143
|
+
- `[key:string]` : Any other key-value pair that you want to add to the metadata object
|
|
141
144
|
|
|
142
145
|
#### Customizations
|
|
143
146
|
|
|
144
|
-
|
|
147
|
+
- `theme_color`: custom color the the Pay button
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
- `button_label`: custom label for the Pay button
|
|
147
150
|
|
|
148
|
-
|
|
151
|
+
- `font_family`: To set the font family for all the payment library texts and inputs
|
|
149
152
|
|
|
150
|
-
|
|
153
|
+
- `hideDetails`: Boolean that hide the summary details section of the payment library. Default is false.
|
|
151
154
|
|
|
152
|
-
|
|
155
|
+
- `hideBackButton` : Boolean to remove the back button that is next to the Pay button.
|
|
153
156
|
|
|
154
|
-
|
|
157
|
+
- `isSingleColumn` : This converts the payment library layout from 2 columns to a single column. Not that this happens by default on mobile screens.
|
|
155
158
|
|
|
156
|
-
|
|
159
|
+
- `padding` : This can be used to adjust the surrounding padding of the payment library.
|
|
157
160
|
|
|
158
|
-
|
|
161
|
+
- `showDefaultInputFields` This is an object used to determine what default input fields will be shown on the checkout form. They include:
|
|
159
162
|
|
|
160
|
-
|
|
163
|
+
- `email` : For the Email input. Default is true.
|
|
161
164
|
|
|
162
|
-
|
|
165
|
+
- `fullname`: For the Name input. Default is true.
|
|
163
166
|
|
|
164
|
-
|
|
167
|
+
- `phone`: For the PhoneNumber input. Default is false.
|
|
165
168
|
|
|
166
|
-
|
|
169
|
+
- `summaryWidth`: This takes a width in pixels to set a fixed width for the summary section.
|
|
167
170
|
|
|
168
171
|
#### itemsList
|
|
169
172
|
|
|
170
|
-
|
|
173
|
+
- `name*`: String for the name of the product.
|
|
171
174
|
|
|
172
|
-
|
|
175
|
+
- `price*`: Type of Number for the product price.
|
|
173
176
|
|
|
174
|
-
|
|
177
|
+
- `currency*`: Currency code of the price.
|
|
175
178
|
|
|
176
|
-
|
|
179
|
+
- `quantity*` : The amount of each product being purchased.
|
|
177
180
|
|
|
178
|
-
|
|
181
|
+
- `image`: Optional image url for each product.
|
|
179
182
|
|
|
180
183
|
The `paymentRedirectUrl` is the URL to redirect to after a successful payment with Paystack, Startbutton or Stripe UK. This page will be created by you and should contain the following code:
|
|
181
184
|
|
|
@@ -201,46 +204,40 @@ The aim of this is to send a postMessage to the iframe that loads the payment op
|
|
|
201
204
|
|
|
202
205
|
Other Props that can be passed to the `MainstackPayments` component are:
|
|
203
206
|
|
|
204
|
-
|
|
207
|
+
- `summaryTitle`: This takes a string or ReactNode and is used to replace the title of the payment summary section, the default is always the Product name.
|
|
205
208
|
|
|
206
|
-
|
|
209
|
+
- `checkoutTitle`: This takes a string or ReactNode and is used to replace the title of the checkout form section, the default is always "**Checkout Details"**
|
|
207
210
|
|
|
208
|
-
|
|
211
|
+
- `customForm`: This takes a ReactNode used to add a custom form to the payment page.
|
|
209
212
|
|
|
210
|
-
|
|
213
|
+
- `defaultFormValues`: This is an object with `fullname` and `email` keys. Their values are passed to their respective inputs as default values.
|
|
211
214
|
|
|
212
|
-
|
|
215
|
+
- `preCheckoutBanner`: This takes a ReactNode to add a banner to the top of the checkout page.
|
|
213
216
|
|
|
214
|
-
|
|
217
|
+
- `height`: this takes a value in pixels to set a fixed height for the checkout library component.
|
|
215
218
|
|
|
216
|
-
|
|
219
|
+
- `FooterElement` : This takes a ReactNode to display a component at the bottom of the checkout page.
|
|
217
220
|
|
|
218
|
-
|
|
221
|
+
- `onPaymentComplete`: This is a callback function that is called when the payment is completed. It contains a payload that will include the amount, default input values, and reference of the payment, as well as some other optional data.
|
|
219
222
|
|
|
220
|
-
|
|
223
|
+
- `onGoBack`: This is a callback function that is called when the user clicks the back button on the payment page.
|
|
221
224
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
* `onDiscountApplied`: This is a callback that gets called when discount get's applied on checkout.
|
|
225
|
-
|
|
226
|
-
* `onDiscountRemoved`: This is a callback that get's called when discount is removed from the checkout.
|
|
225
|
+
- `onInitializePayment`: This is an async function is called just as the payment is about to be initialized and is useful for triggering any actions before the payment is initialized, like validating your custom form or making an api call to validate something with the user's name or email before proceeding with payment. It contains an argument that has the values for the default form inputs, and must return a promise that resolves an object with a `terminate` boolean property. The payment initialization will terminate immediately the promise resolves depending on what the value of `terminate` is.
|
|
227
226
|
|
|
228
227
|
```typescript
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
onInitializePayment={onInitPayment}
|
|
237
|
-
/>
|
|
228
|
+
<MainstackPayments
|
|
229
|
+
paymentConfig={config}
|
|
230
|
+
onGoBack={goBack}
|
|
231
|
+
onPaymentComplete={(e) => onPaymentSuccess(e)}
|
|
232
|
+
customForm={<>{customForm}</>}
|
|
233
|
+
onInitializePayment={onInitPayment}
|
|
234
|
+
/>
|
|
238
235
|
```
|
|
239
236
|
|
|
240
237
|
> Happy Hacking !!!
|
|
241
238
|
|
|
242
|
-
<!-- @joggr:editLink(b5b2ff2f-550d-4057-bed3-441870eaaf5d):start -->
|
|
243
|
-
|
|
239
|
+
## <!-- @joggr:editLink(b5b2ff2f-550d-4057-bed3-441870eaaf5d):start -->
|
|
240
|
+
|
|
244
241
|
<a href="https://app.joggr.io/app/documents/b5b2ff2f-550d-4057-bed3-441870eaaf5d/edit">
|
|
245
242
|
<img src="https://cdn.joggr.io/assets/static/badges/joggr-document-edit.svg?did=b5b2ff2f-550d-4057-bed3-441870eaaf5d" alt="Edit doc on Joggr" />
|
|
246
243
|
</a>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { customSnackbar as
|
|
4
|
-
import {
|
|
5
|
-
import "react
|
|
6
|
-
import "
|
|
7
|
-
const F = (i) => /* @__PURE__ */ c(
|
|
2
|
+
import { u as b, a as A, v, C as E } from "./index-35e9efb8.js";
|
|
3
|
+
import { customSnackbar as H, SnackbarType as j, ExpandMoreIcon as k } from "mainstack-design-system";
|
|
4
|
+
import { u as z } from "./payments-a2629fa6.js";
|
|
5
|
+
import { memo as B, useState as M, useCallback as x } from "react";
|
|
6
|
+
import { j as $, F as P, T } from "./ui-bf54450a.js";
|
|
7
|
+
const F = (i) => /* @__PURE__ */ c($, { viewBox: "0 0 32 32", ...i, fill: "none", children: [
|
|
8
8
|
/* @__PURE__ */ c("g", { clipPath: "url(#clip0_3703_1664)", children: [
|
|
9
9
|
/* @__PURE__ */ a(
|
|
10
10
|
"path",
|
|
@@ -24,7 +24,7 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
24
24
|
)
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("clipPath", { id: "clip0_3703_1664", children: /* @__PURE__ */ a("rect", { width: "32", height: "32", rx: "16", fill: "white" }) }) })
|
|
27
|
-
] }), V =
|
|
27
|
+
] }), V = B(
|
|
28
28
|
({
|
|
29
29
|
Request: i,
|
|
30
30
|
metadata: d,
|
|
@@ -33,9 +33,9 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
33
33
|
redirectUrl: o,
|
|
34
34
|
checkForErrors: h
|
|
35
35
|
}) => {
|
|
36
|
-
const m =
|
|
36
|
+
const m = z(), { mutate: r, isLoading: L } = b(i), { mutate: f, isLoading: _ } = A(i), [I, C] = M(!1), u = L || _ || I, g = x(async () => {
|
|
37
37
|
var w;
|
|
38
|
-
const n =
|
|
38
|
+
const n = v(), y = {
|
|
39
39
|
...d,
|
|
40
40
|
reference: n
|
|
41
41
|
};
|
|
@@ -91,9 +91,9 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
} catch (t) {
|
|
94
|
-
C(!1), console.error(t),
|
|
94
|
+
C(!1), console.error(t), H(
|
|
95
95
|
((w = t == null ? void 0 : t.raw) == null ? void 0 : w.message) ?? (t == null ? void 0 : t.message) ?? t ?? "We couldn't complete your payment",
|
|
96
|
-
|
|
96
|
+
j.error
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
}, [
|
|
@@ -105,20 +105,20 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
105
105
|
d,
|
|
106
106
|
o,
|
|
107
107
|
C
|
|
108
|
-
]), S =
|
|
108
|
+
]), S = x(async () => {
|
|
109
109
|
await h() || g();
|
|
110
110
|
}, [h, g]);
|
|
111
111
|
return /* @__PURE__ */ a(
|
|
112
|
-
|
|
112
|
+
E,
|
|
113
113
|
{
|
|
114
114
|
onClick: S,
|
|
115
115
|
disabled: u,
|
|
116
116
|
isLoading: u,
|
|
117
|
-
children: /* @__PURE__ */ c(
|
|
118
|
-
/* @__PURE__ */ c(
|
|
117
|
+
children: /* @__PURE__ */ c(P, { justifyContent: "space-between", w: "full", alignItems: "center", children: [
|
|
118
|
+
/* @__PURE__ */ c(P, { alignItems: "center", gap: "12px", children: [
|
|
119
119
|
/* @__PURE__ */ a(F, { boxSize: "32px" }),
|
|
120
120
|
/* @__PURE__ */ a(
|
|
121
|
-
|
|
121
|
+
T,
|
|
122
122
|
{
|
|
123
123
|
color: "#111215",
|
|
124
124
|
fontFamily: "Bricolage Grotesque",
|
|
@@ -130,7 +130,7 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
130
130
|
}
|
|
131
131
|
)
|
|
132
132
|
] }),
|
|
133
|
-
/* @__PURE__ */ a(
|
|
133
|
+
/* @__PURE__ */ a(k, { transform: "rotate(-90deg)", boxSize: "24px" })
|
|
134
134
|
] })
|
|
135
135
|
}
|
|
136
136
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ExpandMoreIcon as j, customSnackbar as
|
|
4
|
-
import {
|
|
5
|
-
import "react
|
|
6
|
-
import "
|
|
7
|
-
const F = (s) => /* @__PURE__ */ c(
|
|
2
|
+
import { u as I, a as S, C as b, v as E } from "./index-35e9efb8.js";
|
|
3
|
+
import { ExpandMoreIcon as j, customSnackbar as z, SnackbarType as M } from "mainstack-design-system";
|
|
4
|
+
import { u as $ } from "./payments-a2629fa6.js";
|
|
5
|
+
import { useState as k } from "react";
|
|
6
|
+
import { j as v, F as h, T as B } from "./ui-bf54450a.js";
|
|
7
|
+
const F = (s) => /* @__PURE__ */ c(v, { viewBox: "0 0 32 32", ...s, fill: "none", children: [
|
|
8
8
|
/* @__PURE__ */ n("g", { clipPath: "url(#clip0_2605_970)", children: /* @__PURE__ */ n(
|
|
9
9
|
"path",
|
|
10
10
|
{
|
|
@@ -21,9 +21,9 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
21
21
|
redirectUrl: o,
|
|
22
22
|
checkForErrors: g
|
|
23
23
|
}) => {
|
|
24
|
-
const m =
|
|
25
|
-
var
|
|
26
|
-
const a =
|
|
24
|
+
const m = $(), { mutate: u, isLoading: L } = I(s), { mutate: w, isLoading: x } = S(s), [P, p] = k(!1), d = L || x || P, _ = async () => {
|
|
25
|
+
var y;
|
|
26
|
+
const a = E(), f = {
|
|
27
27
|
...C,
|
|
28
28
|
reference: a
|
|
29
29
|
};
|
|
@@ -33,7 +33,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
33
33
|
amount: r,
|
|
34
34
|
reference: a,
|
|
35
35
|
currency: l,
|
|
36
|
-
metadata:
|
|
36
|
+
metadata: f,
|
|
37
37
|
is_crypto_payment: !0
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -49,7 +49,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
49
49
|
{
|
|
50
50
|
amount: r,
|
|
51
51
|
currency: l,
|
|
52
|
-
metadata:
|
|
52
|
+
metadata: f,
|
|
53
53
|
is_crypto_payment: !0
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -77,17 +77,17 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
77
77
|
throw new Error(t.message ?? "Couldn't load wallet integration");
|
|
78
78
|
}
|
|
79
79
|
} catch (e) {
|
|
80
|
-
p(!1), console.error(e),
|
|
81
|
-
((
|
|
82
|
-
|
|
80
|
+
p(!1), console.error(e), z(
|
|
81
|
+
((y = e == null ? void 0 : e.raw) == null ? void 0 : y.message) ?? (e == null ? void 0 : e.message) ?? e ?? "We couldn't complete your payment",
|
|
82
|
+
M.error
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
return /* @__PURE__ */ n(
|
|
87
|
-
|
|
87
|
+
b,
|
|
88
88
|
{
|
|
89
89
|
onClick: async () => {
|
|
90
|
-
await g() ||
|
|
90
|
+
await g() || _();
|
|
91
91
|
},
|
|
92
92
|
disabled: d,
|
|
93
93
|
isLoading: d,
|
|
@@ -95,7 +95,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
95
95
|
/* @__PURE__ */ c(h, { alignItems: "center", gap: "12px", children: [
|
|
96
96
|
/* @__PURE__ */ n(F, { boxSize: "32px" }),
|
|
97
97
|
/* @__PURE__ */ n(
|
|
98
|
-
|
|
98
|
+
B,
|
|
99
99
|
{
|
|
100
100
|
color: "#111215",
|
|
101
101
|
fontFamily: "Bricolage Grotesque",
|