@reevit/react 0.1.0 → 0.2.2
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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +232 -132
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -98,6 +98,8 @@ interface PaymentIntent {
|
|
|
98
98
|
id: string;
|
|
99
99
|
/** Client secret for authenticating client-side operations */
|
|
100
100
|
clientSecret: string;
|
|
101
|
+
/** PSP's public key for client-side SDK initialization */
|
|
102
|
+
pspPublicKey?: string;
|
|
101
103
|
/** Amount in smallest currency unit */
|
|
102
104
|
amount: number;
|
|
103
105
|
/** Currency code */
|
|
@@ -523,6 +525,7 @@ interface PaymentIntentResponse {
|
|
|
523
525
|
provider: string;
|
|
524
526
|
status: string;
|
|
525
527
|
client_secret: string;
|
|
528
|
+
psp_public_key?: string;
|
|
526
529
|
amount: number;
|
|
527
530
|
currency: string;
|
|
528
531
|
fee_amount: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ interface PaymentIntent {
|
|
|
98
98
|
id: string;
|
|
99
99
|
/** Client secret for authenticating client-side operations */
|
|
100
100
|
clientSecret: string;
|
|
101
|
+
/** PSP's public key for client-side SDK initialization */
|
|
102
|
+
pspPublicKey?: string;
|
|
101
103
|
/** Amount in smallest currency unit */
|
|
102
104
|
amount: number;
|
|
103
105
|
/** Currency code */
|
|
@@ -523,6 +525,7 @@ interface PaymentIntentResponse {
|
|
|
523
525
|
provider: string;
|
|
524
526
|
status: string;
|
|
525
527
|
client_secret: string;
|
|
528
|
+
psp_public_key?: string;
|
|
526
529
|
amount: number;
|
|
527
530
|
currency: string;
|
|
528
531
|
fee_amount: number;
|
package/dist/index.js
CHANGED
|
@@ -252,6 +252,7 @@ function mapToPaymentIntent(response, config) {
|
|
|
252
252
|
return {
|
|
253
253
|
id: response.id,
|
|
254
254
|
clientSecret: response.client_secret,
|
|
255
|
+
pspPublicKey: response.psp_public_key,
|
|
255
256
|
amount: response.amount,
|
|
256
257
|
currency: response.currency,
|
|
257
258
|
status: response.status,
|
|
@@ -858,10 +859,11 @@ function ReevitCheckout({
|
|
|
858
859
|
] });
|
|
859
860
|
}
|
|
860
861
|
if (showPSPBridge) {
|
|
862
|
+
const pspKey = paymentIntent?.pspPublicKey || publicKey;
|
|
861
863
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
862
864
|
PaystackBridge,
|
|
863
865
|
{
|
|
864
|
-
publicKey,
|
|
866
|
+
publicKey: pspKey,
|
|
865
867
|
email,
|
|
866
868
|
amount,
|
|
867
869
|
currency,
|
|
@@ -918,7 +920,14 @@ function ReevitCheckout({
|
|
|
918
920
|
"aria-modal": "true",
|
|
919
921
|
children: [
|
|
920
922
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-modal__header", children: [
|
|
921
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-modal__branding", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
923
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-modal__branding", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
|
+
"img",
|
|
925
|
+
{
|
|
926
|
+
src: "https://i.imgur.com/bzUR5Lm.png",
|
|
927
|
+
alt: "Reevit",
|
|
928
|
+
className: "reevit-modal__logo"
|
|
929
|
+
}
|
|
930
|
+
) }),
|
|
922
931
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
923
932
|
"button",
|
|
924
933
|
{
|