@reevit/react 0.2.6 → 0.2.7

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.mjs CHANGED
@@ -886,10 +886,16 @@ function ReevitCheckout({
886
886
  {
887
887
  publicKey: pspKey,
888
888
  email,
889
- amount,
890
- currency,
889
+ amount: paymentIntent?.amount ?? amount,
890
+ currency: paymentIntent?.currency ?? currency,
891
891
  reference,
892
- metadata,
892
+ metadata: {
893
+ ...metadata,
894
+ // Override with correct payment intent ID for webhook routing
895
+ // This ensures Paystack webhook includes the correct ID to find the payment
896
+ payment_id: paymentIntent?.id,
897
+ connection_id: paymentIntent?.connectionId ?? metadata?.connection_id
898
+ },
893
899
  channels: selectedMethod === "mobile_money" ? ["mobile_money"] : ["card"],
894
900
  onSuccess: handlePSPSuccess,
895
901
  onError: handlePSPError,