You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure you have Node.js (v16.x.x or above) installed.
154
143
155
144
```bash
156
145
npm install
157
146
```
158
147
159
-
4.**📦 Install Frontend Dependencies.**
148
+
3.**📦 Install Frontend Dependencies.**
160
149
161
150
```bash
162
151
cd web
163
152
npm install
164
153
```
165
154
166
-
5.**🔧 Create build of frontend React project.**
155
+
4.**🔧 Create build of frontend React project.**
167
156
168
157
```bash
169
158
npm run build
170
159
```
171
160
172
-
6.**🛠️ Configure Environment Variables.**
161
+
5.**🛠️ Configure Environment Variables.**
173
162
174
163
Open the `app/config.js` file in your project directory. Update the `EXTENSION_API_KEY` and `EXTENSION_API_SECRET` environment variables in `api_key` and `api_secret` with the values obtained from the Partners Panel. These should be set as the default values for the `config` variables.
175
164
@@ -180,8 +169,6 @@ You have successfully set up your payment extension on the Fynd platform.
180
169
|**enable_cors**| cors toggle | Boolean | true | ENABLE_CORS |
181
170
|**env**| node env | String | development | NODE_ENV |
|**sentry.environment**| sentry environment | String | development | SENTRY_ENVIRONMENT |
187
174
|**newrelic.app_name**| new relic app name | String | mock | NEW_RELIC_APP_NAME |
@@ -205,9 +192,7 @@ api_secret: {
205
192
},
206
193
```
207
194
208
-
7. 🖥️ Also update MongoDB Environment Variables according to your machine.
209
-
210
-
8.**🔒 Secure Tunnel Setup.**
195
+
6.**🔒 Secure Tunnel Setup.**
211
196
212
197
Install ngrok or a similar cross-platform application to create secure tunnels, enabling your locally hosted web server to be accessible over the internet.
213
198
@@ -217,15 +202,15 @@ api_secret: {
217
202
</a>
218
203
</p>
219
204
220
-
9. 🚀 Launch ngrok to forward the port used by your local server.
205
+
7. 🚀 Launch ngrok to forward the port used by your local server.
221
206
222
207
```bash
223
208
ngrok http 3000
224
209
```
225
210
226
211
Replace `3000` with the actual port number your server is using. This will generate a public URL that securely tunnels to your local server.
227
212
228
-
10. 🌐 Update default env value for`EXTENSION_BASE_URL` with this URL.
213
+
8. 🌐 Update default env value for`EXTENSION_BASE_URL` with this URL.
229
214
230
215
```javascript
231
216
base_url: {
@@ -237,15 +222,15 @@ base_url: {
237
222
},
238
223
```
239
224
240
-
11. 🛠️ Navigate to your extension in the Partner Panel and update the Extension URL field with the generated ngrok URL.
225
+
9. 🛠️ Navigate to your extension in the Partner Panel and update the Extension URL field with the generated ngrok URL.
241
226
242
-
12. **💻 Run local server.**
227
+
10. **💻 Run local server.**
243
228
244
229
```bash
245
230
npm start
246
231
```
247
232
248
-
13. 🎉 You are ready to go.
233
+
11. 🎉 You are ready to go.
249
234
250
235
### 🧪 Running Test Cases
251
236
@@ -267,72 +252,6 @@ After you have completed the local setup, you can run the test cases to ensure e
267
252
npm test
268
253
```
269
254
270
-
### 🔍 Newrelic Integration (Optional)
271
-
272
-
The payment extension boilerplate comes pre-configured forintegration with New Relic, allowing you to monitor your application's performancein real-time. This feature provides insights to help you improve and optimize your extension efficiently.
273
-
274
-
To leverage New Relic forperformance monitoring, update the default values for the following environment variablesin the app/fdk/config.js file in your project directory. This step ensures the New Relic integration is securely configured with your specific credentials.
275
-
276
-
1. `NEW_RELIC_APP_NAME`: Set this to the name you wish your application to appear as in New Relic. It helps easily identify your project within the New Relic dashboard.
277
-
2. `NEW_RELIC_LICENSE_KEY`: This is your unique New Relic license key, which authorizes the New Relic agent to send monitoring data to your New Relic account.
278
-
279
-
```javascript
280
-
newrelic: {
281
-
app_name: {
282
-
doc: 'new relic app name',
283
-
format: String,
284
-
default: '',
285
-
env: 'NEW_RELIC_APP_NAME',
286
-
arg: 'new_relic_app_name',
287
-
},
288
-
license_key: {
289
-
doc: 'new relic license key',
290
-
format: String,
291
-
default: '',
292
-
env: 'NEW_RELIC_LICENSE_KEY',
293
-
args: 'new_relic_license_key',
294
-
},
295
-
},
296
-
```
297
-
298
-
By updating these variables, you can activate New Relic's data collection, offering a comprehensive view of your application's performance.
299
-
300
-
>**Notes :**
301
-
> To remove New Relic integration completely, delete the New Relic environment variables in your `app/fdk/config.js` file and uninstall the New Relic package with `npm uninstall newrelic`. Remove `require('./connections/newrelic');` from `app/index.js`. Delete the `app/connections/newrelic.js` and `newrelic.js` files and update your documentation accordingly.
302
-
303
-
### 🚨 Sentry Integration (Optional)
304
-
305
-
Similar to New Relic, the payment extension boilerplate comes pre-configured for optional integration with Sentry. Sentry provides real-time error tracking and monitoring, offering insights to quickly identify, diagnose, and fix issues, thereby enhancing your extension's reliability and user experience.
306
-
307
-
To enable Sentry for error monitoring, update the environment variables in the `app/fdk/config.js` file with your Sentry credentials:
308
-
309
-
1. `SENTRY_DSN`: This is the unique Data Source Name (DSN) provided by Sentry, which directs error messages to your Sentry project.
310
-
2. `SENTRY_ENVIRONMENT`: Specify the environment your application is running in, such as development, staging, or production. This helps in filtering and categorizing issues within Sentry.
311
-
312
-
```javascript
313
-
sentry: {
314
-
dsn: {
315
-
doc: 'sentry url',
316
-
format: String,
317
-
default: '',
318
-
env: 'SENTRY_DSN',
319
-
arg: 'sentry_dsn',
320
-
},
321
-
environment: {
322
-
doc: 'sentry environment',
323
-
format: String,
324
-
default: 'development',
325
-
env: 'SENTRY_ENVIRONMENT',
326
-
arg: 'sentry_environment',
327
-
},
328
-
},
329
-
```
330
-
331
-
Configuring these variables enables Sentry's error tracking for your application, offering a layer of insight into its stability and helping you maintain a high-quality user experience.
332
-
333
-
>**Notes :**
334
-
> To remove Sentry integration, delete the Sentry environment variables in your `app/fdk/config.js` file and uninstall the Sentry package with `npm uninstall @sentry/node`. Remove `require('./connections/sentry');` from `app/index.js`. Delete the `app/connections/sentry.js` and `sentry.js` files and update your documentation accordingly.
0 commit comments