coinley-checkout 0.5.7 → 0.5.9
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.
@@ -20762,27 +20762,27 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
|
|
20762
20762
|
{
|
20763
20763
|
id: NETWORK_TYPES.ETHEREUM,
|
20764
20764
|
name: "Ethereum",
|
20765
|
-
icon: "/
|
20765
|
+
icon: "https://res.cloudinary.com/do3tlu1ph/image/upload/v1748962844/coinley/liznxm8l7iouudtrxdpi.png"
|
20766
20766
|
},
|
20767
20767
|
{
|
20768
20768
|
id: NETWORK_TYPES.TRON,
|
20769
20769
|
name: "Tron",
|
20770
|
-
icon: "/
|
20770
|
+
icon: "https://res.cloudinary.com/do3tlu1ph/image/upload/v1748962844/coinley/mpxxns6gtfiws4rlouxc.png"
|
20771
20771
|
},
|
20772
20772
|
{
|
20773
20773
|
id: NETWORK_TYPES.ALGORAND,
|
20774
20774
|
name: "Algorand",
|
20775
|
-
icon: "/
|
20775
|
+
icon: "https://res.cloudinary.com/do3tlu1ph/image/upload/v1748962844/coinley/x2lugizoduiphuqn0dej.png"
|
20776
20776
|
},
|
20777
20777
|
{
|
20778
20778
|
id: "solana",
|
20779
20779
|
name: "Solana",
|
20780
|
-
icon: "/
|
20780
|
+
icon: " https://res.cloudinary.com/do3tlu1ph/image/upload/v1748962845/coinley/hmex6qxnlid1gboh4cwc.png"
|
20781
20781
|
},
|
20782
20782
|
{
|
20783
20783
|
id: NETWORK_TYPES.BSC,
|
20784
20784
|
name: "Binance Smart Chain",
|
20785
|
-
icon: "/
|
20785
|
+
icon: "https://res.cloudinary.com/do3tlu1ph/image/upload/v1748962844/coinley/eoavfddfqmt7qgajjxvb.png"
|
20786
20786
|
}
|
20787
20787
|
];
|
20788
20788
|
const [dropdownOpen, setDropdownOpen] = useState(false);
|
@@ -21172,237 +21172,248 @@ const CoinleyModal = ({
|
|
21172
21172
|
};
|
21173
21173
|
if (!isOpen)
|
21174
21174
|
return null;
|
21175
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
21176
|
-
|
21177
|
-
|
21178
|
-
|
21179
|
-
|
21180
|
-
|
21181
|
-
|
21182
|
-
"
|
21183
|
-
|
21184
|
-
|
21185
|
-
|
21186
|
-
|
21187
|
-
|
21188
|
-
|
21189
|
-
] }),
|
21190
|
-
payment && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
21191
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600", children: "Total amount" }),
|
21192
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-amount-display text-5xl font-bold text-[#7042D2] mt-2", children: [
|
21193
|
-
"$",
|
21194
|
-
formatAmount(payment.totalAmount || payment.amount)
|
21195
|
-
] }),
|
21196
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600 mt-4", children: "Payment to:" }),
|
21197
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "coinley-merchant-name text-base font-semibold mt-1", children: merchantName })
|
21198
|
-
] }) }),
|
21199
|
-
step === "select-currency" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21200
|
-
PaymentMethods,
|
21201
|
-
{
|
21202
|
-
onSelect: onPaymentMethodSelect,
|
21203
|
-
selected: selectedPaymentMethod,
|
21204
|
-
theme: theme2,
|
21205
|
-
supportedNetworks
|
21206
|
-
}
|
21207
|
-
) }),
|
21208
|
-
step === "confirm" && selectedPaymentMethod && payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21209
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 rounded-lg mb-4 bg-gray-100", children: [
|
21210
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-medium mb-2 text-gray-800", children: "Payment Details" }),
|
21211
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
21212
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21213
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Currency:" }),
|
21214
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedPaymentMethod.currency })
|
21175
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 overflow-y-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-screen items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
21176
|
+
"div",
|
21177
|
+
{
|
21178
|
+
className: "coinley-modal relative p-6 max-w-[490px] mx-auto rounded-3xl shadow-xl bg-gray-100",
|
21179
|
+
style: {
|
21180
|
+
maxWidth: "490px !important",
|
21181
|
+
width: "100% !important",
|
21182
|
+
minWidth: "320px !important"
|
21183
|
+
},
|
21184
|
+
children: [
|
21185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white flex justify-between items-center mb-6 py-4 px-2 rounded-full", children: [
|
21186
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 flex items-center gap-2 px-4", children: [
|
21187
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logo, className: "w-auto h-auto", alt: "Coinley Logo" }),
|
21188
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-lg font-semibold text-gray-800", children: "Payment Details" })
|
21215
21189
|
] }),
|
21216
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
21217
|
-
|
21218
|
-
|
21190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21191
|
+
"button",
|
21192
|
+
{
|
21193
|
+
onClick: onClose,
|
21194
|
+
className: "text-gray-500 hover:text-gray-700 focus:outline-none",
|
21195
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
|
21196
|
+
}
|
21197
|
+
)
|
21198
|
+
] }),
|
21199
|
+
payment && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center", children: [
|
21200
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600", children: "Total amount" }),
|
21201
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "coinley-amount-display text-5xl font-bold text-[#7042D2] mt-2", children: [
|
21202
|
+
"$",
|
21203
|
+
formatAmount(payment.totalAmount || payment.amount)
|
21219
21204
|
] }),
|
21220
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
21221
|
-
|
21222
|
-
|
21223
|
-
|
21224
|
-
|
21225
|
-
] }),
|
21226
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex border-b border-gray-200", children: [
|
21227
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21228
|
-
"button",
|
21229
|
-
{
|
21230
|
-
onClick: () => setPaymentType("wallet"),
|
21231
|
-
className: `py-2 px-4 text-sm font-medium ${paymentType === "wallet" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21232
|
-
children: "Connect Wallet"
|
21233
|
-
}
|
21234
|
-
),
|
21235
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21236
|
-
"button",
|
21237
|
-
{
|
21238
|
-
onClick: () => setPaymentType("qrcode"),
|
21239
|
-
className: `py-2 px-4 text-sm font-medium ${paymentType === "qrcode" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21240
|
-
children: "QR Code"
|
21241
|
-
}
|
21242
|
-
)
|
21243
|
-
] }) }),
|
21244
|
-
testMode ? (
|
21245
|
-
// Test mode payment option
|
21246
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg mb-4 bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
21247
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-600 rounded-full p-2 mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) }),
|
21248
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21249
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: "Test Mode Payment" }),
|
21250
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: 'Click "Pay Now" to simulate a successful payment' })
|
21251
|
-
] })
|
21252
|
-
] }) })
|
21253
|
-
) : paymentType === "qrcode" ? (
|
21254
|
-
// QR Code payment option
|
21255
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21256
|
-
QRCode,
|
21205
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-600 mt-4", children: "Payment to:" }),
|
21206
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "coinley-merchant-name text-base font-semibold mt-1", children: merchantName })
|
21207
|
+
] }) }),
|
21208
|
+
step === "select-currency" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21209
|
+
PaymentMethods,
|
21257
21210
|
{
|
21258
|
-
|
21259
|
-
|
21260
|
-
|
21261
|
-
|
21262
|
-
theme: theme2
|
21211
|
+
onSelect: onPaymentMethodSelect,
|
21212
|
+
selected: selectedPaymentMethod,
|
21213
|
+
theme: theme2,
|
21214
|
+
supportedNetworks
|
21263
21215
|
}
|
21264
|
-
) })
|
21265
|
-
|
21266
|
-
|
21267
|
-
|
21268
|
-
|
21269
|
-
|
21270
|
-
|
21271
|
-
|
21272
|
-
|
21273
|
-
|
21274
|
-
|
21275
|
-
" network
|
21216
|
+
) }),
|
21217
|
+
step === "confirm" && selectedPaymentMethod && payment && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21218
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 rounded-lg mb-4 bg-gray-100", children: [
|
21219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-lg font-medium mb-2 text-gray-800", children: "Payment Details" }),
|
21220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
21221
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Currency:" }),
|
21223
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedPaymentMethod.currency })
|
21224
|
+
] }),
|
21225
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21226
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Network:" }),
|
21227
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: getNetworkDisplayName(selectedPaymentMethod.network) })
|
21228
|
+
] }),
|
21229
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
21230
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600 font-semibold", children: "Fee:" }),
|
21231
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "1.75%" })
|
21276
21232
|
] })
|
21277
21233
|
] })
|
21278
|
-
] })
|
21279
|
-
|
21280
|
-
|
21281
|
-
|
21282
|
-
|
21283
|
-
|
21284
|
-
|
21285
|
-
|
21286
|
-
|
21287
|
-
|
21288
|
-
|
21289
|
-
|
21290
|
-
|
21234
|
+
] }),
|
21235
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex border-b border-gray-200", children: [
|
21236
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21237
|
+
"button",
|
21238
|
+
{
|
21239
|
+
onClick: () => setPaymentType("wallet"),
|
21240
|
+
className: `py-2 px-4 text-sm font-medium ${paymentType === "wallet" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21241
|
+
children: "Connect Wallet"
|
21242
|
+
}
|
21243
|
+
),
|
21244
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21245
|
+
"button",
|
21246
|
+
{
|
21247
|
+
onClick: () => setPaymentType("qrcode"),
|
21248
|
+
className: `py-2 px-4 text-sm font-medium ${paymentType === "qrcode" ? "border-b-2 border-purple-600 text-purple-600" : "text-gray-500 hover:text-gray-700"}`,
|
21249
|
+
children: "QR Code"
|
21250
|
+
}
|
21251
|
+
)
|
21252
|
+
] }) }),
|
21253
|
+
testMode ? (
|
21254
|
+
// Test mode payment option
|
21255
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg mb-4 bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
21256
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-600 rounded-full p-2 mr-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 10V3L4 14h7v7l9-11h-7z" }) }) }),
|
21291
21257
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21292
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children:
|
21293
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
21294
|
-
"Pay with ",
|
21295
|
-
getWalletDisplayName(walletType)
|
21296
|
-
] })
|
21258
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: "Test Mode Payment" }),
|
21259
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-600", children: 'Click "Pay Now" to simulate a successful payment' })
|
21297
21260
|
] })
|
21298
|
-
] })
|
21299
|
-
|
21300
|
-
|
21301
|
-
|
21302
|
-
|
21261
|
+
] }) })
|
21262
|
+
) : paymentType === "qrcode" ? (
|
21263
|
+
// QR Code payment option
|
21264
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21265
|
+
QRCode,
|
21266
|
+
{
|
21267
|
+
walletAddress: getWalletAddressForNetwork(),
|
21268
|
+
amount: payment.totalAmount || payment.amount,
|
21269
|
+
currency: selectedPaymentMethod.currency,
|
21270
|
+
network: selectedPaymentMethod.network,
|
21271
|
+
theme: theme2
|
21272
|
+
}
|
21273
|
+
) })
|
21274
|
+
) : (
|
21275
|
+
// Wallet connection option
|
21276
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-3 mb-4", children: [
|
21277
|
+
supportedWallets.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg bg-yellow-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
21278
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6 text-yellow-500 mr-2", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
|
21279
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21280
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: "No Compatible Wallets" }),
|
21281
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-gray-600", children: [
|
21282
|
+
"No wallets detected for ",
|
21283
|
+
getNetworkDisplayName(selectedPaymentMethod.network),
|
21284
|
+
" network"
|
21285
|
+
] })
|
21286
|
+
] })
|
21287
|
+
] }) }) : supportedWallets.map((walletType) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 rounded-lg bg-blue-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
21288
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center", children: [
|
21289
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21290
|
+
"img",
|
21291
|
+
{
|
21292
|
+
src: getWalletIcon(walletType),
|
21293
|
+
alt: getWalletDisplayName(walletType),
|
21294
|
+
className: "w-8 h-8 mr-3",
|
21295
|
+
onError: (e) => {
|
21296
|
+
e.target.style.display = "none";
|
21297
|
+
}
|
21298
|
+
}
|
21299
|
+
),
|
21300
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21301
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "font-medium text-gray-800", children: getWalletDisplayName(walletType) }),
|
21302
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm text-gray-600", children: [
|
21303
|
+
"Pay with ",
|
21304
|
+
getWalletDisplayName(walletType)
|
21305
|
+
] })
|
21306
|
+
] })
|
21307
|
+
] }),
|
21308
|
+
(walletConnection == null ? void 0 : walletConnection.walletType) === walletType ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-2", children: [
|
21309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-2 h-2 bg-green-500 rounded-full" }),
|
21310
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-green-600", children: "Connected" })
|
21311
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21312
|
+
"button",
|
21313
|
+
{
|
21314
|
+
onClick: () => {
|
21315
|
+
console.log("Connect wallet button clicked for:", walletType);
|
21316
|
+
onConnectWallet(walletType);
|
21317
|
+
},
|
21318
|
+
className: "coinley-button-primary py-2 px-4 font-medium rounded-md text-sm",
|
21319
|
+
children: "Connect"
|
21320
|
+
}
|
21321
|
+
)
|
21322
|
+
] }) }, walletType)),
|
21323
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: Object.entries(availableWallets).filter(([walletType, isAvailable]) => !isAvailable).map(([walletType]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-3 rounded-lg bg-gray-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
21324
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm text-gray-600", children: [
|
21325
|
+
getWalletDisplayName(walletType),
|
21326
|
+
" not detected"
|
21327
|
+
] }),
|
21328
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21329
|
+
"a",
|
21330
|
+
{
|
21331
|
+
href: getWalletInstallUrl(walletType),
|
21332
|
+
target: "_blank",
|
21333
|
+
rel: "noopener noreferrer",
|
21334
|
+
className: "text-sm text-purple-600 hover:underline",
|
21335
|
+
children: "Install"
|
21336
|
+
}
|
21337
|
+
)
|
21338
|
+
] }) }, walletType)) })
|
21339
|
+
] })
|
21340
|
+
),
|
21341
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-3 rounded-lg bg-red-50 mb-4 text-red-600 text-sm", children: error }),
|
21342
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
21343
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21303
21344
|
"button",
|
21304
21345
|
{
|
21305
|
-
|
21306
|
-
|
21307
|
-
|
21308
|
-
|
21309
|
-
className: "coinley-button-primary py-2 px-4 font-medium rounded-md text-sm",
|
21310
|
-
children: "Connect"
|
21346
|
+
type: "button",
|
21347
|
+
onClick: onBack,
|
21348
|
+
className: "w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-purple-600 font-medium rounded-md",
|
21349
|
+
children: "Back"
|
21311
21350
|
}
|
21312
|
-
)
|
21313
|
-
] }) }, walletType)),
|
21314
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-2", children: Object.entries(availableWallets).filter(([walletType, isAvailable]) => !isAvailable).map(([walletType]) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-3 rounded-lg bg-gray-50", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
|
21315
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-sm text-gray-600", children: [
|
21316
|
-
getWalletDisplayName(walletType),
|
21317
|
-
" not detected"
|
21318
|
-
] }),
|
21351
|
+
),
|
21319
21352
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21320
|
-
"
|
21353
|
+
"button",
|
21321
21354
|
{
|
21322
|
-
|
21323
|
-
|
21324
|
-
|
21325
|
-
|
21326
|
-
children: "
|
21355
|
+
type: "button",
|
21356
|
+
onClick: () => onPayment(paymentType === "qrcode"),
|
21357
|
+
className: "coinley-button-primary w-full py-2 px-4 font-medium rounded-md",
|
21358
|
+
disabled: !testMode && paymentType === "wallet" && !walletConnection,
|
21359
|
+
children: paymentType === "qrcode" ? "I have sent the payment" : "Pay Now"
|
21327
21360
|
}
|
21328
21361
|
)
|
21329
|
-
] })
|
21330
|
-
] })
|
21331
|
-
|
21332
|
-
|
21333
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
21334
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21335
|
-
"button",
|
21362
|
+
] })
|
21363
|
+
] }),
|
21364
|
+
step === "processing" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21365
|
+
PaymentStatus,
|
21336
21366
|
{
|
21337
|
-
|
21338
|
-
|
21339
|
-
|
21340
|
-
children: "Back"
|
21367
|
+
status: "processing",
|
21368
|
+
theme: theme2,
|
21369
|
+
message: "Processing your payment..."
|
21341
21370
|
}
|
21342
21371
|
),
|
21343
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21344
|
-
|
21372
|
+
step === "success" && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
21373
|
+
PaymentStatus,
|
21345
21374
|
{
|
21346
|
-
|
21347
|
-
|
21348
|
-
|
21349
|
-
|
21350
|
-
|
21375
|
+
status: "success",
|
21376
|
+
theme: theme2,
|
21377
|
+
message: "Payment successful!",
|
21378
|
+
payment,
|
21379
|
+
transactionHash,
|
21380
|
+
selectedPaymentMethod,
|
21381
|
+
merchantName
|
21351
21382
|
}
|
21352
|
-
)
|
21353
|
-
|
21354
|
-
|
21355
|
-
|
21356
|
-
|
21357
|
-
|
21358
|
-
|
21359
|
-
|
21360
|
-
|
21361
|
-
|
21362
|
-
|
21363
|
-
|
21364
|
-
|
21365
|
-
|
21366
|
-
|
21367
|
-
|
21368
|
-
|
21369
|
-
|
21370
|
-
|
21371
|
-
|
21372
|
-
|
21373
|
-
|
21374
|
-
|
21375
|
-
|
21376
|
-
|
21377
|
-
|
21378
|
-
|
21379
|
-
|
21380
|
-
|
21381
|
-
|
21382
|
-
}
|
21383
|
-
|
21384
|
-
|
21385
|
-
|
21386
|
-
{
|
21387
|
-
type: "button",
|
21388
|
-
onClick: onBack,
|
21389
|
-
className: "mt-4 w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium rounded-md",
|
21390
|
-
children: "Try Again"
|
21391
|
-
}
|
21392
|
-
)
|
21393
|
-
] }),
|
21394
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center text-xs text-gray-500 flex items-center justify-center gap-1 mt-6", children: [
|
21395
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
21396
|
-
"Powered by ",
|
21397
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600", children: "Coinley" }),
|
21398
|
-
" - Secure Cryptocurrency Payments"
|
21399
|
-
] }),
|
21400
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "inline w-4 h-4 text-green-500 ml-1", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
|
21401
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2", fill: "none" }),
|
21402
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 12l2 2 4-4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
21403
|
-
] })
|
21404
|
-
] })
|
21405
|
-
] }) }) });
|
21383
|
+
),
|
21384
|
+
step === "error" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
21385
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21386
|
+
PaymentStatus,
|
21387
|
+
{
|
21388
|
+
status: "error",
|
21389
|
+
theme: theme2,
|
21390
|
+
message: error || "An error occurred while processing your payment."
|
21391
|
+
}
|
21392
|
+
),
|
21393
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
21394
|
+
"button",
|
21395
|
+
{
|
21396
|
+
type: "button",
|
21397
|
+
onClick: onBack,
|
21398
|
+
className: "mt-4 w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium rounded-md",
|
21399
|
+
children: "Try Again"
|
21400
|
+
}
|
21401
|
+
)
|
21402
|
+
] }),
|
21403
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center text-xs text-gray-500 flex items-center justify-center gap-1 mt-6", children: [
|
21404
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
21405
|
+
"Powered by ",
|
21406
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-purple-600", children: "Coinley" }),
|
21407
|
+
" - Secure Cryptocurrency Payments"
|
21408
|
+
] }),
|
21409
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { className: "inline w-4 h-4 text-green-500 ml-1", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", children: [
|
21410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2", fill: "none" }),
|
21411
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9 12l2 2 4-4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
21412
|
+
] })
|
21413
|
+
] })
|
21414
|
+
]
|
21415
|
+
}
|
21416
|
+
) }) });
|
21406
21417
|
};
|
21407
21418
|
const CoinleyCheckout = forwardRef(({
|
21408
21419
|
apiKey,
|