@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
|
-
|
|
1
|
+
# PayPal for Medusa
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Accept PayPal and advanced credit card payments in your Medusa v2 store — built by an official PayPal Partner.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@easypayment/medusa-paypal)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://medusajs.com)
|
|
8
|
+
[](https://developer.paypal.com)
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
28
|
+
## 📦 What's included
|
|
15
29
|
|
|
16
|
-
|
|
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
|
-
##
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
125
|
+
### Step 3 — Connect your PayPal account
|
|
101
126
|
|
|
102
127
|
1. Start your Medusa server
|
|
103
|
-
2. Open Medusa Admin →
|
|
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
|
|
130
|
+
4. Click **Connect to PayPal** and complete the onboarding flow
|
|
106
131
|
|
|
107
|
-
Credentials are saved automatically.
|
|
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
|
-
|
|
136
|
+
### Step 4 — Enable providers in your region
|
|
112
137
|
|
|
113
|
-
1. Medusa Admin →
|
|
138
|
+
1. Go to **Medusa Admin → Settings → Regions → [your region]**
|
|
114
139
|
2. Under **Payment Providers**, enable:
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
148
|
+
### Step 5 — Configure settings *(optional)*
|
|
121
149
|
|
|
122
|
-
All settings
|
|
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
|
-
|
|
160
|
+
### Step 6 — Add PayPal to your storefront
|
|
133
161
|
|
|
134
|
-
|
|
162
|
+
The checkout UI is shipped as a separate package — **install it inside your storefront project**, not in this backend.
|
|
135
163
|
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
170
|
+
## 📄 License
|
|
141
171
|
|
|
142
|
-
|
|
172
|
+
MIT © [Easy Payment](https://www.npmjs.com/package/@easypayment/medusa-paypal)
|