@easypayment/medusa-paypal 0.7.3 → 0.7.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.
@@ -319,9 +319,6 @@ function AdvancedCardPaymentsTab() {
319
319
  )
320
320
  ] }) });
321
321
  }
322
- function PayPalApplePayPage() {
323
- return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
324
- }
325
322
  const config = adminSdk.defineRouteConfig({
326
323
  label: "PayPal Connection",
327
324
  hide: true
@@ -915,6 +912,9 @@ function PayPalConnectionPage() {
915
912
  ` })
916
913
  ] });
917
914
  }
915
+ function PayPalApplePayPage() {
916
+ return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
917
+ }
918
918
  function PayPalGooglePayPage() {
919
919
  return /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Navigate, { to: "/settings/paypal/connection", replace: true });
920
920
  }
@@ -1209,14 +1209,14 @@ const routeModule = {
1209
1209
  Component: AdvancedCardPaymentsTab,
1210
1210
  path: "/settings/paypal/advanced-card-payments"
1211
1211
  },
1212
- {
1213
- Component: PayPalApplePayPage,
1214
- path: "/settings/paypal/apple-pay"
1215
- },
1216
1212
  {
1217
1213
  Component: PayPalConnectionPage,
1218
1214
  path: "/settings/paypal/connection"
1219
1215
  },
1216
+ {
1217
+ Component: PayPalApplePayPage,
1218
+ path: "/settings/paypal/apple-pay"
1219
+ },
1220
1220
  {
1221
1221
  Component: PayPalGooglePayPage,
1222
1222
  path: "/settings/paypal/google-pay"
@@ -318,9 +318,6 @@ function AdvancedCardPaymentsTab() {
318
318
  )
319
319
  ] }) });
320
320
  }
321
- function PayPalApplePayPage() {
322
- return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
323
- }
324
321
  const config = defineRouteConfig({
325
322
  label: "PayPal Connection",
326
323
  hide: true
@@ -914,6 +911,9 @@ function PayPalConnectionPage() {
914
911
  ` })
915
912
  ] });
916
913
  }
914
+ function PayPalApplePayPage() {
915
+ return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
916
+ }
917
917
  function PayPalGooglePayPage() {
918
918
  return /* @__PURE__ */ jsx(Navigate, { to: "/settings/paypal/connection", replace: true });
919
919
  }
@@ -1208,14 +1208,14 @@ const routeModule = {
1208
1208
  Component: AdvancedCardPaymentsTab,
1209
1209
  path: "/settings/paypal/advanced-card-payments"
1210
1210
  },
1211
- {
1212
- Component: PayPalApplePayPage,
1213
- path: "/settings/paypal/apple-pay"
1214
- },
1215
1211
  {
1216
1212
  Component: PayPalConnectionPage,
1217
1213
  path: "/settings/paypal/connection"
1218
1214
  },
1215
+ {
1216
+ Component: PayPalApplePayPage,
1217
+ path: "/settings/paypal/apple-pay"
1218
+ },
1219
1219
  {
1220
1220
  Component: PayPalGooglePayPage,
1221
1221
  path: "/settings/paypal/google-pay"
package/README.md CHANGED
@@ -1,31 +1,54 @@
1
- <div align="center">
1
+ # PayPal for Medusa
2
2
 
3
- <h1>PayPal for Medusa</h1>
3
+ **Accept PayPal and advanced credit card payments in your Medusa v2 store — built by an official PayPal Partner.**
4
4
 
5
- <p><strong>PayPal payment plugin for Medusa</strong></p>
5
+ [![npm version](https://img.shields.io/npm/v/@easypayment/medusa-paypal?color=blue&label=npm)](https://www.npmjs.com/package/@easypayment/medusa-paypal)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
7
+ [![Medusa v2](https://img.shields.io/badge/Medusa-v2-9b59b6)](https://medusajs.com)
8
+ [![PayPal PPCP](https://img.shields.io/badge/PayPal-PPCP-003087)](https://developer.paypal.com)
6
9
 
7
- <p>
8
- <a href="https://www.npmjs.com/package/@easypayment/medusa-paypal"><img src="https://img.shields.io/npm/v/@easypayment/medusa-paypal?color=blue&label=npm" alt="npm version" /></a>
9
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License: MIT" /></a>
10
- <a href="https://medusajs.com"><img src="https://img.shields.io/badge/Medusa-v2-9b59b6" alt="Medusa v2" /></a>
11
- <a href="https://developer.paypal.com"><img src="https://img.shields.io/badge/PayPal-PPCP-003087" alt="PayPal PPCP" /></a>
12
- </p>
10
+ ---
11
+
12
+ ## 📋 Table of Contents
13
+
14
+ - [📦 What's included](#-whats-included)
15
+ - [✅ Requirements](#-requirements)
16
+ - [🚀 Installation](#-installation)
17
+ - [⚙️ Setup](#%EF%B8%8F-setup)
18
+ - [Step 1 — Configure medusa-config.ts](#step-1--configure-medusa-configts)
19
+ - [Step 2 — Run database migrations](#step-2--run-database-migrations)
20
+ - [Step 3 — Connect your PayPal account](#step-3--connect-your-paypal-account)
21
+ - [Step 4 — Enable providers in your region](#step-4--enable-providers-in-your-region)
22
+ - [Step 5 — Configure settings](#step-5--configure-settings-optional)
23
+ - [Step 6 — Add PayPal to your storefront](#step-6--add-paypal-to-your-storefront)
24
+ - [📄 License](#-license)
25
+
26
+ ---
13
27
 
14
- <p>PayPal, Credit/Debit Cards, Venmo, SEPA, iDEAL, Mercado Pago, Bancontact & more - by an official PayPal Partner</p>
28
+ ## 📦 What's included
15
29
 
16
- </div>
30
+ | Feature | Details |
31
+ |---|---|
32
+ | 🔵 **PayPal Smart Buttons** | One-click wallet checkout via PayPal |
33
+ | 💳 **Advanced Card Fields** | Hosted, PCI-compliant advanced credit card inputs |
34
+ | 🛠 **Admin Dashboard** | Connect, configure, and switch environments from Medusa Admin |
35
+ | 🌍 **Sandbox & Live** | Toggle between test and production without restarting |
36
+ | ⚡ **Webhooks** | Automatically registered and verified with built-in retry support |
37
+ | 🔐 **3D Secure** | Configurable SCA/3DS per transaction |
17
38
 
18
39
  ---
19
40
 
20
- ## Requirements
41
+ ## Requirements
21
42
 
22
- - Medusa v2
23
- - Node.js 18+
43
+ - Medusa **v2**
44
+ - Node.js **18+**
24
45
  - PostgreSQL
25
46
 
26
47
  ---
27
48
 
28
- ## Step 1 — Install
49
+ ## 🚀 Installation
50
+
51
+ **In your Medusa backend directory**, run:
29
52
 
30
53
  ```bash
31
54
  npm install @easypayment/medusa-paypal
@@ -33,7 +56,9 @@ npm install @easypayment/medusa-paypal
33
56
 
34
57
  ---
35
58
 
36
- ## Step 2 — Configure medusa-config.ts
59
+ ## ⚙️ Setup
60
+
61
+ ### Step 1 — Configure `medusa-config.ts`
37
62
 
38
63
  Add the plugin and both payment providers to your existing `medusa-config.ts`:
39
64
 
@@ -89,7 +114,7 @@ export default defineConfig({
89
114
 
90
115
  ---
91
116
 
92
- ## Step 3 — Run database migrations
117
+ ### Step 2 — Run database migrations
93
118
 
94
119
  ```bash
95
120
  npx medusa db:migrate
@@ -97,29 +122,32 @@ npx medusa db:migrate
97
122
 
98
123
  ---
99
124
 
100
- ## Step 4 — Connect your PayPal account
125
+ ### Step 3 — Connect your PayPal account
101
126
 
102
127
  1. Start your Medusa server
103
- 2. Open Medusa Admin → **Settings → PayPal → PayPal Connection**
128
+ 2. Open **Medusa Admin → Settings → PayPal → PayPal Connection**
104
129
  3. Choose **Sandbox** (testing) or **Live** (production)
105
- 4. Click **Connect to PayPal** and complete the PayPal onboarding flow
130
+ 4. Click **Connect to PayPal** and complete the onboarding flow
106
131
 
107
- Credentials are saved automatically. To connect manually instead, click **Insert credentials manually** and paste your Client ID and Secret from [developer.paypal.com](https://developer.paypal.com).
132
+ Credentials are saved automatically. Prefer manual setup? Click **Insert credentials manually** and paste your Client ID and Secret from [developer.paypal.com](https://developer.paypal.com/dashboard/).
108
133
 
109
134
  ---
110
135
 
111
- ## Step 5 — Enable providers in your region
136
+ ### Step 4 — Enable providers in your region
112
137
 
113
- 1. Medusa Admin → **Settings → Regions → [your region]**
138
+ 1. Go to **Medusa Admin → Settings → Regions → [your region]**
114
139
  2. Under **Payment Providers**, enable:
115
- - `pp_paypal_paypal` — Paypal (PAYPAL)
116
- - `pp_paypal_card_paypal_card` Paypal (CARD)
140
+
141
+ | Provider ID | Description |
142
+ |---|---|
143
+ | `pp_paypal_paypal` | PayPal Smart Buttons (wallet) |
144
+ | `pp_paypal_card_paypal_card` | Advanced Card Fields (card) |
117
145
 
118
146
  ---
119
147
 
120
- ## Step 6 — Configure settings (optional)
148
+ ### Step 5 — Configure settings *(optional)*
121
149
 
122
- All settings are in Medusa Admin → **Settings → PayPal** and take effect immediately with no server restart.
150
+ All settings live in **Medusa Admin → Settings → PayPal** and apply immediately no server restart needed.
123
151
 
124
152
  | Tab | What you can configure |
125
153
  |---|---|
@@ -129,14 +157,16 @@ All settings are in Medusa Admin → **Settings → PayPal** and take effect imm
129
157
 
130
158
  ---
131
159
 
132
- ## Step 7Connect the frontend package
160
+ ### Step 6Add PayPal to your storefront
133
161
 
134
- Install the storefront UI package to render PayPal at checkout:
162
+ The checkout UI is shipped as a separate package **install it inside your storefront project**, not in this backend.
135
163
 
136
- ```bash
137
- npm install @easypayment/medusa-paypal-ui
138
- ```
164
+ 📦 **[@easypayment/medusa-paypal-ui](https://www.npmjs.com/package/@easypayment/medusa-paypal-ui)** — React components, hooks, and a drop-in payment step adapter for Next.js App Router storefronts.
165
+
166
+ See the [storefront integration & testing guide →](https://www.npmjs.com/package/@easypayment/medusa-paypal-ui)
167
+
168
+ ---
139
169
 
140
- See the [medusa-paypal-frontend README](https://www.npmjs.com/package/@easypayment/medusa-paypal-ui) for integration steps.
170
+ ## 📄 License
141
171
 
142
- ---
172
+ MIT © [Easy Payment](https://www.npmjs.com/package/@easypayment/medusa-paypal)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypayment/medusa-paypal",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Industry-standard PayPal integration for Medusa v2",
5
5
  "license": "MIT",
6
6
  "main": "./.medusa/server/src/index.js",