@easypayment/medusa-paypal 0.1.7 → 0.1.9

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.
@@ -336,9 +336,6 @@ function AdditionalSettingsTab() {
336
336
  )
337
337
  ] }) });
338
338
  }
339
- function PayPalApplePayPage() {
340
- return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
341
- }
342
339
  const DEFAULT_FORM = {
343
340
  enabled: true,
344
341
  title: "Credit or Debit Card",
@@ -633,6 +630,9 @@ function AdvancedCardPaymentsTab() {
633
630
  )
634
631
  ] }) });
635
632
  }
633
+ function PayPalApplePayPage() {
634
+ return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
635
+ }
636
636
  const config = adminSdk.defineRouteConfig({
637
637
  label: "PayPal Connection",
638
638
  hide: true
@@ -1217,13 +1217,92 @@ function PayPalConnectionPage() {
1217
1217
  ` })
1218
1218
  ] });
1219
1219
  }
1220
+ function formatDate$2(value) {
1221
+ if (!value) {
1222
+ return "";
1223
+ }
1224
+ const parsed = new Date(value);
1225
+ if (Number.isNaN(parsed.getTime())) {
1226
+ return value;
1227
+ }
1228
+ return parsed.toLocaleString();
1229
+ }
1230
+ function PayPalAuditLogsPage() {
1231
+ const [logs, setLogs] = react.useState([]);
1232
+ const [loading, setLoading] = react.useState(false);
1233
+ const [error, setError] = react.useState(null);
1234
+ const fetchLogs = react.useCallback(async () => {
1235
+ try {
1236
+ setLoading(true);
1237
+ setError(null);
1238
+ const response = await fetch("/admin/paypal/audit-logs?limit=50", {
1239
+ credentials: "include",
1240
+ headers: {
1241
+ Accept: "application/json"
1242
+ }
1243
+ });
1244
+ if (!response.ok) {
1245
+ const message = await response.text().catch(() => "");
1246
+ throw new Error(message || "Failed to load audit logs.");
1247
+ }
1248
+ const data = await response.json().catch(() => ({}));
1249
+ setLogs((data == null ? void 0 : data.logs) || []);
1250
+ } catch (fetchError) {
1251
+ setError((fetchError == null ? void 0 : fetchError.message) || "Failed to load audit logs.");
1252
+ setLogs([]);
1253
+ } finally {
1254
+ setLoading(false);
1255
+ }
1256
+ }, []);
1257
+ react.useEffect(() => {
1258
+ fetchLogs();
1259
+ }, [fetchLogs]);
1260
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
1261
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1262
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Audit Logs" }),
1263
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-ui-fg-subtle", children: "Track administrative changes and credential events for PayPal configuration." })
1264
+ ] }),
1265
+ /* @__PURE__ */ jsxRuntime.jsx(PayPalTabs, {}),
1266
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-ui-border-base bg-ui-bg-base shadow-sm", children: [
1267
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-ui-border-base p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
1268
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold text-ui-fg-base", children: "Latest events" }),
1269
+ /* @__PURE__ */ jsxRuntime.jsx(
1270
+ "button",
1271
+ {
1272
+ type: "button",
1273
+ onClick: fetchLogs,
1274
+ className: "rounded-md border border-ui-border-base px-3 py-2 text-sm text-ui-fg-base",
1275
+ disabled: loading,
1276
+ children: loading ? "Refreshing..." : "Refresh"
1277
+ }
1278
+ )
1279
+ ] }) }),
1280
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
1281
+ error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600", children: error }) : null,
1282
+ !error && logs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-ui-fg-subtle", children: loading ? "Loading audit logs..." : "No audit log entries found yet." }) : null,
1283
+ logs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full text-left text-sm", children: [
1284
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "text-ui-fg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1285
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 pr-4 font-medium", children: "Timestamp" }),
1286
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 pr-4 font-medium", children: "Event" }),
1287
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 font-medium", children: "Details" })
1288
+ ] }) }),
1289
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: logs.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-t border-ui-border-base", children: [
1290
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: formatDate$2(entry.created_at) || "—" }),
1291
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: entry.event_type || "—" }),
1292
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 text-ui-fg-subtle", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "whitespace-pre-wrap rounded-md bg-ui-bg-subtle p-2 text-xs text-ui-fg-subtle", children: JSON.stringify(entry.metadata || {}, null, 2) }) })
1293
+ ] }, entry.id)) })
1294
+ ] }) }) : null
1295
+ ] })
1296
+ ] })
1297
+ ] }) });
1298
+ }
1220
1299
  const EMPTY_FILTERS = {
1221
1300
  dispute_id: "",
1222
1301
  status: "",
1223
1302
  order_id: "",
1224
1303
  cart_id: ""
1225
1304
  };
1226
- function formatDate$2(value) {
1305
+ function formatDate$1(value) {
1227
1306
  if (!value) {
1228
1307
  return "";
1229
1308
  }
@@ -1402,7 +1481,7 @@ function PayPalDisputesPage() {
1402
1481
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: dispute.amount ? `${dispute.amount} ${dispute.currency_code || ""}` : "-" }),
1403
1482
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: dispute.order_id || "-" }),
1404
1483
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: dispute.cart_id || "-" }),
1405
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-ui-fg-subtle", children: formatDate$2(dispute.updated_at || dispute.created_at) })
1484
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3 text-ui-fg-subtle", children: formatDate$1(dispute.updated_at || dispute.created_at) })
1406
1485
  ] }, dispute.id)) })
1407
1486
  ] }) }),
1408
1487
  error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-ui-border-base px-4 py-3 text-sm text-ui-fg-error", children: error }) : null
@@ -1412,85 +1491,6 @@ function PayPalDisputesPage() {
1412
1491
  function PayPalGooglePayPage() {
1413
1492
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
1414
1493
  }
1415
- function formatDate$1(value) {
1416
- if (!value) {
1417
- return "";
1418
- }
1419
- const parsed = new Date(value);
1420
- if (Number.isNaN(parsed.getTime())) {
1421
- return value;
1422
- }
1423
- return parsed.toLocaleString();
1424
- }
1425
- function PayPalAuditLogsPage() {
1426
- const [logs, setLogs] = react.useState([]);
1427
- const [loading, setLoading] = react.useState(false);
1428
- const [error, setError] = react.useState(null);
1429
- const fetchLogs = react.useCallback(async () => {
1430
- try {
1431
- setLoading(true);
1432
- setError(null);
1433
- const response = await fetch("/admin/paypal/audit-logs?limit=50", {
1434
- credentials: "include",
1435
- headers: {
1436
- Accept: "application/json"
1437
- }
1438
- });
1439
- if (!response.ok) {
1440
- const message = await response.text().catch(() => "");
1441
- throw new Error(message || "Failed to load audit logs.");
1442
- }
1443
- const data = await response.json().catch(() => ({}));
1444
- setLogs((data == null ? void 0 : data.logs) || []);
1445
- } catch (fetchError) {
1446
- setError((fetchError == null ? void 0 : fetchError.message) || "Failed to load audit logs.");
1447
- setLogs([]);
1448
- } finally {
1449
- setLoading(false);
1450
- }
1451
- }, []);
1452
- react.useEffect(() => {
1453
- fetchLogs();
1454
- }, [fetchLogs]);
1455
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
1456
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1457
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Audit Logs" }),
1458
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-ui-fg-subtle", children: "Track administrative changes and credential events for PayPal configuration." })
1459
- ] }),
1460
- /* @__PURE__ */ jsxRuntime.jsx(PayPalTabs, {}),
1461
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-ui-border-base bg-ui-bg-base shadow-sm", children: [
1462
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-ui-border-base p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
1463
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold text-ui-fg-base", children: "Latest events" }),
1464
- /* @__PURE__ */ jsxRuntime.jsx(
1465
- "button",
1466
- {
1467
- type: "button",
1468
- onClick: fetchLogs,
1469
- className: "rounded-md border border-ui-border-base px-3 py-2 text-sm text-ui-fg-base",
1470
- disabled: loading,
1471
- children: loading ? "Refreshing..." : "Refresh"
1472
- }
1473
- )
1474
- ] }) }),
1475
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
1476
- error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600", children: error }) : null,
1477
- !error && logs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-ui-fg-subtle", children: loading ? "Loading audit logs..." : "No audit log entries found yet." }) : null,
1478
- logs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full text-left text-sm", children: [
1479
- /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "text-ui-fg-muted", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1480
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 pr-4 font-medium", children: "Timestamp" }),
1481
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 pr-4 font-medium", children: "Event" }),
1482
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "pb-2 font-medium", children: "Details" })
1483
- ] }) }),
1484
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: logs.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-t border-ui-border-base", children: [
1485
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: formatDate$1(entry.created_at) || "—" }),
1486
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: entry.event_type || "—" }),
1487
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 text-ui-fg-subtle", children: /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "whitespace-pre-wrap rounded-md bg-ui-bg-subtle p-2 text-xs text-ui-fg-subtle", children: JSON.stringify(entry.metadata || {}, null, 2) }) })
1488
- ] }, entry.id)) })
1489
- ] }) }) : null
1490
- ] })
1491
- ] })
1492
- ] }) });
1493
- }
1494
1494
  function PayPalPayLaterMessagingPage() {
1495
1495
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
1496
1496
  }
@@ -2052,18 +2052,22 @@ const routeModule = {
2052
2052
  Component: AdditionalSettingsTab,
2053
2053
  path: "/settings/paypal/additional-settings"
2054
2054
  },
2055
- {
2056
- Component: PayPalApplePayPage,
2057
- path: "/settings/paypal/apple-pay"
2058
- },
2059
2055
  {
2060
2056
  Component: AdvancedCardPaymentsTab,
2061
2057
  path: "/settings/paypal/advanced-card-payments"
2062
2058
  },
2059
+ {
2060
+ Component: PayPalApplePayPage,
2061
+ path: "/settings/paypal/apple-pay"
2062
+ },
2063
2063
  {
2064
2064
  Component: PayPalConnectionPage,
2065
2065
  path: "/settings/paypal/connection"
2066
2066
  },
2067
+ {
2068
+ Component: PayPalAuditLogsPage,
2069
+ path: "/settings/paypal/audit-logs"
2070
+ },
2067
2071
  {
2068
2072
  Component: PayPalDisputesPage,
2069
2073
  path: "/settings/paypal/disputes"
@@ -2072,10 +2076,6 @@ const routeModule = {
2072
2076
  Component: PayPalGooglePayPage,
2073
2077
  path: "/settings/paypal/google-pay"
2074
2078
  },
2075
- {
2076
- Component: PayPalAuditLogsPage,
2077
- path: "/settings/paypal/audit-logs"
2078
- },
2079
2079
  {
2080
2080
  Component: PayPalPayLaterMessagingPage,
2081
2081
  path: "/settings/paypal/pay-later-messaging"
@@ -335,9 +335,6 @@ function AdditionalSettingsTab() {
335
335
  )
336
336
  ] }) });
337
337
  }
338
- function PayPalApplePayPage() {
339
- return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
340
- }
341
338
  const DEFAULT_FORM = {
342
339
  enabled: true,
343
340
  title: "Credit or Debit Card",
@@ -632,6 +629,9 @@ function AdvancedCardPaymentsTab() {
632
629
  )
633
630
  ] }) });
634
631
  }
632
+ function PayPalApplePayPage() {
633
+ return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
634
+ }
635
635
  const config = defineRouteConfig({
636
636
  label: "PayPal Connection",
637
637
  hide: true
@@ -1216,13 +1216,92 @@ function PayPalConnectionPage() {
1216
1216
  ` })
1217
1217
  ] });
1218
1218
  }
1219
+ function formatDate$2(value) {
1220
+ if (!value) {
1221
+ return "";
1222
+ }
1223
+ const parsed = new Date(value);
1224
+ if (Number.isNaN(parsed.getTime())) {
1225
+ return value;
1226
+ }
1227
+ return parsed.toLocaleString();
1228
+ }
1229
+ function PayPalAuditLogsPage() {
1230
+ const [logs, setLogs] = useState([]);
1231
+ const [loading, setLoading] = useState(false);
1232
+ const [error, setError] = useState(null);
1233
+ const fetchLogs = useCallback(async () => {
1234
+ try {
1235
+ setLoading(true);
1236
+ setError(null);
1237
+ const response = await fetch("/admin/paypal/audit-logs?limit=50", {
1238
+ credentials: "include",
1239
+ headers: {
1240
+ Accept: "application/json"
1241
+ }
1242
+ });
1243
+ if (!response.ok) {
1244
+ const message = await response.text().catch(() => "");
1245
+ throw new Error(message || "Failed to load audit logs.");
1246
+ }
1247
+ const data = await response.json().catch(() => ({}));
1248
+ setLogs((data == null ? void 0 : data.logs) || []);
1249
+ } catch (fetchError) {
1250
+ setError((fetchError == null ? void 0 : fetchError.message) || "Failed to load audit logs.");
1251
+ setLogs([]);
1252
+ } finally {
1253
+ setLoading(false);
1254
+ }
1255
+ }, []);
1256
+ useEffect(() => {
1257
+ fetchLogs();
1258
+ }, [fetchLogs]);
1259
+ return /* @__PURE__ */ jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
1260
+ /* @__PURE__ */ jsxs("div", { children: [
1261
+ /* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Audit Logs" }),
1262
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-ui-fg-subtle", children: "Track administrative changes and credential events for PayPal configuration." })
1263
+ ] }),
1264
+ /* @__PURE__ */ jsx(PayPalTabs, {}),
1265
+ /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-ui-border-base bg-ui-bg-base shadow-sm", children: [
1266
+ /* @__PURE__ */ jsx("div", { className: "border-b border-ui-border-base p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
1267
+ /* @__PURE__ */ jsx("div", { className: "text-base font-semibold text-ui-fg-base", children: "Latest events" }),
1268
+ /* @__PURE__ */ jsx(
1269
+ "button",
1270
+ {
1271
+ type: "button",
1272
+ onClick: fetchLogs,
1273
+ className: "rounded-md border border-ui-border-base px-3 py-2 text-sm text-ui-fg-base",
1274
+ disabled: loading,
1275
+ children: loading ? "Refreshing..." : "Refresh"
1276
+ }
1277
+ )
1278
+ ] }) }),
1279
+ /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
1280
+ error ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600", children: error }) : null,
1281
+ !error && logs.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-sm text-ui-fg-subtle", children: loading ? "Loading audit logs..." : "No audit log entries found yet." }) : null,
1282
+ logs.length > 0 ? /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full text-left text-sm", children: [
1283
+ /* @__PURE__ */ jsx("thead", { className: "text-ui-fg-muted", children: /* @__PURE__ */ jsxs("tr", { children: [
1284
+ /* @__PURE__ */ jsx("th", { className: "pb-2 pr-4 font-medium", children: "Timestamp" }),
1285
+ /* @__PURE__ */ jsx("th", { className: "pb-2 pr-4 font-medium", children: "Event" }),
1286
+ /* @__PURE__ */ jsx("th", { className: "pb-2 font-medium", children: "Details" })
1287
+ ] }) }),
1288
+ /* @__PURE__ */ jsx("tbody", { children: logs.map((entry) => /* @__PURE__ */ jsxs("tr", { className: "border-t border-ui-border-base", children: [
1289
+ /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: formatDate$2(entry.created_at) || "—" }),
1290
+ /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: entry.event_type || "—" }),
1291
+ /* @__PURE__ */ jsx("td", { className: "py-3 text-ui-fg-subtle", children: /* @__PURE__ */ jsx("pre", { className: "whitespace-pre-wrap rounded-md bg-ui-bg-subtle p-2 text-xs text-ui-fg-subtle", children: JSON.stringify(entry.metadata || {}, null, 2) }) })
1292
+ ] }, entry.id)) })
1293
+ ] }) }) : null
1294
+ ] })
1295
+ ] })
1296
+ ] }) });
1297
+ }
1219
1298
  const EMPTY_FILTERS = {
1220
1299
  dispute_id: "",
1221
1300
  status: "",
1222
1301
  order_id: "",
1223
1302
  cart_id: ""
1224
1303
  };
1225
- function formatDate$2(value) {
1304
+ function formatDate$1(value) {
1226
1305
  if (!value) {
1227
1306
  return "";
1228
1307
  }
@@ -1401,7 +1480,7 @@ function PayPalDisputesPage() {
1401
1480
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: dispute.amount ? `${dispute.amount} ${dispute.currency_code || ""}` : "-" }),
1402
1481
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: dispute.order_id || "-" }),
1403
1482
  /* @__PURE__ */ jsx("td", { className: "px-4 py-3", children: dispute.cart_id || "-" }),
1404
- /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-ui-fg-subtle", children: formatDate$2(dispute.updated_at || dispute.created_at) })
1483
+ /* @__PURE__ */ jsx("td", { className: "px-4 py-3 text-ui-fg-subtle", children: formatDate$1(dispute.updated_at || dispute.created_at) })
1405
1484
  ] }, dispute.id)) })
1406
1485
  ] }) }),
1407
1486
  error ? /* @__PURE__ */ jsx("div", { className: "border-t border-ui-border-base px-4 py-3 text-sm text-ui-fg-error", children: error }) : null
@@ -1411,85 +1490,6 @@ function PayPalDisputesPage() {
1411
1490
  function PayPalGooglePayPage() {
1412
1491
  return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
1413
1492
  }
1414
- function formatDate$1(value) {
1415
- if (!value) {
1416
- return "";
1417
- }
1418
- const parsed = new Date(value);
1419
- if (Number.isNaN(parsed.getTime())) {
1420
- return value;
1421
- }
1422
- return parsed.toLocaleString();
1423
- }
1424
- function PayPalAuditLogsPage() {
1425
- const [logs, setLogs] = useState([]);
1426
- const [loading, setLoading] = useState(false);
1427
- const [error, setError] = useState(null);
1428
- const fetchLogs = useCallback(async () => {
1429
- try {
1430
- setLoading(true);
1431
- setError(null);
1432
- const response = await fetch("/admin/paypal/audit-logs?limit=50", {
1433
- credentials: "include",
1434
- headers: {
1435
- Accept: "application/json"
1436
- }
1437
- });
1438
- if (!response.ok) {
1439
- const message = await response.text().catch(() => "");
1440
- throw new Error(message || "Failed to load audit logs.");
1441
- }
1442
- const data = await response.json().catch(() => ({}));
1443
- setLogs((data == null ? void 0 : data.logs) || []);
1444
- } catch (fetchError) {
1445
- setError((fetchError == null ? void 0 : fetchError.message) || "Failed to load audit logs.");
1446
- setLogs([]);
1447
- } finally {
1448
- setLoading(false);
1449
- }
1450
- }, []);
1451
- useEffect(() => {
1452
- fetchLogs();
1453
- }, [fetchLogs]);
1454
- return /* @__PURE__ */ jsx("div", { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
1455
- /* @__PURE__ */ jsxs("div", { children: [
1456
- /* @__PURE__ */ jsx("h1", { className: "text-xl font-semibold text-ui-fg-base", children: "PayPal Audit Logs" }),
1457
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-ui-fg-subtle", children: "Track administrative changes and credential events for PayPal configuration." })
1458
- ] }),
1459
- /* @__PURE__ */ jsx(PayPalTabs, {}),
1460
- /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-ui-border-base bg-ui-bg-base shadow-sm", children: [
1461
- /* @__PURE__ */ jsx("div", { className: "border-b border-ui-border-base p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
1462
- /* @__PURE__ */ jsx("div", { className: "text-base font-semibold text-ui-fg-base", children: "Latest events" }),
1463
- /* @__PURE__ */ jsx(
1464
- "button",
1465
- {
1466
- type: "button",
1467
- onClick: fetchLogs,
1468
- className: "rounded-md border border-ui-border-base px-3 py-2 text-sm text-ui-fg-base",
1469
- disabled: loading,
1470
- children: loading ? "Refreshing..." : "Refresh"
1471
- }
1472
- )
1473
- ] }) }),
1474
- /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
1475
- error ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-600", children: error }) : null,
1476
- !error && logs.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-sm text-ui-fg-subtle", children: loading ? "Loading audit logs..." : "No audit log entries found yet." }) : null,
1477
- logs.length > 0 ? /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "min-w-full text-left text-sm", children: [
1478
- /* @__PURE__ */ jsx("thead", { className: "text-ui-fg-muted", children: /* @__PURE__ */ jsxs("tr", { children: [
1479
- /* @__PURE__ */ jsx("th", { className: "pb-2 pr-4 font-medium", children: "Timestamp" }),
1480
- /* @__PURE__ */ jsx("th", { className: "pb-2 pr-4 font-medium", children: "Event" }),
1481
- /* @__PURE__ */ jsx("th", { className: "pb-2 font-medium", children: "Details" })
1482
- ] }) }),
1483
- /* @__PURE__ */ jsx("tbody", { children: logs.map((entry) => /* @__PURE__ */ jsxs("tr", { className: "border-t border-ui-border-base", children: [
1484
- /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: formatDate$1(entry.created_at) || "—" }),
1485
- /* @__PURE__ */ jsx("td", { className: "py-3 pr-4 text-ui-fg-base", children: entry.event_type || "—" }),
1486
- /* @__PURE__ */ jsx("td", { className: "py-3 text-ui-fg-subtle", children: /* @__PURE__ */ jsx("pre", { className: "whitespace-pre-wrap rounded-md bg-ui-bg-subtle p-2 text-xs text-ui-fg-subtle", children: JSON.stringify(entry.metadata || {}, null, 2) }) })
1487
- ] }, entry.id)) })
1488
- ] }) }) : null
1489
- ] })
1490
- ] })
1491
- ] }) });
1492
- }
1493
1493
  function PayPalPayLaterMessagingPage() {
1494
1494
  return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
1495
1495
  }
@@ -2051,18 +2051,22 @@ const routeModule = {
2051
2051
  Component: AdditionalSettingsTab,
2052
2052
  path: "/settings/paypal/additional-settings"
2053
2053
  },
2054
- {
2055
- Component: PayPalApplePayPage,
2056
- path: "/settings/paypal/apple-pay"
2057
- },
2058
2054
  {
2059
2055
  Component: AdvancedCardPaymentsTab,
2060
2056
  path: "/settings/paypal/advanced-card-payments"
2061
2057
  },
2058
+ {
2059
+ Component: PayPalApplePayPage,
2060
+ path: "/settings/paypal/apple-pay"
2061
+ },
2062
2062
  {
2063
2063
  Component: PayPalConnectionPage,
2064
2064
  path: "/settings/paypal/connection"
2065
2065
  },
2066
+ {
2067
+ Component: PayPalAuditLogsPage,
2068
+ path: "/settings/paypal/audit-logs"
2069
+ },
2066
2070
  {
2067
2071
  Component: PayPalDisputesPage,
2068
2072
  path: "/settings/paypal/disputes"
@@ -2071,10 +2075,6 @@ const routeModule = {
2071
2075
  Component: PayPalGooglePayPage,
2072
2076
  path: "/settings/paypal/google-pay"
2073
2077
  },
2074
- {
2075
- Component: PayPalAuditLogsPage,
2076
- path: "/settings/paypal/audit-logs"
2077
- },
2078
2078
  {
2079
2079
  Component: PayPalPayLaterMessagingPage,
2080
2080
  path: "/settings/paypal/pay-later-messaging"
@@ -13,7 +13,7 @@ async function paypalReconcile(container) {
13
13
  const paymentSessionService = container.resolve("payment_session");
14
14
  const paypal = container.resolve("paypal_onboarding");
15
15
  const sessions = await paymentSessionService.list({
16
- provider_id: ["paypal", "paypal_card"],
16
+ provider_id: ["pp_paypal_paypal", "pp_paypal_card_paypal_card"],
17
17
  status: ["pending", "authorized"],
18
18
  });
19
19
  let sessionsChecked = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"paypal-reconcile.js","sourceRoot":"","sources":["../../../../src/jobs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ACD,MAAM,MAAM,CAAC,SAAS,CAAC;gBACrB,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE,0CAA0C,OAAO,GAAG;gBAC7D,QAAQ,EAAE;oBACR,UAAU,EAAE,OAAO,CAAC,EAAE;iBACvB;aACF,CAAC,CAAA;YACF,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;YACzC,gBAAgB,EAAE,eAAe;YACjC,gBAAgB,EAAE,eAAe;YACjC,WAAW,EAAE,UAAU;YACvB,aAAa,EAAE,WAAW;YAC1B,mBAAmB,EAAE,gBAAgB;YACrC,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI;SACpD,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,MAAM,CAAC,0BAA0B,CAAC;YACtC,MAAM,EAAE,QAAQ;YAChB,gBAAgB,EAAE,eAAe;YACjC,gBAAgB,EAAE,eAAe;YACjC,WAAW,EAAE,UAAU;YACvB,aAAa,EAAE,WAAW;YAC1B,mBAAmB,EAAE,gBAAgB;YACrC,aAAa,EAAE,KAAK,EAAE,OAAO;SAC9B,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAEY,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,cAAc;CACzB,CAAA"}
@@ -1,6 +1,5 @@
1
- export declare const PAYPAL_WALLET_PROVIDER_IDS: readonly ["paypal"];
2
- export declare const PAYPAL_CARD_PROVIDER_IDS: readonly ["paypal_card"];
3
- export declare const PAYPAL_PROVIDER_IDS: readonly ["paypal", "paypal_card"];
4
- export declare const normalizePayPalProviderId: (providerId?: string | null) => string;
1
+ export declare const PAYPAL_WALLET_PROVIDER_ID: "pp_paypal_paypal";
2
+ export declare const PAYPAL_CARD_PROVIDER_ID: "pp_paypal_card_paypal_card";
3
+ export declare const PAYPAL_PROVIDER_IDS: readonly ["pp_paypal_paypal", "pp_paypal_card_paypal_card"];
5
4
  export declare const isPayPalProviderId: (providerId?: string | null) => boolean;
6
5
  //# sourceMappingURL=provider-ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider-ids.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/utils/provider-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,qBAAsB,CAAA;AAC7D,eAAO,MAAM,wBAAwB,0BAA2B,CAAA;AAEhE,eAAO,MAAM,mBAAmB,oCAGtB,CAAA;AAEV,eAAO,MAAM,yBAAyB,GAAI,aAAa,MAAM,GAAG,IAAI,WASnE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,GAAG,IAAI,YAO5D,CAAA"}
1
+ {"version":3,"file":"provider-ids.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/paypal/utils/provider-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,EAAG,kBAA2B,CAAA;AACpE,eAAO,MAAM,uBAAuB,EAAG,4BAAqC,CAAA;AAE5E,eAAO,MAAM,mBAAmB,6DAGtB,CAAA;AAEV,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,GAAG,IAAI,YAM5D,CAAA"}
@@ -1,30 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPayPalProviderId = exports.normalizePayPalProviderId = exports.PAYPAL_PROVIDER_IDS = exports.PAYPAL_CARD_PROVIDER_IDS = exports.PAYPAL_WALLET_PROVIDER_IDS = void 0;
4
- exports.PAYPAL_WALLET_PROVIDER_IDS = ["paypal"];
5
- exports.PAYPAL_CARD_PROVIDER_IDS = ["paypal_card"];
3
+ exports.isPayPalProviderId = exports.PAYPAL_PROVIDER_IDS = exports.PAYPAL_CARD_PROVIDER_ID = exports.PAYPAL_WALLET_PROVIDER_ID = void 0;
4
+ exports.PAYPAL_WALLET_PROVIDER_ID = "pp_paypal_paypal";
5
+ exports.PAYPAL_CARD_PROVIDER_ID = "pp_paypal_card_paypal_card";
6
6
  exports.PAYPAL_PROVIDER_IDS = [
7
- ...exports.PAYPAL_WALLET_PROVIDER_IDS,
8
- ...exports.PAYPAL_CARD_PROVIDER_IDS,
7
+ exports.PAYPAL_WALLET_PROVIDER_ID,
8
+ exports.PAYPAL_CARD_PROVIDER_ID,
9
9
  ];
10
- const normalizePayPalProviderId = (providerId) => {
11
- if (!providerId)
12
- return providerId;
13
- if (!providerId.startsWith("pp_"))
14
- return providerId;
15
- if (providerId === "pp_paypal_paypal")
16
- return "paypal";
17
- if (providerId === "pp_paypal_card_paypal_card")
18
- return "paypal_card";
19
- const parts = providerId.split("_");
20
- return parts.length >= 3 ? parts.slice(2).join("_") : providerId;
21
- };
22
- exports.normalizePayPalProviderId = normalizePayPalProviderId;
23
10
  const isPayPalProviderId = (providerId) => {
24
- const normalizedProviderId = (0, exports.normalizePayPalProviderId)(providerId);
25
- if (!normalizedProviderId)
11
+ if (!providerId)
26
12
  return false;
27
- return exports.PAYPAL_PROVIDER_IDS.includes(normalizedProviderId);
13
+ return exports.PAYPAL_PROVIDER_IDS.includes(providerId);
28
14
  };
29
15
  exports.isPayPalProviderId = isPayPalProviderId;
30
16
  //# sourceMappingURL=provider-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider-ids.js","sourceRoot":"","sources":["../../../../../../src/modules/paypal/utils/provider-ids.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG,CAAC,QAAQ,CAAU,CAAA;AAChD,QAAA,wBAAwB,GAAG,CAAC,aAAa,CAAU,CAAA;AAEnD,QAAA,mBAAmB,GAAG;IACjC,GAAG,kCAA0B;IAC7B,GAAG,gCAAwB;CACnB,CAA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CACnD,CAAA;AACH,CAAC,CAAA;AANY,QAAA,kBAAkB,sBAM9B"}
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,102 +1,102 @@
1
- # @easypayment/medusa-paypal
2
-
3
- **Industry-standard PayPal integration for Medusa v2** (payment providers + Admin settings extensions).
4
-
5
- ## Install
6
-
7
- ```bash
8
- npm install @easypayment/medusa-paypal
9
- # or
10
- yarn add @easypayment/medusa-paypal
11
- ```
12
-
13
- ## Register in `medusa-config.ts`
14
-
15
- ```ts
16
- plugins: [
17
- { resolve: "@easypayment/medusa-paypal", options: {} },
18
- ]
19
-
20
- modules: [
21
- {
22
- resolve: "@medusajs/medusa/payment",
23
- options: {
24
- providers: [
25
- { resolve: "@easypayment/medusa-paypal/providers/paypal", id: "paypal" },
26
- { resolve: "@easypayment/medusa-paypal/providers/paypal_card", id: "paypal_card" },
27
- ],
28
- },
29
- },
30
- ]
31
- ```
32
-
33
- > If you also register the payment providers via the Payment module, use the exported provider paths under
34
- > `@easypayment/medusa-paypal/providers/*`.
35
-
36
- ---
37
-
38
- ## Included backend code
39
-
40
- - `src/modules/paypal/**` – PayPal module, provider, migrations, services, and utils.
41
- - `src/api/admin/paypal/**` – Admin PayPal routes.
42
- - `src/api/store/paypal/**` – Storefront PayPal routes.
43
- - `src/api/admin/payment-collections/[id]/payment-sessions/**` – Admin PayPal payment sessions route.
44
- - `src/api/store/payment-collections/[id]/payment-sessions/**` – Store PayPal payment sessions route.
45
- - `src/jobs/paypal-*.ts` – PayPal jobs (reconcile and webhook retry).
46
-
47
- ## Package structure
48
-
49
- ```text
50
- @easypayment/medusa-paypal/
51
- ├── .medusa/server/src/
52
- │ ├── providers/
53
- │ │ ├── paypal/index.js
54
- │ │ └── paypal_card/index.js
55
- │ ├── modules/paypal/
56
- │ └── index.js
57
- ├── src/
58
- └── scripts/
59
- ```
60
-
61
- ## Migration from v0.1.0
62
-
63
- If you were previously using manual/hardcoded file paths, switch to:
64
-
65
- ```diff
66
- - resolve: "./node_modules/@easypayment/medusa-paypal/.medusa/server/src/modules/paypal/payment-provider/service.js"
67
- + resolve: "@easypayment/medusa-paypal/providers/paypal"
68
- ```
69
-
70
- ## How to use this package (step-by-step)
71
-
72
- 1. **Move PayPal backend code into the package**
73
- Keep all PayPal backend files in this package under `packages/paypal-backend/src`.
74
-
75
- 2. **Point Medusa to the package**
76
- In `medusa-config.ts`, update the PayPal module/provider resolve paths to use
77
- `./packages/paypal-backend/src/modules/paypal` (and the `dist` path for production).
78
-
79
- 3. **Install dependencies (if needed)**
80
- If you later publish or share this package, add it to your project dependencies
81
- via a `file:` dependency or workspace setup. For local use, the project can
82
- reference the package by path.
83
-
84
- 4. **Run the project**
85
- Start the Medusa server as usual:
86
- - `pnpm dev` or `yarn dev`
87
-
88
- ## Removing PayPal backend files from `src`
89
-
90
- Once the package is in place, remove the PayPal backend files from `src` so that
91
- only the package holds the backend implementation. The PayPal frontend/admin UI
92
- files can remain in `src/admin` if you still need them.
93
-
94
-
95
- ## Publishing
96
-
97
- 1. Update `name` in `package.json` to your npm scope (for example `@yourorg/medusa-paypal`).
98
- 2. Run `npm install`.
99
- 3. Run `npm run build` (or `npx medusa plugin:build`).
100
- 4. Publish with `npm publish --access public` (scoped packages).
101
-
102
- > Note: The plugin ships its compiled output under `.medusa/server`, and the `exports` map exposes the Admin extension at `@scope/pkg/admin`.
1
+ # @easypayment/medusa-paypal
2
+
3
+ **Industry-standard PayPal integration for Medusa v2** (payment providers + Admin settings extensions).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @easypayment/medusa-paypal
9
+ # or
10
+ yarn add @easypayment/medusa-paypal
11
+ ```
12
+
13
+ ## Register in `medusa-config.ts`
14
+
15
+ ```ts
16
+ plugins: [
17
+ { resolve: "@easypayment/medusa-paypal", options: {} },
18
+ ]
19
+
20
+ modules: [
21
+ {
22
+ resolve: "@medusajs/medusa/payment",
23
+ options: {
24
+ providers: [
25
+ { resolve: "@easypayment/medusa-paypal/providers/paypal", id: "paypal" },
26
+ { resolve: "@easypayment/medusa-paypal/providers/paypal_card", id: "paypal_card" },
27
+ ],
28
+ },
29
+ },
30
+ ]
31
+ ```
32
+
33
+ > If you also register the payment providers via the Payment module, use the exported provider paths under
34
+ > `@easypayment/medusa-paypal/providers/*`.
35
+
36
+ ---
37
+
38
+ ## Included backend code
39
+
40
+ - `src/modules/paypal/**` – PayPal module, provider, migrations, services, and utils.
41
+ - `src/api/admin/paypal/**` – Admin PayPal routes.
42
+ - `src/api/store/paypal/**` – Storefront PayPal routes.
43
+ - `src/api/admin/payment-collections/[id]/payment-sessions/**` – Admin PayPal payment sessions route.
44
+ - `src/api/store/payment-collections/[id]/payment-sessions/**` – Store PayPal payment sessions route.
45
+ - `src/jobs/paypal-*.ts` – PayPal jobs (reconcile and webhook retry).
46
+
47
+ ## Package structure
48
+
49
+ ```text
50
+ @easypayment/medusa-paypal/
51
+ ├── .medusa/server/src/
52
+ │ ├── providers/
53
+ │ │ ├── paypal/index.js
54
+ │ │ └── paypal_card/index.js
55
+ │ ├── modules/paypal/
56
+ │ └── index.js
57
+ ├── src/
58
+ └── scripts/
59
+ ```
60
+
61
+ ## Migration from v0.1.0
62
+
63
+ If you were previously using manual/hardcoded file paths, switch to:
64
+
65
+ ```diff
66
+ - resolve: "./node_modules/@easypayment/medusa-paypal/.medusa/server/src/modules/paypal/payment-provider/service.js"
67
+ + resolve: "@easypayment/medusa-paypal/providers/paypal"
68
+ ```
69
+
70
+ ## How to use this package (step-by-step)
71
+
72
+ 1. **Move PayPal backend code into the package**
73
+ Keep all PayPal backend files in this package under `packages/paypal-backend/src`.
74
+
75
+ 2. **Point Medusa to the package**
76
+ In `medusa-config.ts`, update the PayPal module/provider resolve paths to use
77
+ `./packages/paypal-backend/src/modules/paypal` (and the `dist` path for production).
78
+
79
+ 3. **Install dependencies (if needed)**
80
+ If you later publish or share this package, add it to your project dependencies
81
+ via a `file:` dependency or workspace setup. For local use, the project can
82
+ reference the package by path.
83
+
84
+ 4. **Run the project**
85
+ Start the Medusa server as usual:
86
+ - `pnpm dev` or `yarn dev`
87
+
88
+ ## Removing PayPal backend files from `src`
89
+
90
+ Once the package is in place, remove the PayPal backend files from `src` so that
91
+ only the package holds the backend implementation. The PayPal frontend/admin UI
92
+ files can remain in `src/admin` if you still need them.
93
+
94
+
95
+ ## Publishing
96
+
97
+ 1. Update `name` in `package.json` to your npm scope (for example `@yourorg/medusa-paypal`).
98
+ 2. Run `npm install`.
99
+ 3. Run `npm run build` (or `npx medusa plugin:build`).
100
+ 4. Publish with `npm publish --access public` (scoped packages).
101
+
102
+ > Note: The plugin ships its compiled output under `.medusa/server`, and the `exports` map exposes the Admin extension at `@scope/pkg/admin`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypayment/medusa-paypal",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Industry-standard PayPal integration for Medusa v2",
5
5
  "license": "MIT",
6
6
  "main": "./.medusa/server/src/index.js",
@@ -1,17 +1,17 @@
1
- import React from "react"
2
- import { defineRouteConfig } from "@medusajs/admin-sdk"
3
- import { Navigate } from "react-router-dom"
4
-
5
- export const config = defineRouteConfig({
6
- label: "PayPal",
7
- })
8
-
9
- /**
10
- * Keep the left-side "PayPal" menu entry stable.
11
- * Default tab -> PayPal Connection.
12
- */
13
- const PayPalSettingsIndexRoute = () => {
14
- return <Navigate to="connection" replace />
15
- }
16
-
17
- export default PayPalSettingsIndexRoute
1
+ import React from "react"
2
+ import { defineRouteConfig } from "@medusajs/admin-sdk"
3
+ import { Navigate } from "react-router-dom"
4
+
5
+ export const config = defineRouteConfig({
6
+ label: "PayPal",
7
+ })
8
+
9
+ /**
10
+ * Keep the left-side "PayPal" menu entry stable.
11
+ * Default tab -> PayPal Connection.
12
+ */
13
+ const PayPalSettingsIndexRoute = () => {
14
+ return <Navigate to="connection" replace />
15
+ }
16
+
17
+ export default PayPalSettingsIndexRoute
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export { default } from "./modules/paypal"
1
+ export { default } from "./modules/paypal"
@@ -14,7 +14,7 @@ export default async function paypalReconcile(container: MedusaContainer) {
14
14
  const paypal = container.resolve<PayPalModuleService>("paypal_onboarding")
15
15
 
16
16
  const sessions = await paymentSessionService.list({
17
- provider_id: ["paypal", "paypal_card"],
17
+ provider_id: ["pp_paypal_paypal", "pp_paypal_card_paypal_card"],
18
18
  status: ["pending", "authorized"],
19
19
  })
20
20
 
@@ -1,27 +1,15 @@
1
- export const PAYPAL_WALLET_PROVIDER_IDS = ["paypal"] as const
2
- export const PAYPAL_CARD_PROVIDER_IDS = ["paypal_card"] as const
1
+ export const PAYPAL_WALLET_PROVIDER_ID = "pp_paypal_paypal" as const
2
+ export const PAYPAL_CARD_PROVIDER_ID = "pp_paypal_card_paypal_card" as const
3
3
 
4
4
  export const PAYPAL_PROVIDER_IDS = [
5
- ...PAYPAL_WALLET_PROVIDER_IDS,
6
- ...PAYPAL_CARD_PROVIDER_IDS,
5
+ PAYPAL_WALLET_PROVIDER_ID,
6
+ PAYPAL_CARD_PROVIDER_ID,
7
7
  ] as const
8
8
 
9
- export const normalizePayPalProviderId = (providerId?: string | null) => {
10
- if (!providerId) return providerId
11
- if (!providerId.startsWith("pp_")) return providerId
12
-
13
- if (providerId === "pp_paypal_paypal") return "paypal"
14
- if (providerId === "pp_paypal_card_paypal_card") return "paypal_card"
15
-
16
- const parts = providerId.split("_")
17
- return parts.length >= 3 ? parts.slice(2).join("_") : providerId
18
- }
19
-
20
9
  export const isPayPalProviderId = (providerId?: string | null) => {
21
- const normalizedProviderId = normalizePayPalProviderId(providerId)
22
- if (!normalizedProviderId) return false
10
+ if (!providerId) return false
23
11
 
24
12
  return PAYPAL_PROVIDER_IDS.includes(
25
- normalizedProviderId as (typeof PAYPAL_PROVIDER_IDS)[number]
13
+ providerId as (typeof PAYPAL_PROVIDER_IDS)[number]
26
14
  )
27
15
  }
@@ -1,10 +1,10 @@
1
- import { ModuleProvider, Modules } from "@medusajs/framework/utils"
2
- import { PayPalPaymentProvider } from "../../modules/paypal/payment-provider/service"
3
-
4
- // Medusa Payment Module Provider entrypoint (doc-aligned)
5
- export default ModuleProvider(Modules.PAYMENT, {
6
- services: [PayPalPaymentProvider],
7
- })
8
-
9
- // Optional named export (doesn't hurt, can help for testing/imports)
10
- export { PayPalPaymentProvider }
1
+ import { ModuleProvider, Modules } from "@medusajs/framework/utils"
2
+ import { PayPalPaymentProvider } from "../../modules/paypal/payment-provider/service"
3
+
4
+ // Medusa Payment Module Provider entrypoint (doc-aligned)
5
+ export default ModuleProvider(Modules.PAYMENT, {
6
+ services: [PayPalPaymentProvider],
7
+ })
8
+
9
+ // Optional named export (doesn't hurt, can help for testing/imports)
10
+ export { PayPalPaymentProvider }
@@ -1,10 +1,10 @@
1
- import { ModuleProvider, Modules } from "@medusajs/framework/utils"
2
- import { PayPalAdvancedCardProvider } from "../../modules/paypal/payment-provider/card-service"
3
-
4
- // Medusa Payment Module Provider entrypoint (doc-aligned)
5
- export default ModuleProvider(Modules.PAYMENT, {
6
- services: [PayPalAdvancedCardProvider],
7
- })
8
-
9
- // Optional named export
10
- export { PayPalAdvancedCardProvider }
1
+ import { ModuleProvider, Modules } from "@medusajs/framework/utils"
2
+ import { PayPalAdvancedCardProvider } from "../../modules/paypal/payment-provider/card-service"
3
+
4
+ // Medusa Payment Module Provider entrypoint (doc-aligned)
5
+ export default ModuleProvider(Modules.PAYMENT, {
6
+ services: [PayPalAdvancedCardProvider],
7
+ })
8
+
9
+ // Optional named export
10
+ export { PayPalAdvancedCardProvider }
package/tsconfig.json CHANGED
@@ -1,31 +1,31 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": [
5
- "ES2022",
6
- "DOM"
7
- ],
8
- "module": "NodeNext",
9
- "moduleResolution": "NodeNext",
10
- "jsx": "react-jsx",
11
- "rootDir": ".",
12
- "outDir": "dist",
13
- "declaration": true,
14
- "declarationMap": true,
15
- "sourceMap": true,
16
- "esModuleInterop": true,
17
- "allowSyntheticDefaultImports": true,
18
- "resolveJsonModule": true,
19
- "skipLibCheck": true,
20
- "strict": false
21
- },
22
- "include": [
23
- "src/**/*.ts",
24
- "src/**/*.tsx"
25
- ],
26
- "exclude": [
27
- "node_modules",
28
- "dist",
29
- ".medusa"
30
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": [
5
+ "ES2022",
6
+ "DOM"
7
+ ],
8
+ "module": "NodeNext",
9
+ "moduleResolution": "NodeNext",
10
+ "jsx": "react-jsx",
11
+ "rootDir": ".",
12
+ "outDir": "dist",
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "sourceMap": true,
16
+ "esModuleInterop": true,
17
+ "allowSyntheticDefaultImports": true,
18
+ "resolveJsonModule": true,
19
+ "skipLibCheck": true,
20
+ "strict": false
21
+ },
22
+ "include": [
23
+ "src/**/*.ts",
24
+ "src/**/*.tsx"
25
+ ],
26
+ "exclude": [
27
+ "node_modules",
28
+ "dist",
29
+ ".medusa"
30
+ ]
31
31
  }