n8n-nodes-pinelabs 0.1.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 +202 -0
- package/dist/credentials/PineLabsOnlineApi.credentials.d.ts +8 -0
- package/dist/credentials/PineLabsOnlineApi.credentials.js +58 -0
- package/dist/credentials/PineLabsOnlineApi.credentials.js.map +1 -0
- package/dist/nodes/PineLabsOnline/PineLabsOnline.node.d.ts +5 -0
- package/dist/nodes/PineLabsOnline/PineLabsOnline.node.js +125 -0
- package/dist/nodes/PineLabsOnline/PineLabsOnline.node.js.map +1 -0
- package/dist/nodes/PineLabsOnline/Pine_Labs_Online_Logo.svg +32 -0
- package/dist/nodes/PineLabsOnline/constants/index.d.ts +49 -0
- package/dist/nodes/PineLabsOnline/constants/index.js +53 -0
- package/dist/nodes/PineLabsOnline/constants/index.js.map +1 -0
- package/dist/nodes/PineLabsOnline/enums/index.d.ts +2 -0
- package/dist/nodes/PineLabsOnline/enums/index.js +19 -0
- package/dist/nodes/PineLabsOnline/enums/index.js.map +1 -0
- package/dist/nodes/PineLabsOnline/enums/operations.d.ts +22 -0
- package/dist/nodes/PineLabsOnline/enums/operations.js +44 -0
- package/dist/nodes/PineLabsOnline/enums/operations.js.map +1 -0
- package/dist/nodes/PineLabsOnline/enums/paymentMethods.d.ts +13 -0
- package/dist/nodes/PineLabsOnline/enums/paymentMethods.js +23 -0
- package/dist/nodes/PineLabsOnline/enums/paymentMethods.js.map +1 -0
- package/dist/nodes/PineLabsOnline/operations/createOrder.d.ts +3 -0
- package/dist/nodes/PineLabsOnline/operations/createOrder.js +412 -0
- package/dist/nodes/PineLabsOnline/operations/createOrder.js.map +1 -0
- package/dist/nodes/PineLabsOnline/operations/createPaymentLink.d.ts +3 -0
- package/dist/nodes/PineLabsOnline/operations/createPaymentLink.js +561 -0
- package/dist/nodes/PineLabsOnline/operations/createPaymentLink.js.map +1 -0
- package/dist/nodes/PineLabsOnline/operations/getOrder.d.ts +3 -0
- package/dist/nodes/PineLabsOnline/operations/getOrder.js +42 -0
- package/dist/nodes/PineLabsOnline/operations/getOrder.js.map +1 -0
- package/dist/nodes/PineLabsOnline/operations/getPaymentLink.d.ts +3 -0
- package/dist/nodes/PineLabsOnline/operations/getPaymentLink.js +42 -0
- package/dist/nodes/PineLabsOnline/operations/getPaymentLink.js.map +1 -0
- package/dist/nodes/PineLabsOnline/operations/index.d.ts +4 -0
- package/dist/nodes/PineLabsOnline/operations/index.js +21 -0
- package/dist/nodes/PineLabsOnline/operations/index.js.map +1 -0
- package/dist/nodes/PineLabsOnline/types/index.d.ts +96 -0
- package/dist/nodes/PineLabsOnline/types/index.js +3 -0
- package/dist/nodes/PineLabsOnline/types/index.js.map +1 -0
- package/dist/nodes/PineLabsOnline/utils/apiRequest.d.ts +2 -0
- package/dist/nodes/PineLabsOnline/utils/apiRequest.js +103 -0
- package/dist/nodes/PineLabsOnline/utils/apiRequest.js.map +1 -0
- package/dist/nodes/PineLabsOnline/utils/formatters.d.ts +2 -0
- package/dist/nodes/PineLabsOnline/utils/formatters.js +11 -0
- package/dist/nodes/PineLabsOnline/utils/formatters.js.map +1 -0
- package/dist/nodes/PineLabsOnline/utils/index.d.ts +3 -0
- package/dist/nodes/PineLabsOnline/utils/index.js +15 -0
- package/dist/nodes/PineLabsOnline/utils/index.js.map +1 -0
- package/dist/nodes/PineLabsOnline/utils/validators.d.ts +5 -0
- package/dist/nodes/PineLabsOnline/utils/validators.js +51 -0
- package/dist/nodes/PineLabsOnline/utils/validators.js.map +1 -0
- package/dist/package.json +66 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# n8n-nodes-pinelabs
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/n8n-nodes-pinelabs)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
This is an n8n community node package that enables integration with Pine Labs Online Pay by Link APIs. It allows you to create and manage payment links directly within your n8n workflows.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Create Payment Link**: Generate unique payment links that can be shared with customers via email, SMS, or messaging apps
|
|
11
|
+
- **Get Payment Link**: Fetch payment link details by Payment Link ID
|
|
12
|
+
- **Auto-authentication**: Automatically handles Bearer token generation using your Client ID and Secret
|
|
13
|
+
- **Environment Support**: Switch between UAT (testing) and Production environments
|
|
14
|
+
- **Comprehensive Validation**: Built-in validation for amounts, references, and expiry dates
|
|
15
|
+
- **Rich Response Data**: Enriched responses with formatted amounts and API metadata
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
### Community Node Installation (Recommended)
|
|
20
|
+
|
|
21
|
+
1. Go to **Settings** > **Community Nodes** in your n8n instance
|
|
22
|
+
2. Click **Install a Community Node**
|
|
23
|
+
3. Enter `n8n-nodes-pinelabs`
|
|
24
|
+
4. Click **Install**
|
|
25
|
+
|
|
26
|
+
### Manual Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cd ~/.n8n/nodes
|
|
30
|
+
npm install n8n-nodes-pinelabs
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Restart your n8n instance after installation.
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
You need Pine Labs Online API credentials:
|
|
38
|
+
- **Client ID**
|
|
39
|
+
- **Client Secret**
|
|
40
|
+
- Access to either UAT or Production environment
|
|
41
|
+
|
|
42
|
+
Contact Pine Labs to obtain your credentials.
|
|
43
|
+
|
|
44
|
+
## Configuration
|
|
45
|
+
|
|
46
|
+
### 1. Add Credentials
|
|
47
|
+
|
|
48
|
+
1. In n8n, go to **Credentials** > **New**
|
|
49
|
+
2. Search for "Pine Labs Online API"
|
|
50
|
+
3. Fill in:
|
|
51
|
+
- **Environment**: Choose "UAT (Testing)" or "Production"
|
|
52
|
+
- **Client ID**: Your Pine Labs Client ID
|
|
53
|
+
- **Client Secret**: Your Pine Labs Client Secret
|
|
54
|
+
4. Click **Test** to verify your credentials
|
|
55
|
+
5. Click **Save**
|
|
56
|
+
|
|
57
|
+
### 2. Use in Workflows
|
|
58
|
+
|
|
59
|
+
1. Add a new node to your workflow
|
|
60
|
+
2. Search for "Pine Labs Online"
|
|
61
|
+
3. Select the node
|
|
62
|
+
4. Choose your credential
|
|
63
|
+
5. Select an operation:
|
|
64
|
+
- **Create Payment Link**: Create a new payment link
|
|
65
|
+
- **Get Payment Link**: Retrieve an existing payment link
|
|
66
|
+
|
|
67
|
+
## Operations
|
|
68
|
+
|
|
69
|
+
### Create Payment Link
|
|
70
|
+
|
|
71
|
+
Creates a payment link and sends it to the customer.
|
|
72
|
+
|
|
73
|
+
**Required Fields:**
|
|
74
|
+
- Amount (in Paisa, 100 paisa = Rs 1)
|
|
75
|
+
- Currency (e.g., "INR")
|
|
76
|
+
- Merchant Payment Link Reference (unique identifier, 1-50 chars)
|
|
77
|
+
- Customer Email
|
|
78
|
+
- Customer First Name
|
|
79
|
+
- Customer Last Name
|
|
80
|
+
- Customer Mobile Number
|
|
81
|
+
|
|
82
|
+
**Optional Fields (in Additional Options):**
|
|
83
|
+
- Description
|
|
84
|
+
- Expire By (max 180 days from now)
|
|
85
|
+
- Allowed Payment Methods (Card, UPI, Net Banking, Wallet, etc.)
|
|
86
|
+
- Country Code
|
|
87
|
+
- Customer ID
|
|
88
|
+
- GSTIN
|
|
89
|
+
- Billing Address
|
|
90
|
+
- Shipping Address
|
|
91
|
+
- Product Details
|
|
92
|
+
- Cart Coupon Discount
|
|
93
|
+
- Merchant Metadata
|
|
94
|
+
|
|
95
|
+
**Response:**
|
|
96
|
+
Returns the complete payment link object including:
|
|
97
|
+
- `payment_link`: The generated URL
|
|
98
|
+
- `payment_link_id`: Unique identifier
|
|
99
|
+
- `status`: Current status (e.g., "CREATED")
|
|
100
|
+
- `_amount_formatted`: Human-readable amount (e.g., "Rs 1,000.00")
|
|
101
|
+
- `_api_info`: API endpoint and documentation links
|
|
102
|
+
|
|
103
|
+
### Get Payment Link
|
|
104
|
+
|
|
105
|
+
Fetches a payment link by its Payment Link ID.
|
|
106
|
+
|
|
107
|
+
**Required Fields:**
|
|
108
|
+
- Payment Link ID (max 50 chars)
|
|
109
|
+
|
|
110
|
+
**Response:**
|
|
111
|
+
Returns the complete payment link object with current status and details.
|
|
112
|
+
|
|
113
|
+
## Example Workflows
|
|
114
|
+
|
|
115
|
+
### Simple Payment Link Creation
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
1. Manual Trigger
|
|
119
|
+
2. Pine Labs Online (Create Payment Link)
|
|
120
|
+
- Amount: 100000 (Rs 1,000)
|
|
121
|
+
- Currency: INR
|
|
122
|
+
- Merchant Reference: order_123
|
|
123
|
+
- Customer Email: customer@example.com
|
|
124
|
+
- Customer First Name: John
|
|
125
|
+
- Customer Last Name: Doe
|
|
126
|
+
- Customer Mobile: 9876543210
|
|
127
|
+
3. Send Email (with payment link)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Check Payment Status
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
1. Schedule Trigger (every 5 minutes)
|
|
134
|
+
2. Pine Labs Online (Get Payment Link)
|
|
135
|
+
- Payment Link ID: {{ $json.payment_link_id }}
|
|
136
|
+
3. IF Node (check status)
|
|
137
|
+
- If status = "PROCESSED": Send confirmation
|
|
138
|
+
- Else: Continue waiting
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Validation
|
|
142
|
+
|
|
143
|
+
The node includes built-in validation:
|
|
144
|
+
- **Amount**: Must be between 100 (Rs 1) and 100000000 (Rs 10 lakh) in paisa
|
|
145
|
+
- **Merchant Reference**: 1-50 characters, only A-Z, a-z, 0-9, -, _
|
|
146
|
+
- **Payment Link ID**: Required and max 50 characters
|
|
147
|
+
- **Expire By**: Must be within 180 days from now
|
|
148
|
+
|
|
149
|
+
## Error Handling
|
|
150
|
+
|
|
151
|
+
Errors are returned with descriptive messages:
|
|
152
|
+
- Authentication errors include hints to check credentials
|
|
153
|
+
- API errors include error codes and messages from Pine Labs
|
|
154
|
+
- Use the "Continue on Fail" option to handle errors gracefully in workflows
|
|
155
|
+
|
|
156
|
+
## API Documentation
|
|
157
|
+
|
|
158
|
+
For detailed API documentation, visit:
|
|
159
|
+
- [Pine Labs Developer Portal](https://developer.pinelabsonline.com/)
|
|
160
|
+
- [Create Payment Link API](https://developer.pinelabsonline.com/reference/payment-link-create)
|
|
161
|
+
- [Get Payment Link API](https://developer.pinelabsonline.com/reference/payment-link-get-by-payment-link-id)
|
|
162
|
+
|
|
163
|
+
## Support
|
|
164
|
+
|
|
165
|
+
- **Documentation**: [Pine Labs API Docs](https://developer.pinelabsonline.com/)
|
|
166
|
+
|
|
167
|
+
## Development
|
|
168
|
+
|
|
169
|
+
### Build
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm install
|
|
173
|
+
npm run build
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Lint
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npm run lint
|
|
180
|
+
npm run lintfix
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Test Locally
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Link the package
|
|
187
|
+
npm link
|
|
188
|
+
|
|
189
|
+
# Link to n8n
|
|
190
|
+
cd ~/.n8n
|
|
191
|
+
npm link n8n-nodes-pinelabs
|
|
192
|
+
|
|
193
|
+
# Start n8n
|
|
194
|
+
n8n start
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
MIT
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class PineLabsOnlineApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
test: ICredentialTestRequest;
|
|
8
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PineLabsOnlineApi = void 0;
|
|
4
|
+
class PineLabsOnlineApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'pineLabsOnlineApi';
|
|
7
|
+
this.displayName = 'Pine Labs Online API';
|
|
8
|
+
this.documentationUrl = 'httpsGithubComPluralPvtN8nNodesPinelabsCredentials';
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Environment',
|
|
12
|
+
name: 'environment',
|
|
13
|
+
type: 'options',
|
|
14
|
+
options: [
|
|
15
|
+
{ name: 'UAT (Testing)', value: 'uat' },
|
|
16
|
+
{ name: 'Production', value: 'production' },
|
|
17
|
+
],
|
|
18
|
+
default: 'uat',
|
|
19
|
+
description: 'Select UAT for testing or Production for live transactions',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Client ID',
|
|
23
|
+
name: 'clientId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '',
|
|
26
|
+
required: true,
|
|
27
|
+
placeholder: 'a17ce30e-f88e-4f81-ada1-c3b4909ed232',
|
|
28
|
+
description: 'Your Pine Labs Client ID',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Client Secret',
|
|
32
|
+
name: 'clientSecret',
|
|
33
|
+
type: 'string',
|
|
34
|
+
typeOptions: { password: true },
|
|
35
|
+
default: '',
|
|
36
|
+
required: true,
|
|
37
|
+
description: 'Your Pine Labs Client Secret',
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
this.test = {
|
|
41
|
+
request: {
|
|
42
|
+
baseURL: '={{ $credentials.environment === "production" ? "https://api.pluralpay.in/api" : "https://pluraluat.v2.pinepg.in/api" }}',
|
|
43
|
+
url: '/auth/v1/token',
|
|
44
|
+
method: 'POST',
|
|
45
|
+
body: {
|
|
46
|
+
client_id: '={{ $credentials.clientId }}',
|
|
47
|
+
client_secret: '={{ $credentials.clientSecret }}',
|
|
48
|
+
grant_type: 'client_credentials',
|
|
49
|
+
},
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.PineLabsOnlineApi = PineLabsOnlineApi;
|
|
58
|
+
//# sourceMappingURL=PineLabsOnlineApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PineLabsOnlineApi.credentials.js","sourceRoot":"","sources":["../../credentials/PineLabsOnlineApi.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAA9B;QACC,SAAI,GAAG,mBAAmB,CAAC;QAE3B,gBAAW,GAAG,sBAAsB,CAAC;QAErC,qBAAgB,GAAG,oDAAoD,CAAC;QAExE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,EAAE;oBACvC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;iBAC3C;gBACD,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,4DAA4D;aACzE;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,sCAAsC;gBACnD,WAAW,EAAE,0BAA0B;aACvC;YACD;gBACC,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,8BAA8B;aAC3C;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EACN,0HAA0H;gBAC3H,GAAG,EAAE,gBAAgB;gBACrB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACL,SAAS,EAAE,8BAA8B;oBACzC,aAAa,EAAE,kCAAkC;oBACjD,UAAU,EAAE,oBAAoB;iBAChC;gBACD,OAAO,EAAE;oBACR,cAAc,EAAE,kBAAkB;iBAClC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAxDD,8CAwDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class PineLabsOnline implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PineLabsOnline = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const constants_1 = require("./constants");
|
|
6
|
+
const enums_1 = require("./enums");
|
|
7
|
+
const operations_1 = require("./operations");
|
|
8
|
+
class PineLabsOnline {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.description = {
|
|
11
|
+
displayName: constants_1.NODE_CONFIG.DISPLAY_NAME,
|
|
12
|
+
name: constants_1.NODE_CONFIG.NAME,
|
|
13
|
+
icon: constants_1.NODE_CONFIG.ICON,
|
|
14
|
+
group: ['transform'],
|
|
15
|
+
version: constants_1.NODE_CONFIG.VERSION,
|
|
16
|
+
subtitle: constants_1.NODE_CONFIG.SUBTITLE,
|
|
17
|
+
description: constants_1.NODE_CONFIG.DESCRIPTION,
|
|
18
|
+
defaults: {
|
|
19
|
+
name: constants_1.NODE_CONFIG.DISPLAY_NAME,
|
|
20
|
+
},
|
|
21
|
+
inputs: ['main'],
|
|
22
|
+
outputs: ['main'],
|
|
23
|
+
credentials: [
|
|
24
|
+
{
|
|
25
|
+
name: constants_1.NODE_CONFIG.CREDENTIAL_NAME,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
properties: [
|
|
30
|
+
{
|
|
31
|
+
displayName: 'Resource',
|
|
32
|
+
name: 'resource',
|
|
33
|
+
type: 'options',
|
|
34
|
+
noDataExpression: true,
|
|
35
|
+
options: [
|
|
36
|
+
{
|
|
37
|
+
name: 'Payment Link',
|
|
38
|
+
value: enums_1.Resource.PAYMENT_LINK,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Order',
|
|
42
|
+
value: enums_1.Resource.ORDER,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
default: enums_1.Resource.PAYMENT_LINK,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Operation',
|
|
49
|
+
name: 'operation',
|
|
50
|
+
type: 'options',
|
|
51
|
+
noDataExpression: true,
|
|
52
|
+
displayOptions: {
|
|
53
|
+
show: {
|
|
54
|
+
resource: [enums_1.Resource.PAYMENT_LINK],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
options: enums_1.PAYMENT_LINK_OPERATIONS,
|
|
58
|
+
default: enums_1.Operation.CREATE_PAYMENT_LINK,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
displayName: 'Operation',
|
|
62
|
+
name: 'operation',
|
|
63
|
+
type: 'options',
|
|
64
|
+
noDataExpression: true,
|
|
65
|
+
displayOptions: {
|
|
66
|
+
show: {
|
|
67
|
+
resource: [enums_1.Resource.ORDER],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
options: enums_1.ORDER_OPERATIONS,
|
|
71
|
+
default: enums_1.Operation.CREATE_ORDER,
|
|
72
|
+
},
|
|
73
|
+
...operations_1.createPaymentLinkDescription,
|
|
74
|
+
...operations_1.createOrderDescription,
|
|
75
|
+
...operations_1.getOrderDescription,
|
|
76
|
+
...operations_1.getPaymentLinkDescription,
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
async execute() {
|
|
81
|
+
const items = this.getInputData();
|
|
82
|
+
const returnData = [];
|
|
83
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
84
|
+
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
|
|
85
|
+
try {
|
|
86
|
+
let responseData;
|
|
87
|
+
if (operation === enums_1.Operation.CREATE_PAYMENT_LINK) {
|
|
88
|
+
responseData = await operations_1.executeCreatePaymentLink.call(this, itemIndex);
|
|
89
|
+
}
|
|
90
|
+
else if (operation === enums_1.Operation.CREATE_ORDER) {
|
|
91
|
+
responseData = await operations_1.executeCreateOrder.call(this, itemIndex);
|
|
92
|
+
}
|
|
93
|
+
else if (operation === enums_1.Operation.GET_ORDER) {
|
|
94
|
+
responseData = await operations_1.executeGetOrder.call(this, itemIndex);
|
|
95
|
+
}
|
|
96
|
+
else if (operation === enums_1.Operation.GET_PAYMENT_LINK) {
|
|
97
|
+
responseData = await operations_1.executeGetPaymentLink.call(this, itemIndex);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported`, { itemIndex });
|
|
101
|
+
}
|
|
102
|
+
returnData.push({
|
|
103
|
+
json: responseData,
|
|
104
|
+
pairedItem: { item: itemIndex },
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (this.continueOnFail()) {
|
|
109
|
+
returnData.push({
|
|
110
|
+
json: {
|
|
111
|
+
error: error.message,
|
|
112
|
+
itemIndex,
|
|
113
|
+
},
|
|
114
|
+
pairedItem: { item: itemIndex },
|
|
115
|
+
});
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return [returnData];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.PineLabsOnline = PineLabsOnline;
|
|
125
|
+
//# sourceMappingURL=PineLabsOnline.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PineLabsOnline.node.js","sourceRoot":"","sources":["../../../nodes/PineLabsOnline/PineLabsOnline.node.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 200 110">
|
|
3
|
+
<!-- Optimized for n8n node display - scaled for better visibility -->
|
|
4
|
+
<defs>
|
|
5
|
+
<style>
|
|
6
|
+
.st0 {
|
|
7
|
+
fill: #003434;
|
|
8
|
+
}
|
|
9
|
+
</style>
|
|
10
|
+
</defs>
|
|
11
|
+
<g transform="translate(-43, -44)">
|
|
12
|
+
<g>
|
|
13
|
+
<path class="st0" d="M97.22,55.79c-.21-.02-.42-.02-.63-.02-2.86,0-5.35.96-7.03,2.1l-.1-.07v-1.44s-6.55,0-6.55,0v28.4s5.56.02,5.56.02h.98s0-21.17,0-21.17c1.51-1.14,3.45-1.97,5.73-1.97.5,0,1.01.02,1.46.13,3.23.75,4.39,3.43,4.39,6.26,0,6.03,0,16.74,0,16.74h6.52s0-17.91,0-17.91c0-3.64-1.05-6.56-3.28-8.41-1.97-1.63-4.43-2.56-7.07-2.67Z"/>
|
|
14
|
+
<polygon class="st0" points="71.5 56.36 71.5 84.77 78.04 84.77 78.04 56.36 78.03 56.36 71.5 56.36"/>
|
|
15
|
+
<path class="st0" d="M124.82,55.75c-7.4,0-13.87,5.88-13.87,14.89,0,1,.08,1.97.24,2.89.06.34.13.68.21,1.01.03.11.05.22.08.33.03.11.06.22.09.32.08.28.17.56.26.83,2.01,5.83,7.21,9.4,12.97,9.4.19,0,.39,0,.58-.01,4.49-.18,8.57-2.51,10.66-6.86.29-.59.54-1.23.74-1.9h-.74s-.4,0-.4,0c0,0-4.84,0-4.84,0-1.46,2.52-4.41,3.48-7.17,3-3.18-.56-5.11-2.98-5.71-6.06-.07-.36-.12-.73-.16-1.10h20.12c.11-.75.17-1.9.17-2.83,0-9.12-6.48-13.91-13.22-13.91ZM117.74,67.63c.83-4.27,3.92-6.23,7.02-6.23,3.04,0,6.53,1.96,7.03,6.23h-14.05Z"/>
|
|
16
|
+
<path class="st0" d="M53.15,56.36c-2.6,0-4.77,0-6.8,0h-5.7s0,40.38,0,40.38h6.69s0-13.43,0-13.43l.11-.06c1.71,1.15,4.26,2.14,7.19,2.14,7.08,0,13.05-5.66,13.05-14.38,0-8.89-6.14-14.65-14.54-14.65ZM53.2,79.39c-2.32,0-4.31-.87-5.86-2.02v-15.17c1.72,0,3.65,0,5.58,0,5.03,0,8.02,3.45,8.02,8.47,0,4.97-2.93,8.72-7.74,8.72Z"/>
|
|
17
|
+
<path class="st0" d="M208.21,55.75c-2.86,0-5.35.96-7.02,2.09l-.11-.06v-13.08s-6.54-.01-6.54-.01v40.06s5.57.01,5.57.01c1.98,0,4.1,0,6.65,0,8.21,0,14.21-6.26,14.21-14.95,0-8.52-5.84-14.06-12.75-14.06ZM206.53,79.06c-1.89,0-3.77,0-5.46,0v-15.46c1.51-1.13,3.46-1.98,5.73-1.98,4.70,0,7.56,3.67,7.56,8.52s-2.92,8.91-7.84,8.91Z"/>
|
|
18
|
+
<path class="st0" d="M237.86,67.75c-3.95-.87-7.3-.81-7.3-3.46,0-1.96,1.84-2.83,4.65-2.83s6.59.92,9.84,2.89v-6.35c-2.81-1.56-6.65-2.25-9.84-2.25-6.38,0-11.19,3.12-11.24,9.06,0,5.14,3.46,7.04,8.54,8.19,4.05.92,7.46.81,7.46,3.64,0,2.14-1.89,3.06-4.86,3.06-2.92,0-6.97-.98-10.32-3.17v6.52c2.97,1.62,6.92,2.37,10.21,2.37,6.27,0,11.56-2.94,11.56-9.35,0-5.42-3.62-7.16-8.70-8.31Z"/>
|
|
19
|
+
<path class="st0" d="M183.19,57.78l-.11.07c-4.14-2.75-8.55-1.99-8.55-1.99-7.74,1.07-11.56,8.14-11.97,13.25-.34,4.38.77,11.17,7.97,14.98,4.88,2.59,10.01.81,12.55-.81.04.02.07.05.11.07v1.44s6.55,0,6.55,0v-28.46s-6.54,0-6.54,0v1.44ZM183.19,77.54c-2.37,1.61-4.53,2.13-6.36,1.93-5.9-.63-6.71-5.91-6.87-7.21-.33-2.66-.05-7.55,3.78-9.67,4.84-2.67,9.45,1.01,9.45,1.01v13.94Z"/>
|
|
20
|
+
<path class="st0" d="M157,77.98v-33.28s-6.52,0-6.52,0v33.49s0,.05,0,.05v.04s0,0,0,0c.02,6.03,4.21,6.5,5.49,6.5h5.41s0-5.69,0-5.69h-4.35"/>
|
|
21
|
+
</g>
|
|
22
|
+
<polygon class="st0" points="71.48 49.64 76.13 44.99 82.73 44.99 82.73 51.59 78.08 56.24 78.08 49.64 71.48 49.64"/>
|
|
23
|
+
</g>
|
|
24
|
+
<g transform="translate(-43, -44)">
|
|
25
|
+
<path class="st0" d="M176.35,112.97c-1.1-.61-1.97-1.47-2.62-2.57-.65-1.1-.97-2.34-.97-3.71s.32-2.61.97-3.7c.65-1.09,1.52-1.95,2.62-2.56s2.31-.92,3.63-.92,2.53.31,3.63.92c1.1.61,1.97,1.47,2.6,2.56.63,1.09.95,2.33.95,3.7s-.32,2.61-.96,3.71c-.64,1.10-1.51,1.96-2.6,2.57s-2.3.92-3.62.92-2.53-.31-3.63-.92ZM182.67,109.65c.67-.75,1.01-1.73,1.01-2.96s-.34-2.23-1.01-2.97-1.57-1.11-2.69-1.11-2.04.37-2.71,1.10-1.01,1.73-1.01,2.98.34,2.23,1.01,2.97c.67.74,1.58,1.11,2.71,1.11s2.02-.37,2.69-1.12Z"/>
|
|
26
|
+
<path class="st0" d="M202.02,113.75h-3.42l-5.72-8.66v8.66h-3.42v-14.04h3.42l5.72,8.7v-8.7h3.42v14.04Z"/>
|
|
27
|
+
<path class="st0" d="M208.32,111.11h4.48v2.64h-7.9v-14.04h3.42v11.4Z"/>
|
|
28
|
+
<path class="st0" d="M218.26,99.71v14.04h-3.42v-14.04h3.42Z"/>
|
|
29
|
+
<path class="st0" d="M233.7,113.75h-3.42l-5.72-8.66v8.66h-3.42v-14.04h3.42l5.72,8.7v-8.7h3.42v14.04Z"/>
|
|
30
|
+
<path class="st0" d="M240,102.45v2.84h4.58v2.64h-4.58v3.08h5.18v2.74h-8.6v-14.04h8.6v2.74h-5.18Z"/>
|
|
31
|
+
</g>
|
|
32
|
+
</svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const API_BASE_URLS: {
|
|
2
|
+
readonly UAT: "https://pluraluat.v2.pinepg.in/api";
|
|
3
|
+
readonly PRODUCTION: "https://api.pluralpay.in/api";
|
|
4
|
+
};
|
|
5
|
+
export declare const API_ENDPOINTS: {
|
|
6
|
+
readonly GENERATE_TOKEN: "/auth/v1/token";
|
|
7
|
+
readonly PAYMENT_LINK: "/pay/v1/paymentlink";
|
|
8
|
+
readonly ORDERS: "/checkout/v1/orders";
|
|
9
|
+
readonly GET_ORDER: "/pay/v1/orders";
|
|
10
|
+
};
|
|
11
|
+
export declare const DOCUMENTATION_URLS: {
|
|
12
|
+
readonly CREATE_PAYMENT_LINK: "https://developer.pinelabsonline.com/reference/payment-link-create";
|
|
13
|
+
readonly GET_PAYMENT_LINK: "https://developer.pinelabsonline.com/reference/payment-link-get-by-payment-link-id";
|
|
14
|
+
readonly CREATE_ORDER: "https://developer.pinelabsonline.com/reference/orders-create";
|
|
15
|
+
readonly GET_ORDER: "https://developer.pinelabsonline.com/reference/orders-get-by-order-id";
|
|
16
|
+
};
|
|
17
|
+
export declare const VALIDATION_LIMITS: {
|
|
18
|
+
readonly MIN_AMOUNT: 100;
|
|
19
|
+
readonly MAX_AMOUNT: 100000000;
|
|
20
|
+
readonly MAX_MERCHANT_REF_LENGTH: 50;
|
|
21
|
+
readonly MIN_MERCHANT_REF_LENGTH: 1;
|
|
22
|
+
readonly MAX_PAYMENT_LINK_ID_LENGTH: 50;
|
|
23
|
+
readonly MAX_ORDER_ID_LENGTH: 50;
|
|
24
|
+
readonly MAX_EXPIRE_DAYS: 180;
|
|
25
|
+
};
|
|
26
|
+
export declare const ERROR_MESSAGES: {
|
|
27
|
+
readonly MIN_AMOUNT: "Amount must be at least Rs 1 (100 paisa)";
|
|
28
|
+
readonly MAX_AMOUNT: "Amount must not exceed Rs 10,00,000 (100000000 paisa)";
|
|
29
|
+
readonly INVALID_MERCHANT_REF: "Merchant reference must be 1-50 characters, only A-Z, a-z, 0-9, - and _ allowed";
|
|
30
|
+
readonly TOKEN_GENERATION_FAILED: "Failed to generate Pine Labs access token. Check your Client ID and Secret";
|
|
31
|
+
readonly INVALID_PAYMENT_LINK_ID: "Payment Link ID is required and must not exceed 50 characters";
|
|
32
|
+
readonly INVALID_ORDER_ID: "Order ID is required and must not exceed 50 characters";
|
|
33
|
+
readonly INVALID_EXPIRE_BY: "Expiry timestamp must be within 180 days from now";
|
|
34
|
+
};
|
|
35
|
+
export declare const NODE_CONFIG: {
|
|
36
|
+
readonly DISPLAY_NAME: "Pine Labs Online";
|
|
37
|
+
readonly NAME: "pineLabsOnline";
|
|
38
|
+
readonly ICON: "file:Pine_Labs_Online_Logo.svg";
|
|
39
|
+
readonly GROUP: string[];
|
|
40
|
+
readonly VERSION: 1;
|
|
41
|
+
readonly SUBTITLE: "={{$parameter[\"operation\"]}}";
|
|
42
|
+
readonly DESCRIPTION: "Create and manage Pine Labs Online Pay by Link payment links and orders";
|
|
43
|
+
readonly CREDENTIAL_NAME: "pineLabsOnlineApi";
|
|
44
|
+
};
|
|
45
|
+
export declare const DEFAULT_VALUES: {
|
|
46
|
+
readonly CURRENCY: "INR";
|
|
47
|
+
readonly AMOUNT: 10000;
|
|
48
|
+
readonly COUNTRY_CODE: "91";
|
|
49
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_VALUES = exports.NODE_CONFIG = exports.ERROR_MESSAGES = exports.VALIDATION_LIMITS = exports.DOCUMENTATION_URLS = exports.API_ENDPOINTS = exports.API_BASE_URLS = void 0;
|
|
4
|
+
exports.API_BASE_URLS = {
|
|
5
|
+
UAT: 'https://pluraluat.v2.pinepg.in/api',
|
|
6
|
+
PRODUCTION: 'https://api.pluralpay.in/api',
|
|
7
|
+
};
|
|
8
|
+
exports.API_ENDPOINTS = {
|
|
9
|
+
GENERATE_TOKEN: '/auth/v1/token',
|
|
10
|
+
PAYMENT_LINK: '/pay/v1/paymentlink',
|
|
11
|
+
ORDERS: '/checkout/v1/orders',
|
|
12
|
+
GET_ORDER: '/pay/v1/orders'
|
|
13
|
+
};
|
|
14
|
+
exports.DOCUMENTATION_URLS = {
|
|
15
|
+
CREATE_PAYMENT_LINK: 'https://developer.pinelabsonline.com/reference/payment-link-create',
|
|
16
|
+
GET_PAYMENT_LINK: 'https://developer.pinelabsonline.com/reference/payment-link-get-by-payment-link-id',
|
|
17
|
+
CREATE_ORDER: 'https://developer.pinelabsonline.com/reference/orders-create',
|
|
18
|
+
GET_ORDER: 'https://developer.pinelabsonline.com/reference/orders-get-by-order-id',
|
|
19
|
+
};
|
|
20
|
+
exports.VALIDATION_LIMITS = {
|
|
21
|
+
MIN_AMOUNT: 100,
|
|
22
|
+
MAX_AMOUNT: 100000000,
|
|
23
|
+
MAX_MERCHANT_REF_LENGTH: 50,
|
|
24
|
+
MIN_MERCHANT_REF_LENGTH: 1,
|
|
25
|
+
MAX_PAYMENT_LINK_ID_LENGTH: 50,
|
|
26
|
+
MAX_ORDER_ID_LENGTH: 50,
|
|
27
|
+
MAX_EXPIRE_DAYS: 180,
|
|
28
|
+
};
|
|
29
|
+
exports.ERROR_MESSAGES = {
|
|
30
|
+
MIN_AMOUNT: 'Amount must be at least Rs 1 (100 paisa)',
|
|
31
|
+
MAX_AMOUNT: 'Amount must not exceed Rs 10,00,000 (100000000 paisa)',
|
|
32
|
+
INVALID_MERCHANT_REF: 'Merchant reference must be 1-50 characters, only A-Z, a-z, 0-9, - and _ allowed',
|
|
33
|
+
TOKEN_GENERATION_FAILED: 'Failed to generate Pine Labs access token. Check your Client ID and Secret',
|
|
34
|
+
INVALID_PAYMENT_LINK_ID: 'Payment Link ID is required and must not exceed 50 characters',
|
|
35
|
+
INVALID_ORDER_ID: 'Order ID is required and must not exceed 50 characters',
|
|
36
|
+
INVALID_EXPIRE_BY: 'Expiry timestamp must be within 180 days from now',
|
|
37
|
+
};
|
|
38
|
+
exports.NODE_CONFIG = {
|
|
39
|
+
DISPLAY_NAME: 'Pine Labs Online',
|
|
40
|
+
NAME: 'pineLabsOnline',
|
|
41
|
+
ICON: 'file:Pine_Labs_Online_Logo.svg',
|
|
42
|
+
GROUP: ['transform'],
|
|
43
|
+
VERSION: 1,
|
|
44
|
+
SUBTITLE: '={{$parameter["operation"]}}',
|
|
45
|
+
DESCRIPTION: 'Create and manage Pine Labs Online Pay by Link payment links and orders',
|
|
46
|
+
CREDENTIAL_NAME: 'pineLabsOnlineApi',
|
|
47
|
+
};
|
|
48
|
+
exports.DEFAULT_VALUES = {
|
|
49
|
+
CURRENCY: 'INR',
|
|
50
|
+
AMOUNT: 10000,
|
|
51
|
+
COUNTRY_CODE: '91',
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/PineLabsOnline/constants/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;IAC5B,GAAG,EAAE,oCAAoC;IACzC,UAAU,EAAE,8BAA8B;CACjC,CAAC;AAEE,QAAA,aAAa,GAAG;IAC5B,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,qBAAqB;IACnC,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,gBAAgB;CAClB,CAAC;AAEE,QAAA,kBAAkB,GAAG;IACjC,mBAAmB,EAClB,oEAAoE;IACrE,gBAAgB,EACf,oFAAoF;IACrF,YAAY,EAAE,8DAA8D;IAC5E,SAAS,EAAE,uEAAuE;CACzE,CAAC;AAEE,QAAA,iBAAiB,GAAG;IAChC,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,SAAS;IACrB,uBAAuB,EAAE,EAAE;IAC3B,uBAAuB,EAAE,CAAC;IAC1B,0BAA0B,EAAE,EAAE;IAC9B,mBAAmB,EAAE,EAAE;IACvB,eAAe,EAAE,GAAG;CACX,CAAC;AAEE,QAAA,cAAc,GAAG;IAC7B,UAAU,EAAE,0CAA0C;IACtD,UAAU,EAAE,uDAAuD;IACnE,oBAAoB,EACnB,iFAAiF;IAClF,uBAAuB,EACtB,4EAA4E;IAC7E,uBAAuB,EAAE,+DAA+D;IACxF,gBAAgB,EAAE,wDAAwD;IAC1E,iBAAiB,EAAE,mDAAmD;CAC7D,CAAC;AAEE,QAAA,WAAW,GAAG;IAC1B,YAAY,EAAE,kBAAkB;IAChC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gCAAgC;IACtC,KAAK,EAAE,CAAC,WAAW,CAAa;IAChC,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,yEAAyE;IACtF,eAAe,EAAE,mBAAmB;CAC3B,CAAC;AAEE,QAAA,cAAc,GAAG;IAC7B,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,IAAI;CACT,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./operations"), exports);
|
|
18
|
+
__exportStar(require("./paymentMethods"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/PineLabsOnline/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,mDAAiC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum Resource {
|
|
2
|
+
PAYMENT_LINK = "paymentLink",
|
|
3
|
+
ORDER = "order"
|
|
4
|
+
}
|
|
5
|
+
export declare enum Operation {
|
|
6
|
+
CREATE_PAYMENT_LINK = "createPaymentLink",
|
|
7
|
+
GET_PAYMENT_LINK = "getPaymentLink",
|
|
8
|
+
CREATE_ORDER = "createOrder",
|
|
9
|
+
GET_ORDER = "getOrder"
|
|
10
|
+
}
|
|
11
|
+
export declare const PAYMENT_LINK_OPERATIONS: {
|
|
12
|
+
name: string;
|
|
13
|
+
value: Operation;
|
|
14
|
+
description: string;
|
|
15
|
+
action: string;
|
|
16
|
+
}[];
|
|
17
|
+
export declare const ORDER_OPERATIONS: {
|
|
18
|
+
name: string;
|
|
19
|
+
value: Operation;
|
|
20
|
+
description: string;
|
|
21
|
+
action: string;
|
|
22
|
+
}[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ORDER_OPERATIONS = exports.PAYMENT_LINK_OPERATIONS = exports.Operation = exports.Resource = void 0;
|
|
4
|
+
var Resource;
|
|
5
|
+
(function (Resource) {
|
|
6
|
+
Resource["PAYMENT_LINK"] = "paymentLink";
|
|
7
|
+
Resource["ORDER"] = "order";
|
|
8
|
+
})(Resource || (exports.Resource = Resource = {}));
|
|
9
|
+
var Operation;
|
|
10
|
+
(function (Operation) {
|
|
11
|
+
Operation["CREATE_PAYMENT_LINK"] = "createPaymentLink";
|
|
12
|
+
Operation["GET_PAYMENT_LINK"] = "getPaymentLink";
|
|
13
|
+
Operation["CREATE_ORDER"] = "createOrder";
|
|
14
|
+
Operation["GET_ORDER"] = "getOrder";
|
|
15
|
+
})(Operation || (exports.Operation = Operation = {}));
|
|
16
|
+
exports.PAYMENT_LINK_OPERATIONS = [
|
|
17
|
+
{
|
|
18
|
+
name: 'Create',
|
|
19
|
+
value: Operation.CREATE_PAYMENT_LINK,
|
|
20
|
+
description: 'Create a payment link and send it to the customer',
|
|
21
|
+
action: 'Create a payment link',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Get',
|
|
25
|
+
value: Operation.GET_PAYMENT_LINK,
|
|
26
|
+
description: 'Fetch a payment link by its Payment Link ID',
|
|
27
|
+
action: 'Get a payment link',
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
exports.ORDER_OPERATIONS = [
|
|
31
|
+
{
|
|
32
|
+
name: 'Create',
|
|
33
|
+
value: Operation.CREATE_ORDER,
|
|
34
|
+
description: 'Create an order to initiate a payment',
|
|
35
|
+
action: 'Create an order',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Get',
|
|
39
|
+
value: Operation.GET_ORDER,
|
|
40
|
+
description: 'Fetch an order by its Order ID',
|
|
41
|
+
action: 'Get an order',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../nodes/PineLabsOnline/enums/operations.ts"],"names":[],"mappings":";;;AAAA,IAAY,QAGX;AAHD,WAAY,QAAQ;IACnB,wCAA4B,CAAA;IAC5B,2BAAe,CAAA;AAChB,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAED,IAAY,SAKX;AALD,WAAY,SAAS;IACpB,sDAAyC,CAAA;IACzC,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;AACvB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAEY,QAAA,uBAAuB,GAAG;IACtC;QACC,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS,CAAC,mBAAmB;QACpC,WAAW,EAAE,mDAAmD;QAChE,MAAM,EAAE,uBAAuB;KAC/B;IACD;QACC,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,SAAS,CAAC,gBAAgB;QACjC,WAAW,EAAE,6CAA6C;QAC1D,MAAM,EAAE,oBAAoB;KAC5B;CACD,CAAC;AAEW,QAAA,gBAAgB,GAAG;IAC/B;QACC,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS,CAAC,YAAY;QAC7B,WAAW,EAAE,uCAAuC;QACpD,MAAM,EAAE,iBAAiB;KACzB;IACD;QACC,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,SAAS,CAAC,SAAS;QAC1B,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,cAAc;KACtB;CACD,CAAC"}
|