@reevit/react 0.3.8 → 0.4.1
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/dist/index.d.mts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +159 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +159 -13
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +152 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -258,6 +258,8 @@ declare function loadPaystackScript(): Promise<void>;
|
|
|
258
258
|
declare function PaystackBridge({ publicKey, email, phone, amount, currency, reference, accessCode, metadata, channels, onSuccess, onError, onClose, autoStart, }: PaystackBridgeProps): react_jsx_runtime.JSX.Element;
|
|
259
259
|
|
|
260
260
|
interface HubtelBridgeProps {
|
|
261
|
+
paymentId: string;
|
|
262
|
+
publicKey: string;
|
|
261
263
|
merchantAccount: string | number;
|
|
262
264
|
amount: number;
|
|
263
265
|
currency?: string;
|
|
@@ -266,13 +268,16 @@ interface HubtelBridgeProps {
|
|
|
266
268
|
phone?: string;
|
|
267
269
|
description?: string;
|
|
268
270
|
callbackUrl?: string;
|
|
271
|
+
/** Session token from server (recommended - credentials never exposed to client) */
|
|
272
|
+
hubtelSessionToken?: string;
|
|
273
|
+
/** Basic auth credential (legacy - credentials exposed to client, deprecated) */
|
|
269
274
|
basicAuth?: string;
|
|
270
275
|
onSuccess: (result: PaymentResult) => void;
|
|
271
276
|
onError: (error: PaymentError) => void;
|
|
272
277
|
onClose: () => void;
|
|
273
278
|
autoStart?: boolean;
|
|
274
279
|
}
|
|
275
|
-
declare function HubtelBridge({ merchantAccount, amount, reference, phone, description, callbackUrl, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
|
|
276
281
|
/**
|
|
277
282
|
* Opens Hubtel checkout modal directly
|
|
278
283
|
* Uses the @hubteljs/checkout npm package
|
|
@@ -553,6 +558,20 @@ interface PaymentIntentResponse {
|
|
|
553
558
|
net_amount: number;
|
|
554
559
|
reference?: string;
|
|
555
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Response from creating a Hubtel session token.
|
|
563
|
+
* The token provides secure, short-lived access to Hubtel checkout without exposing credentials.
|
|
564
|
+
*/
|
|
565
|
+
interface HubtelSessionResponse {
|
|
566
|
+
/** Short-lived session token for Hubtel checkout */
|
|
567
|
+
token: string;
|
|
568
|
+
/** Hubtel merchant account number */
|
|
569
|
+
merchantAccount: string;
|
|
570
|
+
/** Token expiry time in seconds */
|
|
571
|
+
expiresInSeconds: number;
|
|
572
|
+
/** Unix timestamp when the token expires */
|
|
573
|
+
expiresAt: number;
|
|
574
|
+
}
|
|
556
575
|
interface PaymentDetailResponse {
|
|
557
576
|
id: string;
|
|
558
577
|
connection_id: string;
|
|
@@ -632,6 +651,18 @@ declare class ReevitAPIClient {
|
|
|
632
651
|
data?: PaymentDetailResponse;
|
|
633
652
|
error?: PaymentError;
|
|
634
653
|
}>;
|
|
654
|
+
/**
|
|
655
|
+
* Creates a Hubtel session token for secure checkout.
|
|
656
|
+
* This endpoint generates a short-lived token that maps to Hubtel credentials server-side,
|
|
657
|
+
* avoiding exposure of sensitive credentials to the client.
|
|
658
|
+
*
|
|
659
|
+
* @param paymentId - The payment intent ID for Hubtel checkout
|
|
660
|
+
* @returns Hubtel session with token, merchant account, and expiry information
|
|
661
|
+
*/
|
|
662
|
+
createHubtelSession(paymentId: string): Promise<{
|
|
663
|
+
data?: HubtelSessionResponse;
|
|
664
|
+
error?: PaymentError;
|
|
665
|
+
}>;
|
|
635
666
|
/**
|
|
636
667
|
* Maps SDK payment method to backend format
|
|
637
668
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -258,6 +258,8 @@ declare function loadPaystackScript(): Promise<void>;
|
|
|
258
258
|
declare function PaystackBridge({ publicKey, email, phone, amount, currency, reference, accessCode, metadata, channels, onSuccess, onError, onClose, autoStart, }: PaystackBridgeProps): react_jsx_runtime.JSX.Element;
|
|
259
259
|
|
|
260
260
|
interface HubtelBridgeProps {
|
|
261
|
+
paymentId: string;
|
|
262
|
+
publicKey: string;
|
|
261
263
|
merchantAccount: string | number;
|
|
262
264
|
amount: number;
|
|
263
265
|
currency?: string;
|
|
@@ -266,13 +268,16 @@ interface HubtelBridgeProps {
|
|
|
266
268
|
phone?: string;
|
|
267
269
|
description?: string;
|
|
268
270
|
callbackUrl?: string;
|
|
271
|
+
/** Session token from server (recommended - credentials never exposed to client) */
|
|
272
|
+
hubtelSessionToken?: string;
|
|
273
|
+
/** Basic auth credential (legacy - credentials exposed to client, deprecated) */
|
|
269
274
|
basicAuth?: string;
|
|
270
275
|
onSuccess: (result: PaymentResult) => void;
|
|
271
276
|
onError: (error: PaymentError) => void;
|
|
272
277
|
onClose: () => void;
|
|
273
278
|
autoStart?: boolean;
|
|
274
279
|
}
|
|
275
|
-
declare function HubtelBridge({ merchantAccount, amount, reference, phone, description, callbackUrl, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
|
|
276
281
|
/**
|
|
277
282
|
* Opens Hubtel checkout modal directly
|
|
278
283
|
* Uses the @hubteljs/checkout npm package
|
|
@@ -553,6 +558,20 @@ interface PaymentIntentResponse {
|
|
|
553
558
|
net_amount: number;
|
|
554
559
|
reference?: string;
|
|
555
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Response from creating a Hubtel session token.
|
|
563
|
+
* The token provides secure, short-lived access to Hubtel checkout without exposing credentials.
|
|
564
|
+
*/
|
|
565
|
+
interface HubtelSessionResponse {
|
|
566
|
+
/** Short-lived session token for Hubtel checkout */
|
|
567
|
+
token: string;
|
|
568
|
+
/** Hubtel merchant account number */
|
|
569
|
+
merchantAccount: string;
|
|
570
|
+
/** Token expiry time in seconds */
|
|
571
|
+
expiresInSeconds: number;
|
|
572
|
+
/** Unix timestamp when the token expires */
|
|
573
|
+
expiresAt: number;
|
|
574
|
+
}
|
|
556
575
|
interface PaymentDetailResponse {
|
|
557
576
|
id: string;
|
|
558
577
|
connection_id: string;
|
|
@@ -632,6 +651,18 @@ declare class ReevitAPIClient {
|
|
|
632
651
|
data?: PaymentDetailResponse;
|
|
633
652
|
error?: PaymentError;
|
|
634
653
|
}>;
|
|
654
|
+
/**
|
|
655
|
+
* Creates a Hubtel session token for secure checkout.
|
|
656
|
+
* This endpoint generates a short-lived token that maps to Hubtel credentials server-side,
|
|
657
|
+
* avoiding exposure of sensitive credentials to the client.
|
|
658
|
+
*
|
|
659
|
+
* @param paymentId - The payment intent ID for Hubtel checkout
|
|
660
|
+
* @returns Hubtel session with token, merchant account, and expiry information
|
|
661
|
+
*/
|
|
662
|
+
createHubtelSession(paymentId: string): Promise<{
|
|
663
|
+
data?: HubtelSessionResponse;
|
|
664
|
+
error?: PaymentError;
|
|
665
|
+
}>;
|
|
635
666
|
/**
|
|
636
667
|
* Maps SDK payment method to backend format
|
|
637
668
|
*/
|
package/dist/index.js
CHANGED
|
@@ -212,6 +212,17 @@ var ReevitAPIClient = class {
|
|
|
212
212
|
async cancelPaymentIntent(paymentId) {
|
|
213
213
|
return this.request("POST", `/v1/payments/${paymentId}/cancel`);
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Creates a Hubtel session token for secure checkout.
|
|
217
|
+
* This endpoint generates a short-lived token that maps to Hubtel credentials server-side,
|
|
218
|
+
* avoiding exposure of sensitive credentials to the client.
|
|
219
|
+
*
|
|
220
|
+
* @param paymentId - The payment intent ID for Hubtel checkout
|
|
221
|
+
* @returns Hubtel session with token, merchant account, and expiry information
|
|
222
|
+
*/
|
|
223
|
+
async createHubtelSession(paymentId) {
|
|
224
|
+
return this.request("POST", `/v1/payments/hubtel/sessions/${paymentId}`);
|
|
225
|
+
}
|
|
215
226
|
/**
|
|
216
227
|
* Maps SDK payment method to backend format
|
|
217
228
|
*/
|
|
@@ -837,12 +848,15 @@ function PaystackBridge({
|
|
|
837
848
|
] }) });
|
|
838
849
|
}
|
|
839
850
|
function HubtelBridge({
|
|
851
|
+
paymentId,
|
|
852
|
+
publicKey,
|
|
840
853
|
merchantAccount,
|
|
841
854
|
amount,
|
|
842
855
|
reference,
|
|
843
856
|
phone,
|
|
844
857
|
description = "Payment",
|
|
845
858
|
callbackUrl,
|
|
859
|
+
hubtelSessionToken,
|
|
846
860
|
basicAuth,
|
|
847
861
|
onSuccess,
|
|
848
862
|
onError,
|
|
@@ -851,7 +865,46 @@ function HubtelBridge({
|
|
|
851
865
|
}) {
|
|
852
866
|
const initialized = react.useRef(false);
|
|
853
867
|
const checkoutRef = react.useRef(null);
|
|
868
|
+
const [authValue, setAuthValue] = react.useState("");
|
|
869
|
+
const [isLoading, setIsLoading] = react.useState(false);
|
|
870
|
+
react.useEffect(() => {
|
|
871
|
+
const fetchAuth = async () => {
|
|
872
|
+
if (hubtelSessionToken) {
|
|
873
|
+
setIsLoading(true);
|
|
874
|
+
try {
|
|
875
|
+
const client = createReevitClient({ publicKey });
|
|
876
|
+
const { data, error } = await client.createHubtelSession(paymentId);
|
|
877
|
+
if (error) {
|
|
878
|
+
onError({
|
|
879
|
+
code: "SESSION_ERROR",
|
|
880
|
+
message: error.message || "Failed to create Hubtel session",
|
|
881
|
+
recoverable: true
|
|
882
|
+
});
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
if (data) {
|
|
886
|
+
setAuthValue(data.token);
|
|
887
|
+
}
|
|
888
|
+
} catch (err) {
|
|
889
|
+
onError({
|
|
890
|
+
code: "SESSION_ERROR",
|
|
891
|
+
message: "Failed to create Hubtel session",
|
|
892
|
+
recoverable: true,
|
|
893
|
+
originalError: err
|
|
894
|
+
});
|
|
895
|
+
} finally {
|
|
896
|
+
setIsLoading(false);
|
|
897
|
+
}
|
|
898
|
+
} else if (basicAuth) {
|
|
899
|
+
setAuthValue(basicAuth);
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
fetchAuth();
|
|
903
|
+
}, [paymentId, publicKey, hubtelSessionToken, basicAuth, onError]);
|
|
854
904
|
const startPayment = react.useCallback(async () => {
|
|
905
|
+
if (isLoading || !authValue) {
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
855
908
|
try {
|
|
856
909
|
const checkout = new CheckoutSdk__default.default();
|
|
857
910
|
checkoutRef.current = checkout;
|
|
@@ -866,7 +919,9 @@ function HubtelBridge({
|
|
|
866
919
|
branding: "enabled",
|
|
867
920
|
callbackUrl: callbackUrl || window.location.href,
|
|
868
921
|
merchantAccount: typeof merchantAccount === "string" ? parseInt(merchantAccount, 10) : merchantAccount,
|
|
869
|
-
|
|
922
|
+
// Use session token or basicAuth for authentication
|
|
923
|
+
// Session tokens are base64-encoded credentials fetched securely from the server
|
|
924
|
+
basicAuth: authValue || ""
|
|
870
925
|
};
|
|
871
926
|
checkout.openModal({
|
|
872
927
|
purchaseInfo,
|
|
@@ -910,13 +965,13 @@ function HubtelBridge({
|
|
|
910
965
|
};
|
|
911
966
|
onError(error);
|
|
912
967
|
}
|
|
913
|
-
}, [merchantAccount, amount, reference, phone, description, callbackUrl,
|
|
968
|
+
}, [merchantAccount, amount, reference, phone, description, callbackUrl, authValue, isLoading, onSuccess, onError, onClose]);
|
|
914
969
|
react.useEffect(() => {
|
|
915
|
-
if (autoStart && !initialized.current) {
|
|
970
|
+
if (autoStart && !initialized.current && !isLoading && authValue) {
|
|
916
971
|
initialized.current = true;
|
|
917
972
|
startPayment();
|
|
918
973
|
}
|
|
919
|
-
}, [autoStart, startPayment]);
|
|
974
|
+
}, [autoStart, startPayment, isLoading, authValue]);
|
|
920
975
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-psp-bridge reevit-psp-bridge--hubtel", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-psp-bridge__loading", children: [
|
|
921
976
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-spinner" }),
|
|
922
977
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Connecting to Hubtel..." })
|
|
@@ -1388,6 +1443,87 @@ function loadStripeScript() {
|
|
|
1388
1443
|
});
|
|
1389
1444
|
return stripeScriptPromise;
|
|
1390
1445
|
}
|
|
1446
|
+
var getReevitStripeAppearance = () => {
|
|
1447
|
+
const isDarkMode = typeof window !== "undefined" && window.matchMedia?.("(prefers-color-scheme: dark)").matches;
|
|
1448
|
+
return {
|
|
1449
|
+
theme: isDarkMode ? "night" : "stripe",
|
|
1450
|
+
variables: {
|
|
1451
|
+
colorPrimary: isDarkMode ? "#fafafa" : "#171717",
|
|
1452
|
+
colorBackground: isDarkMode ? "#171717" : "#ffffff",
|
|
1453
|
+
colorText: isDarkMode ? "#fafafa" : "#171717",
|
|
1454
|
+
colorTextSecondary: isDarkMode ? "#a3a3a3" : "#737373",
|
|
1455
|
+
colorTextPlaceholder: isDarkMode ? "#737373" : "#a3a3a3",
|
|
1456
|
+
colorDanger: "#dc2626",
|
|
1457
|
+
fontFamily: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',
|
|
1458
|
+
fontSizeBase: "14px",
|
|
1459
|
+
fontSizeSm: "12px",
|
|
1460
|
+
fontSizeLg: "16px",
|
|
1461
|
+
fontWeightNormal: "400",
|
|
1462
|
+
fontWeightMedium: "500",
|
|
1463
|
+
fontWeightBold: "600",
|
|
1464
|
+
borderRadius: "10px",
|
|
1465
|
+
spacingUnit: "4px",
|
|
1466
|
+
spacingGridRow: "16px",
|
|
1467
|
+
spacingGridColumn: "16px"
|
|
1468
|
+
},
|
|
1469
|
+
rules: {
|
|
1470
|
+
".Input": {
|
|
1471
|
+
border: isDarkMode ? "1px solid rgba(255, 255, 255, 0.1)" : "1px solid #e5e5e5",
|
|
1472
|
+
boxShadow: "none",
|
|
1473
|
+
padding: "12px 14px",
|
|
1474
|
+
fontSize: "14px",
|
|
1475
|
+
backgroundColor: isDarkMode ? "#262626" : "#ffffff"
|
|
1476
|
+
},
|
|
1477
|
+
".Input:focus": {
|
|
1478
|
+
border: isDarkMode ? "1px solid #a3a3a3" : "1px solid #737373",
|
|
1479
|
+
boxShadow: "none",
|
|
1480
|
+
backgroundColor: isDarkMode ? "#262626" : "#fafafa"
|
|
1481
|
+
},
|
|
1482
|
+
".Input--invalid": {
|
|
1483
|
+
border: "1px solid #dc2626",
|
|
1484
|
+
boxShadow: "none"
|
|
1485
|
+
},
|
|
1486
|
+
".Label": {
|
|
1487
|
+
fontSize: "12px",
|
|
1488
|
+
fontWeight: "500",
|
|
1489
|
+
marginBottom: "6px",
|
|
1490
|
+
color: isDarkMode ? "#a3a3a3" : "#737373",
|
|
1491
|
+
textTransform: "none",
|
|
1492
|
+
letterSpacing: "0.02em"
|
|
1493
|
+
},
|
|
1494
|
+
".Tab": {
|
|
1495
|
+
border: isDarkMode ? "1px solid rgba(255, 255, 255, 0.1)" : "1px solid #e5e5e5",
|
|
1496
|
+
backgroundColor: "transparent",
|
|
1497
|
+
borderRadius: "10px",
|
|
1498
|
+
padding: "12px 14px"
|
|
1499
|
+
},
|
|
1500
|
+
".Tab:hover": {
|
|
1501
|
+
border: isDarkMode ? "1px solid #a3a3a3" : "1px solid #737373",
|
|
1502
|
+
backgroundColor: isDarkMode ? "#262626" : "#fafafa"
|
|
1503
|
+
},
|
|
1504
|
+
".Tab--selected": {
|
|
1505
|
+
border: isDarkMode ? "1px solid #fafafa" : "1px solid #171717",
|
|
1506
|
+
backgroundColor: isDarkMode ? "#262626" : "#fafafa"
|
|
1507
|
+
},
|
|
1508
|
+
".TabIcon": {
|
|
1509
|
+
marginRight: "8px"
|
|
1510
|
+
},
|
|
1511
|
+
".Block": {
|
|
1512
|
+
border: isDarkMode ? "1px solid rgba(255, 255, 255, 0.1)" : "1px solid #e5e5e5",
|
|
1513
|
+
borderRadius: "10px",
|
|
1514
|
+
backgroundColor: isDarkMode ? "#262626" : "#ffffff",
|
|
1515
|
+
padding: "12px 14px"
|
|
1516
|
+
},
|
|
1517
|
+
".CheckboxInput": {
|
|
1518
|
+
border: isDarkMode ? "1px solid rgba(255, 255, 255, 0.1)" : "1px solid #e5e5e5"
|
|
1519
|
+
},
|
|
1520
|
+
".CheckboxInput--checked": {
|
|
1521
|
+
backgroundColor: isDarkMode ? "#fafafa" : "#171717",
|
|
1522
|
+
borderColor: isDarkMode ? "#fafafa" : "#171717"
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1391
1527
|
function StripeBridge({
|
|
1392
1528
|
publishableKey,
|
|
1393
1529
|
clientSecret,
|
|
@@ -1415,9 +1551,10 @@ function StripeBridge({
|
|
|
1415
1551
|
throw new Error("Stripe not available");
|
|
1416
1552
|
}
|
|
1417
1553
|
stripeRef.current = window.Stripe(publishableKey);
|
|
1554
|
+
const stripeAppearance = appearance || getReevitStripeAppearance();
|
|
1418
1555
|
elementsRef.current = stripeRef.current.elements({
|
|
1419
1556
|
clientSecret,
|
|
1420
|
-
appearance:
|
|
1557
|
+
appearance: stripeAppearance
|
|
1421
1558
|
});
|
|
1422
1559
|
paymentElementRef.current = elementsRef.current.create("payment");
|
|
1423
1560
|
if (containerRef.current) {
|
|
@@ -1487,6 +1624,12 @@ function StripeBridge({
|
|
|
1487
1624
|
setIsSubmitting(false);
|
|
1488
1625
|
}
|
|
1489
1626
|
}, [onSuccess, onError]);
|
|
1627
|
+
const formattedAmount = new Intl.NumberFormat("en-US", {
|
|
1628
|
+
style: "currency",
|
|
1629
|
+
currency: currency.toUpperCase(),
|
|
1630
|
+
minimumFractionDigits: 2,
|
|
1631
|
+
maximumFractionDigits: 2
|
|
1632
|
+
}).format(amount / 100);
|
|
1490
1633
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-stripe-bridge", children: [
|
|
1491
1634
|
isLoading && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-stripe-loading", children: [
|
|
1492
1635
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-spinner" }),
|
|
@@ -1500,8 +1643,8 @@ function StripeBridge({
|
|
|
1500
1643
|
style: { display: isLoading ? "none" : "block", minHeight: "200px" }
|
|
1501
1644
|
}
|
|
1502
1645
|
),
|
|
1503
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-stripe-error", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) }),
|
|
1504
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-stripe-actions", children: [
|
|
1646
|
+
error && !isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-stripe-error", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: error }) }),
|
|
1647
|
+
!isLoading && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-stripe-actions", children: [
|
|
1505
1648
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1506
1649
|
"button",
|
|
1507
1650
|
{
|
|
@@ -1509,11 +1652,12 @@ function StripeBridge({
|
|
|
1509
1652
|
className: "reevit-submit-btn",
|
|
1510
1653
|
onClick: handleSubmit,
|
|
1511
1654
|
disabled: isLoading || isSubmitting,
|
|
1512
|
-
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.
|
|
1655
|
+
children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1656
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-spinner", style: { width: "16px", height: "16px" } }),
|
|
1657
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Processing..." })
|
|
1658
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1513
1659
|
"Pay ",
|
|
1514
|
-
|
|
1515
|
-
" ",
|
|
1516
|
-
(amount / 100).toFixed(2)
|
|
1660
|
+
formattedAmount
|
|
1517
1661
|
] })
|
|
1518
1662
|
}
|
|
1519
1663
|
),
|
|
@@ -1746,14 +1890,16 @@ function ReevitCheckout({
|
|
|
1746
1890
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1747
1891
|
HubtelBridge,
|
|
1748
1892
|
{
|
|
1749
|
-
|
|
1893
|
+
paymentId: paymentIntent?.id || "",
|
|
1894
|
+
publicKey,
|
|
1895
|
+
merchantAccount: pspKey,
|
|
1750
1896
|
amount: paymentIntent?.amount ?? amount,
|
|
1751
1897
|
currency: paymentIntent?.currency ?? currency,
|
|
1752
1898
|
reference: paymentIntent?.reference || reference,
|
|
1753
1899
|
email,
|
|
1754
1900
|
phone: momoData?.phone || phone,
|
|
1755
1901
|
description: `Payment ${paymentIntent?.reference || reference || ""}`,
|
|
1756
|
-
|
|
1902
|
+
hubtelSessionToken: paymentIntent?.id ? paymentIntent.id : void 0,
|
|
1757
1903
|
onSuccess: handlePSPSuccess,
|
|
1758
1904
|
onError: (err) => handlePSPError(err),
|
|
1759
1905
|
onClose: handlePSPClose
|