@orchesty/connector-paypal 1.0.1 → 2.0.0

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/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # PayPal Connector
2
+
3
+ [![npm](https://img.shields.io/npm/v/@orchesty/connector-paypal?color=15ba68)](https://www.npmjs.com/package/@orchesty/connector-paypal)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-15ba68)](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
5
+
6
+ An [Orchesty](https://orchesty.io) connector for PayPal, one of the most widely used online payment platforms, enabling order creation, payouts, and product catalogue management.
7
+
8
+ ## Application Type
9
+
10
+ **Basic (client credentials)**
11
+
12
+ This connector uses a Client ID and Client Secret to obtain a Bearer access token from the PayPal OAuth2 endpoint (`POST /v1/oauth2/token`) on each request. The application requires a `CurlSender` instance to be injected via its constructor.
13
+
14
+ | Field | Description |
15
+ |---|---|
16
+ | `client_id` | Client ID from the PayPal Developer Dashboard |
17
+ | `client_secret` | Client Secret from the PayPal Developer Dashboard |
18
+
19
+ ## Components
20
+
21
+ | Class | Type | Description |
22
+ |---|---|---|
23
+ | `PaypalCreateOrderConnector` | Connector | Creates a new PayPal checkout order via `POST /v2/checkout/orders` |
24
+ | `PaypalCreatePayoutConnector` | Connector | Initiates a payout to one or more recipients via `POST /v1/payments/payouts` |
25
+ | `PaypalCreateProductConnector` | Connector | Creates a new product in the PayPal catalogue via `POST /v1/catalogs/products` |
26
+
27
+ ## Setup
28
+
29
+ ### Credentials
30
+
31
+ 1. Log in to the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard/).
32
+ 2. Navigate to **Apps & Credentials** and open or create your app.
33
+ 3. Copy the **Client ID** and **Client Secret** for your app.
34
+ 4. In Orchesty, open the PayPal application settings and fill in both fields.
35
+
36
+ ### API Documentation
37
+
38
+ PayPal REST API: [https://developer.paypal.com/docs/api/overview/](https://developer.paypal.com/docs/api/overview/)
39
+
40
+ ## Installation & Usage
41
+
42
+ Install the package:
43
+
44
+ ```bash
45
+ npm install @orchesty/connector-paypal @orchesty/nodejs-sdk
46
+ # or
47
+ pnpm add @orchesty/connector-paypal @orchesty/nodejs-sdk
48
+ ```
49
+
50
+ Register the application and nodes in your Orchesty DI container. The `PaypalApplication` requires a `CurlSender` instance:
51
+
52
+ ```typescript
53
+ import { container } from '@orchesty/nodejs-sdk';
54
+ import CurlSender from '@orchesty/nodejs-sdk/dist/lib/Transport/Curl/CurlSender';
55
+ import PaypalApplication from '@orchesty/connector-paypal/dist/PaypalApplication';
56
+ import PaypalCreateOrderConnector from '@orchesty/connector-paypal/dist/Connector/PaypalCreateOrderConnector';
57
+ import PaypalCreatePayoutConnector from '@orchesty/connector-paypal/dist/Connector/PaypalCreatePayoutConnector';
58
+ import PaypalCreateProductConnector from '@orchesty/connector-paypal/dist/Connector/PaypalCreateProductConnector';
59
+
60
+ const app = new PaypalApplication(container.get(CurlSender));
61
+ container.setApplication(app);
62
+ container.setNode(new PaypalCreateOrderConnector(), app);
63
+ container.setNode(new PaypalCreatePayoutConnector(), app);
64
+ container.setNode(new PaypalCreateProductConnector(), app);
65
+ ```
66
+
67
+ ## License
68
+
69
+ This connector is released under the **Apache License 2.0**. See the [LICENSE](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE) file for the full license text.
70
+
71
+ ## Contributing
72
+
73
+ Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
74
+
75
+ For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the **[Contributing to Connectors](https://orchesty.io/community/contributing-to-connectors)** guide.
76
+
77
+ All contributions should include:
78
+ - Source code in `src/` following the existing connector structure
79
+ - Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
80
+ - An updated `CHANGELOG.md` entry
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-paypal",
3
3
  "description": "",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -17,7 +17,7 @@
17
17
  "keywords": [],
18
18
  "author": "info@hanaboso.com",
19
19
  "dependencies": {
20
- "@orchesty/nodejs-sdk": "^4.3.6"
20
+ "@orchesty/nodejs-sdk": "^5.0.8"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=24"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-paypal",
3
3
  "description": "",
4
- "version": "1.0.1",
4
+ "version": "2.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -11,7 +11,7 @@
11
11
  "keywords": [],
12
12
  "author": "info@hanaboso.com",
13
13
  "dependencies": {
14
- "@orchesty/nodejs-sdk": "^4.3.6"
14
+ "@orchesty/nodejs-sdk": "^5.0.8"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=24"