@reevit/react 0.1.0 → 0.2.0

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 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,