@easypayment/medusa-payment-paypal 1.3.12 → 1.3.13

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.
@@ -487,6 +487,9 @@ function AdditionalSettingsTab() {
487
487
  )
488
488
  ] }) });
489
489
  }
490
+ function PayPalApplePayPage() {
491
+ return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
492
+ }
490
493
  const URL_RE = /(https?:\/\/[^\s]+[^\s.,!?])/g;
491
494
  function NoticeText({ message }) {
492
495
  const parts = message.split(URL_RE);
@@ -1564,9 +1567,6 @@ function PayPalConnectionPage() {
1564
1567
  function PayPalGooglePayPage() {
1565
1568
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
1566
1569
  }
1567
- function PayPalApplePayPage() {
1568
- return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
1569
- }
1570
1570
  function PayPalPayLaterMessagingPage() {
1571
1571
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
1572
1572
  }
@@ -1797,6 +1797,10 @@ const routeModule = {
1797
1797
  Component: AdditionalSettingsTab,
1798
1798
  path: "/settings/paypal/additional-settings"
1799
1799
  },
1800
+ {
1801
+ Component: PayPalApplePayPage,
1802
+ path: "/settings/paypal/apple-pay"
1803
+ },
1800
1804
  {
1801
1805
  Component: AdvancedCardPaymentsTab,
1802
1806
  path: "/settings/paypal/advanced-card-payments"
@@ -1809,10 +1813,6 @@ const routeModule = {
1809
1813
  Component: PayPalGooglePayPage,
1810
1814
  path: "/settings/paypal/google-pay"
1811
1815
  },
1812
- {
1813
- Component: PayPalApplePayPage,
1814
- path: "/settings/paypal/apple-pay"
1815
- },
1816
1816
  {
1817
1817
  Component: PayPalPayLaterMessagingPage,
1818
1818
  path: "/settings/paypal/pay-later-messaging"
@@ -484,6 +484,9 @@ function AdditionalSettingsTab() {
484
484
  )
485
485
  ] }) });
486
486
  }
487
+ function PayPalApplePayPage() {
488
+ return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
489
+ }
487
490
  const URL_RE = /(https?:\/\/[^\s]+[^\s.,!?])/g;
488
491
  function NoticeText({ message }) {
489
492
  const parts = message.split(URL_RE);
@@ -1561,9 +1564,6 @@ function PayPalConnectionPage() {
1561
1564
  function PayPalGooglePayPage() {
1562
1565
  return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
1563
1566
  }
1564
- function PayPalApplePayPage() {
1565
- return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
1566
- }
1567
1567
  function PayPalPayLaterMessagingPage() {
1568
1568
  return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
1569
1569
  }
@@ -1794,6 +1794,10 @@ const routeModule = {
1794
1794
  Component: AdditionalSettingsTab,
1795
1795
  path: "/settings/paypal/additional-settings"
1796
1796
  },
1797
+ {
1798
+ Component: PayPalApplePayPage,
1799
+ path: "/settings/paypal/apple-pay"
1800
+ },
1797
1801
  {
1798
1802
  Component: AdvancedCardPaymentsTab,
1799
1803
  path: "/settings/paypal/advanced-card-payments"
@@ -1806,10 +1810,6 @@ const routeModule = {
1806
1810
  Component: PayPalGooglePayPage,
1807
1811
  path: "/settings/paypal/google-pay"
1808
1812
  },
1809
- {
1810
- Component: PayPalApplePayPage,
1811
- path: "/settings/paypal/apple-pay"
1812
- },
1813
1813
  {
1814
1814
  Component: PayPalPayLaterMessagingPage,
1815
1815
  path: "/settings/paypal/pay-later-messaging"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to `@easypayment/medusa-payment-paypal` are documented here.
4
4
 
5
+ ## 1.3.13 — 2026-11-26
6
+
7
+ README only. No code changes.
8
+
9
+ - Reformatted the README so it displays correctly on the Medusa integrations
10
+ page as well as npm: tables are now lists, collapsible sections are now
11
+ regular headings, and links to the changelog and license are absolute.
12
+
5
13
  ## 1.3.12 — 2026-11-26
6
14
 
7
15
  Code formatting only. No functional changes.
package/README.md CHANGED
@@ -4,35 +4,21 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@easypayment/medusa-payment-paypal?color=blue&label=npm)](https://www.npmjs.com/package/@easypayment/medusa-payment-paypal)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@easypayment/medusa-payment-paypal?color=blue&label=downloads)](https://www.npmjs.com/package/@easypayment/medusa-payment-paypal)
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/easypaymentplugins/medusa-paypal/blob/main/LICENSE)
8
8
  [![Medusa v2](https://img.shields.io/badge/Medusa-v2-9b59b6)](https://medusajs.com)
9
9
  [![PayPal PPCP](https://img.shields.io/badge/PayPal-PPCP-003087)](https://developer.paypal.com)
10
10
 
11
11
  This is the **backend plugin**. It adds PayPal to your Medusa server and Medusa Admin. The checkout components for your storefront are in the companion package, [@easypayment/medusa-paypal-ui](https://www.npmjs.com/package/@easypayment/medusa-paypal-ui).
12
12
 
13
- ## Contents
14
-
15
- - [What you get](#-what-you-get)
16
- - [Requirements](#-requirements)
17
- - [Installation](#-installation)
18
- - [Setup in 5 steps](#-setup-in-5-steps)
19
- - [Customize](#-customize)
20
- - [Going live](#-going-live)
21
- - [Advanced options](#-advanced-options)
22
- - [Support](#-support)
23
- - [License](#-license)
24
-
25
13
  ## ✨ What you get
26
14
 
27
- | Feature | Details |
28
- | --- | --- |
29
- | 🔵 **PayPal Buttons** | One-click PayPal checkout for your customers |
30
- | 💳 **Card payments** | Secure credit and debit card fields, hosted by PayPal (PCI compliant) |
31
- | 🔧 **Admin dashboard** | Connect your PayPal account and manage everything from Medusa Admin |
32
- | 🌍 **Test and Live modes** | Try everything safely in Sandbox before going live |
33
- | 💰 **Capture or authorize** | Charge at checkout, or authorize first and capture from the order later |
34
- | 🔐 **3D Secure** | Extra card security, configurable in one click |
35
- | 🔄 **Reliable by design** | Payments are verified with PayPal at every step. Webhooks, retries and safety nets are handled for you |
15
+ - 🔵 **PayPal Buttons**: one-click PayPal checkout for your customers
16
+ - 💳 **Card payments**: secure credit and debit card fields, hosted by PayPal (PCI compliant)
17
+ - 🔧 **Admin dashboard**: connect your PayPal account and manage everything from Medusa Admin
18
+ - 🌍 **Test and Live modes**: try everything safely in Sandbox before going live
19
+ - 💰 **Capture or authorize**: charge at checkout, or authorize first and capture from the order later
20
+ - 🔐 **3D Secure**: extra card security, configurable in one click
21
+ - 🔄 **Reliable by design**: payments are verified with PayPal at every step. Webhooks, retries and safety nets are handled for you
36
22
 
37
23
  ## ✅ Requirements
38
24
 
@@ -125,10 +111,8 @@ Your credentials are saved automatically, and webhooks are registered for you.
125
111
 
126
112
  Go to **Medusa Admin → Settings → Regions → your region** and enable:
127
113
 
128
- | Payment provider | What it is |
129
- | --- | --- |
130
- | `pp_paypal_paypal` | PayPal Buttons |
131
- | `pp_paypal_card_paypal_card` | Card payments |
114
+ - `pp_paypal_paypal`: PayPal Buttons
115
+ - `pp_paypal_card_paypal_card`: Card payments
132
116
 
133
117
  ### 5. Add PayPal to your storefront
134
118
 
@@ -140,20 +124,16 @@ The checkout UI is a separate package. Install it in your **storefront** project
140
124
 
141
125
  Everything is managed in **Medusa Admin → Settings → PayPal**. Changes apply right away, with no restart.
142
126
 
143
- | Tab | What you can change |
144
- | --- | --- |
145
- | **PayPal Settings** | Turn PayPal on or off, checkout title, button color, shape, width, height and label |
146
- | **Advanced Card Payments** | Turn card payments on or off, checkout title, 3D Secure mode |
147
- | **Additional Settings** | Payment action (capture or authorize), brand name shown at PayPal, landing page, instant payments, item details, shipping address, invoice prefix, card statement name |
127
+ - **PayPal Settings**: turn PayPal on or off, checkout title, button color, shape, width, height and label
128
+ - **Advanced Card Payments**: turn card payments on or off, checkout title, 3D Secure mode
129
+ - **Additional Settings**: payment action (capture or authorize), brand name shown at PayPal, landing page, instant payments, item details, shipping address, invoice prefix, card statement name
148
130
 
149
131
  ## 🔐 Going live
150
132
 
151
133
  Set these two environment variables on your server before taking real payments:
152
134
 
153
- | Variable | Why |
154
- | --- | --- |
155
- | `PAYPAL_ENCRYPTION_KEY` | Any long random text. Your PayPal credentials are then stored encrypted in the database. Keep the key safe: if it is lost, reconnect PayPal |
156
- | `MEDUSA_BACKEND_URL` | Your backend's public address, for example `https://api.mystore.com`, so PayPal can reach your store with payment notifications |
135
+ - `PAYPAL_ENCRYPTION_KEY`: any long random text. Your PayPal credentials are then stored encrypted in the database. Keep the key safe: if it is lost, reconnect PayPal.
136
+ - `MEDUSA_BACKEND_URL`: your backend's public address, for example `https://api.mystore.com`, so PayPal can reach your store with payment notifications.
157
137
 
158
138
  Then switch the environment to **Live** in **Settings → PayPal → PayPal Connection** and connect your live PayPal account.
159
139
 
@@ -161,39 +141,29 @@ Then switch the environment to **Live** in **Settings → PayPal → PayPal Conn
161
141
 
162
142
  Everything works without these. They are for developers who need to tune the plugin.
163
143
 
164
- <details>
165
- <summary><b>Environment variables</b></summary>
166
-
167
- <br>
168
-
169
- | Variable | Default | What it does |
170
- | --- | --- | --- |
171
- | `STOREFRONT_URL` (or `STORE_URL`) | Request origin, if listed in `STORE_CORS` | Storefront address used for PayPal return and cancel pages. Can also be set in Admin |
172
- | `PAYPAL_ENCRYPTION_STRICT` | `false` | `true` refuses to save credentials unencrypted |
173
- | `PAYPAL_ADMIN_ORIGIN` | First `ADMIN_CORS` entry | Restricts the onboarding popup to your admin URL |
174
- | `PAYPAL_SEND_SHIPPING_ADDRESS` | `true` | The shipping address the buyer entered at checkout is sent on PayPal orders (`SET_PROVIDED_ADDRESS`), which PayPal Seller Protection needs. Set `false` to let buyers pick an address in PayPal instead. Also an admin setting |
175
- | `PAYPAL_CURRENCY` | `EUR` | Fallback currency if none is configured |
176
- | `PAYPAL_HTTP_TIMEOUT_MS` | `30000` | Timeout for calls to PayPal |
177
- | `PAYPAL_SETTINGS_CACHE_MS` | `15000` | In-process cache for plugin settings reads. `0` disables it |
178
- | `PAYPAL_WEBHOOK_COMPLETE_CART` | `true` | Safety net that finishes an order when the payment succeeded but the buyer's browser closed. `false` disables it |
179
- | `PAYPAL_WEBHOOK_REPLAY_WINDOW_MINUTES` | `60` | Rejects webhook deliveries older than this |
180
- | `PAYPAL_WEBHOOK_STALE_PROCESSING_MS` | `300000` | When the retry job picks up interrupted webhook events again |
181
- | `PAYPAL_WEBHOOK_ID_LIVE` / `PAYPAL_WEBHOOK_ID_SANDBOX` | Automatic | Manual webhook ID override |
182
- | `PAYPAL_RATE_LIMIT_MAX` / `PAYPAL_RATE_LIMIT_WINDOW_MS` | Off / `60000` | Optional request limit for the public checkout routes |
183
- | `PAYPAL_WEBHOOK_RATE_LIMIT_MAX` / `PAYPAL_WEBHOOK_RATE_LIMIT_WINDOW_MS` | Off / `60000` | Optional request limit for the webhook endpoint, separate from the one above |
184
- | `PAYPAL_ALERT_WEBHOOK_URLS` | Unset | Comma-separated URLs that receive operational alerts, including dead-lettered webhook events |
185
- | `PAYPAL_REQUEST_LOG` | Off | `1` or `true` forces the request/response log on, regardless of the admin toggle |
186
- | `PAYPAL_LOG_DIR` | `.medusa/paypal-logs` in the project | Directory for the `paypal-requests-YYYY-MM-DD.log` file written when logging is on. Keep it outside the folders `medusa develop` watches, or every logged request restarts the dev server |
187
- | `PAYPAL_PARTNER_SERVICE_URL` | Built-in | Overrides the partner onboarding service used by the connect flow |
188
- | `PAYPAL_SELLER_NONCE` | Partner service nonce | Only change this if you also run your own `PAYPAL_PARTNER_SERVICE_URL`. It must match the nonce that service puts in its onboarding links |
189
- | `PAYPAL_PARTNER_MERCHANT_ID_SANDBOX` / `PAYPAL_PARTNER_MERCHANT_ID_LIVE` | Built-in | Overrides the partner merchant IDs used for onboarding |
190
-
191
- </details>
192
-
193
- <details>
194
- <summary><b>Declined cards</b></summary>
195
-
196
- <br>
144
+ ### Environment variables
145
+
146
+ - `STOREFRONT_URL` (or `STORE_URL`): Storefront address used for PayPal return and cancel pages. Can also be set in Admin. Default: Request origin, if listed in `STORE_CORS`.
147
+ - `PAYPAL_ENCRYPTION_STRICT`: `true` refuses to save credentials unencrypted. Default: `false`.
148
+ - `PAYPAL_ADMIN_ORIGIN`: Restricts the onboarding popup to your admin URL. Default: First `ADMIN_CORS` entry.
149
+ - `PAYPAL_SEND_SHIPPING_ADDRESS`: The shipping address the buyer entered at checkout is sent on PayPal orders (`SET_PROVIDED_ADDRESS`), which PayPal Seller Protection needs. Set `false` to let buyers pick an address in PayPal instead. Also an admin setting. Default: `true`.
150
+ - `PAYPAL_CURRENCY`: Fallback currency if none is configured. Default: `EUR`.
151
+ - `PAYPAL_HTTP_TIMEOUT_MS`: Timeout for calls to PayPal. Default: `30000`.
152
+ - `PAYPAL_SETTINGS_CACHE_MS`: In-process cache for plugin settings reads. `0` disables it. Default: `15000`.
153
+ - `PAYPAL_WEBHOOK_COMPLETE_CART`: Safety net that finishes an order when the payment succeeded but the buyer's browser closed. `false` disables it. Default: `true`.
154
+ - `PAYPAL_WEBHOOK_REPLAY_WINDOW_MINUTES`: Rejects webhook deliveries older than this. Default: `60`.
155
+ - `PAYPAL_WEBHOOK_STALE_PROCESSING_MS`: When the retry job picks up interrupted webhook events again. Default: `300000`.
156
+ - `PAYPAL_WEBHOOK_ID_LIVE` / `PAYPAL_WEBHOOK_ID_SANDBOX`: Manual webhook ID override. Default: Automatic.
157
+ - `PAYPAL_RATE_LIMIT_MAX` / `PAYPAL_RATE_LIMIT_WINDOW_MS`: Optional request limit for the public checkout routes. Default: Off / `60000`.
158
+ - `PAYPAL_WEBHOOK_RATE_LIMIT_MAX` / `PAYPAL_WEBHOOK_RATE_LIMIT_WINDOW_MS`: Optional request limit for the webhook endpoint, separate from the one above. Default: Off / `60000`.
159
+ - `PAYPAL_ALERT_WEBHOOK_URLS`: Comma-separated URLs that receive operational alerts, including dead-lettered webhook events. Default: Unset.
160
+ - `PAYPAL_REQUEST_LOG`: `1` or `true` forces the request/response log on, regardless of the admin toggle. Default: Off.
161
+ - `PAYPAL_LOG_DIR`: Directory for the `paypal-requests-YYYY-MM-DD.log` file written when logging is on. Keep it outside the folders `medusa develop` watches, or every logged request restarts the dev server. Default: `.medusa/paypal-logs` in the project.
162
+ - `PAYPAL_PARTNER_SERVICE_URL`: Overrides the partner onboarding service used by the connect flow. Default: Built-in.
163
+ - `PAYPAL_SELLER_NONCE`: Only change this if you also run your own `PAYPAL_PARTNER_SERVICE_URL`. It must match the nonce that service puts in its onboarding links. Default: Partner service nonce.
164
+ - `PAYPAL_PARTNER_MERCHANT_ID_SANDBOX` / `PAYPAL_PARTNER_MERCHANT_ID_LIVE`: Overrides the partner merchant IDs used for onboarding. Default: Built-in.
165
+
166
+ ### Declined cards
197
167
 
198
168
  When PayPal declines a capture, `/store/paypal/capture-order` responds `402` with a buyer-friendly `message` and a structured `decline` object:
199
169
 
@@ -203,23 +173,13 @@ When PayPal declines a capture, `/store/paypal/capture-order` responds `402` wit
203
173
 
204
174
  Storefronts can use it to show a message such as "insufficient funds, try another card" and to decide whether to offer a retry.
205
175
 
206
- </details>
207
-
208
- <details>
209
- <summary><b>Monitoring</b></summary>
210
-
211
- <br>
176
+ ### Monitoring
212
177
 
213
178
  - Operational counters live in the `paypal_metric` table.
214
179
  - Every webhook is recorded in `paypal_webhook_event` and retried automatically. Events that exhaust their retries are dead-lettered and pushed to `PAYPAL_ALERT_WEBHOOK_URLS`.
215
180
  - Audit events are logged as JSON lines tagged `"log":"paypal_audit"`, with secrets redacted.
216
181
 
217
- </details>
218
-
219
- <details>
220
- <summary><b>Integration log for PayPal review</b></summary>
221
-
222
- <br>
182
+ ### Integration log for PayPal review
223
183
 
224
184
  Turn on **Settings → PayPal → Additional Settings → Request/response logging** (off by default) to append every PayPal API call, and every plugin API request and response, to `.medusa/paypal-logs/paypal-requests-YYYY-MM-DD.log`.
225
185
 
@@ -227,14 +187,12 @@ Turn on **Settings → PayPal → Additional Settings → Request/response loggi
227
187
  - Download it from the same settings page with **Download log**, or at `GET /admin/paypal/logs?download=1`.
228
188
  - Turn logging off again once the review is complete.
229
189
 
230
- </details>
231
-
232
190
  ## 💬 Support
233
191
 
234
192
  - 🐛 **Found a bug, or have a question or feature request?** [Open an issue](https://github.com/easypaymentplugins/medusa-paypal/issues)
235
193
  - 🛒 **Storefront UI package:** [@easypayment/medusa-paypal-ui](https://www.npmjs.com/package/@easypayment/medusa-paypal-ui)
236
- - 📝 **Release notes:** see [CHANGELOG.md](CHANGELOG.md)
194
+ - 📝 **Release notes:** see [CHANGELOG.md](https://github.com/easypaymentplugins/medusa-paypal/blob/main/CHANGELOG.md)
237
195
 
238
196
  ## 📄 License
239
197
 
240
- [MIT](LICENSE) © Easy Payment
198
+ [MIT](https://github.com/easypaymentplugins/medusa-paypal/blob/main/LICENSE) © Easy Payment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypayment/medusa-payment-paypal",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "PayPal & credit card payments for Medusa v2 — PayPal Buttons, hosted card fields, 3D Secure, and an admin dashboard. Built by a PayPal Partner.",
5
5
  "author": "EasyPayment Plugins",
6
6
  "license": "MIT",