@reevit/react 0.5.3 → 0.5.4
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 +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -332,7 +332,7 @@ function reevitReducer(state, action) {
|
|
|
332
332
|
case "INIT_ERROR":
|
|
333
333
|
return { ...state, status: "failed", error: action.payload };
|
|
334
334
|
case "SELECT_METHOD":
|
|
335
|
-
return { ...state, status: "method_selected", selectedMethod: action.payload
|
|
335
|
+
return { ...state, status: "method_selected", selectedMethod: action.payload };
|
|
336
336
|
case "PROCESS_START":
|
|
337
337
|
return { ...state, status: "processing", error: null };
|
|
338
338
|
case "PROCESS_SUCCESS":
|
|
@@ -423,6 +423,7 @@ function mapToPaymentIntent(response, config) {
|
|
|
423
423
|
availableMethods: config.paymentMethods || ["card", "mobile_money"],
|
|
424
424
|
reference: response.reference || response.id,
|
|
425
425
|
// Use backend reference or fallback to ID
|
|
426
|
+
orgId: response.org_id,
|
|
426
427
|
connectionId: response.connection_id,
|
|
427
428
|
provider: response.provider,
|
|
428
429
|
feeAmount: response.fee_amount,
|
|
@@ -1128,7 +1129,6 @@ function PaystackBridge({
|
|
|
1128
1129
|
if (!window.PaystackPop) {
|
|
1129
1130
|
throw new Error("Paystack script loaded but PaystackPop not available");
|
|
1130
1131
|
}
|
|
1131
|
-
const safeMetadata = accessCode ? void 0 : metadata;
|
|
1132
1132
|
const setupConfig = {
|
|
1133
1133
|
key: publicKey,
|
|
1134
1134
|
email,
|
|
@@ -1137,7 +1137,7 @@ function PaystackBridge({
|
|
|
1137
1137
|
currency,
|
|
1138
1138
|
ref: reference,
|
|
1139
1139
|
access_code: accessCode,
|
|
1140
|
-
metadata
|
|
1140
|
+
metadata,
|
|
1141
1141
|
channels,
|
|
1142
1142
|
callback: (response) => {
|
|
1143
1143
|
console.log("[PaystackBridge] Callback received", response);
|
|
@@ -2395,6 +2395,7 @@ function ReevitCheckout({
|
|
|
2395
2395
|
const pspKey = paymentIntent?.pspPublicKey || publicKey || "";
|
|
2396
2396
|
const bridgeMetadata = {
|
|
2397
2397
|
...metadata,
|
|
2398
|
+
org_id: paymentIntent?.orgId ?? metadata?.org_id,
|
|
2398
2399
|
payment_id: paymentIntent?.id,
|
|
2399
2400
|
connection_id: paymentIntent?.connectionId ?? metadata?.connection_id,
|
|
2400
2401
|
customer_phone: momoData?.phone || phone
|