node-paytmpg 5.3.0 → 5.3.2

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.
@@ -1,58 +1,58 @@
1
- <!DOCTYPE html>
2
- <html>
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>Secure Pay</title>
7
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
8
-
9
- <meta name="viewport" content="width=device-width, initial-scale=1">
10
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
11
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
12
-
13
- <link rel="stylesheet" href="css/style.css">
14
-
15
-
16
- </head>
17
-
18
- <body>
19
-
20
- <div class="modal">
21
- <div class="modal__container">
22
-
23
- <div class="modal__content">
24
-
25
-
26
-
27
-
28
- {{{body}}}
29
-
30
-
31
-
32
- </div> <!-- END: .modal__content -->
33
- </div> <!-- END: .modal__container -->
34
- </div> <!-- END: .modal -->
35
- <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
36
-
37
- <script src="js/index.js"></script>
38
-
39
-
40
- <style>
41
-
42
- input:focus {
43
- border-color: {{theme_color}};
44
- }
45
- /*
46
- body,
47
- .form-list__row label {
48
- color: #cc0f0f;
49
- }
50
- input {
51
- color: #cc0f0f;
52
- }
53
-
54
- */
55
- </style>
56
- </body>
57
-
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Secure Pay</title>
7
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
8
+
9
+ <meta name="viewport" content="width=device-width, initial-scale=1">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
12
+
13
+ <link rel="stylesheet" href="css/style.css">
14
+
15
+
16
+ </head>
17
+
18
+ <body>
19
+
20
+ <div class="modal">
21
+ <div class="modal__container">
22
+
23
+ <div class="modal__content">
24
+
25
+
26
+
27
+
28
+ {{{body}}}
29
+
30
+
31
+
32
+ </div> <!-- END: .modal__content -->
33
+ </div> <!-- END: .modal__container -->
34
+ </div> <!-- END: .modal -->
35
+ <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
36
+
37
+ <script src="js/index.js"></script>
38
+
39
+
40
+ <style>
41
+
42
+ input:focus {
43
+ border-color: {{theme_color}};
44
+ }
45
+ /*
46
+ body,
47
+ .form-list__row label {
48
+ color: #cc0f0f;
49
+ }
50
+ input {
51
+ color: #cc0f0f;
52
+ }
53
+
54
+ */
55
+ </style>
56
+ </body>
57
+
58
58
  </html>
@@ -1,50 +1,50 @@
1
- <h2>Payment Status</h2>
2
-
3
- <form action="{{action}}" method="POST">
4
- <ul class="form-list">
5
-
6
-
7
- <li class="form-list__row">
8
- <label>Order ID</label>
9
- <input type="text" name="NAME" required="" value="{{orderId}}" {{readonly}}/>
10
- </li>
11
-
12
- <li class="form-list__row">
13
- <label>Status</label>
14
- <input type="text" name="NAME" required="" value="{{status}}" {{readonly}}/>
15
- </li>
16
-
17
- <li class="form-list__row">
18
- <label>E-Mail</label>
19
- <input type="text" name="EMAIL" required="" value="{{email}}" {{readonly}}/>
20
- </li>
21
-
22
- <li class="form-list__row">
23
- <label>Phone</label>
24
- <input type="text" name="MOBILE_NO" required="" value="{{phone}}" {{readonly}}/>
25
- </li>
26
-
27
-
28
- <li class="form-list__row form-list__row--inline">
29
-
30
- <div>
31
- <label>
32
- Amount
33
- </label>
34
- <input type="text" name="TXN_AMOUNT" required="" value="{{amount}}" {{readonly}} />
35
- </div>
36
-
37
- </li>
38
-
39
-
40
-
41
- <li>
42
- <button type="submit" class="button">DONE</button>
43
- </li>
44
- </ul>
45
-
46
-
47
-
48
-
49
-
1
+ <h2>Payment Status</h2>
2
+
3
+ <form action="{{action}}" method="POST">
4
+ <ul class="form-list">
5
+
6
+
7
+ <li class="form-list__row">
8
+ <label>Order ID</label>
9
+ <input type="text" name="NAME" required="" value="{{orderId}}" {{readonly}}/>
10
+ </li>
11
+
12
+ <li class="form-list__row">
13
+ <label>Status</label>
14
+ <input type="text" name="NAME" required="" value="{{status}}" {{readonly}}/>
15
+ </li>
16
+
17
+ <li class="form-list__row">
18
+ <label>E-Mail</label>
19
+ <input type="text" name="EMAIL" required="" value="{{email}}" {{readonly}}/>
20
+ </li>
21
+
22
+ <li class="form-list__row">
23
+ <label>Phone</label>
24
+ <input type="text" name="MOBILE_NO" required="" value="{{phone}}" {{readonly}}/>
25
+ </li>
26
+
27
+
28
+ <li class="form-list__row form-list__row--inline">
29
+
30
+ <div>
31
+ <label>
32
+ Amount
33
+ </label>
34
+ <input type="text" name="TXN_AMOUNT" required="" value="{{amount}}" {{readonly}} />
35
+ </div>
36
+
37
+ </li>
38
+
39
+
40
+
41
+ <li>
42
+ <button type="submit" class="button">DONE</button>
43
+ </li>
44
+ </ul>
45
+
46
+
47
+
48
+
49
+
50
50
  </form>
package/app.yaml CHANGED
@@ -1,18 +1,18 @@
1
- # Copyright 2017, Google, Inc.
2
- # Licensed under the Apache License, Version 2.0 (the "License");
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
8
- # Unless required by applicable law or agreed to in writing, software
9
- # distributed under the License is distributed on an "AS IS" BASIS,
10
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- # See the License for the specific language governing permissions and
12
- # limitations under the License.
13
- #
14
- # [START runtime]
15
- runtime: nodejs
16
- env: flex
17
- # [END runtime]
18
-
1
+ # Copyright 2017, Google, Inc.
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ #
6
+ # http://www.apache.org/licenses/LICENSE-2.0
7
+ #
8
+ # Unless required by applicable law or agreed to in writing, software
9
+ # distributed under the License is distributed on an "AS IS" BASIS,
10
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ # See the License for the specific language governing permissions and
12
+ # limitations under the License.
13
+ #
14
+ # [START runtime]
15
+ runtime: nodejs
16
+ env: flex
17
+ # [END runtime]
18
+
package/example.js CHANGED
@@ -1,51 +1,51 @@
1
- var express=require('express')
2
- var app=express()
3
-
4
- var MONGOURL="mongodb+srv://username:pasws@host.net/dbname";
5
-
6
- /***
7
- * Uncomment in case you want to use multidborm
8
- * https://www.npmjs.com/package/multi-db-orm
9
-
10
- const { MultiDbORM, FireStoreDB, MongoDB, SQLiteDB, Sync } = require("multi-db-orm");
11
- var mongodb = new MongoDB(MONGOURL);
12
- app.multidborm = mongodb;
13
-
14
- */
15
-
16
- app.set('np_config', {
17
- "host_url":"http://127.0.0.1:5542",
18
- "view_path":"/../views/",
19
- "paytm_url":"https://securegw-stage.paytm.in",
20
- "MID":"XXXXX",
21
- "WEBSITE":"WEBSTAGING",
22
- "KEY":"XXXXX",
23
- "CHANNEL_ID":"WAP",
24
- "INDUSTRY_TYPE_ID":"Retail",
25
- "homepage":"/",
26
- "path_prefix":"_pay",
27
- "theme_color":"#231530",
28
- "db_url":MONGOURL // Remove this property in case you want to use multidborm
29
- });
30
-
31
- if(process.env.CONFIG){
32
-
33
- app.set('np_config', JSON.parse(process.env.CONFIG));
34
- console.log('using config from env',process.env.CONFIG);
35
-
36
- }
37
-
38
- require('./index')(app,express)
39
-
40
- app.all('/',function(req,res)
41
- {
42
- res.redirect('/_pay/init')
43
- })
44
-
45
-
46
- app.listen(process.env.PORT || 5542,function()
47
- {
48
-
49
- console.log("Server Started At ",process.env.PORT || 5542)
50
-
51
- })
1
+ var express=require('express')
2
+ var app=express()
3
+
4
+ var MONGOURL="mongodb+srv://username:pasws@host.net/dbname";
5
+
6
+ /***
7
+ * Uncomment in case you want to use multidborm
8
+ * https://www.npmjs.com/package/multi-db-orm
9
+
10
+ const { MultiDbORM, FireStoreDB, MongoDB, SQLiteDB, Sync } = require("multi-db-orm");
11
+ var mongodb = new MongoDB(MONGOURL);
12
+ app.multidborm = mongodb;
13
+
14
+ */
15
+
16
+ app.set('np_config', {
17
+ "host_url":"http://127.0.0.1:5542",
18
+ "view_path":"/../views/",
19
+ "paytm_url":"https://securegw-stage.paytm.in",
20
+ "MID":"XXXXX",
21
+ "WEBSITE":"WEBSTAGING",
22
+ "KEY":"XXXXX",
23
+ "CHANNEL_ID":"WAP",
24
+ "INDUSTRY_TYPE_ID":"Retail",
25
+ "homepage":"/",
26
+ "path_prefix":"_pay",
27
+ "theme_color":"#231530",
28
+ "db_url":MONGOURL // Remove this property in case you want to use multidborm
29
+ });
30
+
31
+ if(process.env.CONFIG){
32
+
33
+ app.set('np_config', JSON.parse(process.env.CONFIG));
34
+ console.log('using config from env',process.env.CONFIG);
35
+
36
+ }
37
+
38
+ require('./index')(app,express)
39
+
40
+ app.all('/',function(req,res)
41
+ {
42
+ res.redirect('/_pay/init')
43
+ })
44
+
45
+
46
+ app.listen(process.env.PORT || 5542,function()
47
+ {
48
+
49
+ console.log("Server Started At ",process.env.PORT || 5542)
50
+
51
+ })
package/index.js CHANGED
@@ -1,23 +1,23 @@
1
- module.exports = (app, express, callbacks) => {
2
-
3
- var module = {};
4
-
5
- if (app && express) {
6
- require('./app/routes/payment_route.js')(app, express, callbacks)
7
- var config = (app.get('np_config'))
8
- if (config.db_url) {
9
-
10
- module.Transaction = require('./app/models/np_transaction.model.js')
11
- module.User = require('./app/models/np_user.model.js')
12
-
13
- } else if (app.multidborm) {
14
-
15
- module.Transaction = app.NPTransaction;
16
- module.User = app.NPUser;
17
-
18
- }
19
- }
20
-
21
- return module;
22
- };
23
-
1
+ module.exports = (app, express, callbacks) => {
2
+
3
+ var module = {};
4
+
5
+ if (app && express) {
6
+ require('./app/routes/payment_route.js')(app, express, callbacks)
7
+ var config = (app.get('np_config'))
8
+ if (config.db_url) {
9
+
10
+ module.Transaction = require('./app/models/np_transaction.model.js')
11
+ module.User = require('./app/models/np_user.model.js')
12
+
13
+ } else if (app.multidborm) {
14
+
15
+ module.Transaction = app.NPTransaction;
16
+ module.User = app.NPUser;
17
+
18
+ }
19
+ }
20
+
21
+ return module;
22
+ };
23
+
package/package.json CHANGED
@@ -1,41 +1,42 @@
1
- {
2
- "name": "node-paytmpg",
3
- "version": "5.3.0",
4
- "description": "Payment Gateway Integration using NodeJS",
5
- "main": "index.js",
6
- "scripts": {
7
- "start": "node example.js"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/shiveshnavin/node_paytm.git"
12
- },
13
- "keywords": [
14
- "nodejs",
15
- "paytm",
16
- "payment",
17
- "gateway",
18
- "paytm",
19
- "api",
20
- "paytm",
21
- "nodejs"
22
- ],
23
- "author": "Shivesh Navin",
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/shiveshnavin/node_paytm/issues"
27
- },
28
- "homepage": "https://github.com/shiveshnavin/node_paytm#readme",
29
- "dependencies": {
30
- "body-parser": "^1.18.3",
31
- "crypto": "^1.0.1",
32
- "express": "^4.16.4",
33
- "express-handlebars": "^3.0.2",
34
- "mongoose": "^5.4.16",
35
- "multi-db-orm": "^1.0.9",
36
- "nodejs-base64-converter": "^1.0.5",
37
- "razorpay": "^2.0.6",
38
- "request": "^2.88.0",
39
- "util": "^0.11.1"
40
- }
41
- }
1
+ {
2
+ "name": "node-paytmpg",
3
+ "version": "5.3.2",
4
+ "description": "Payment Gateway Integration using NodeJS",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "start": "node example.js"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/shiveshnavin/node_paytm.git"
12
+ },
13
+ "keywords": [
14
+ "nodejs",
15
+ "paytm",
16
+ "payment",
17
+ "gateway",
18
+ "paytm",
19
+ "api",
20
+ "paytm",
21
+ "nodejs"
22
+ ],
23
+ "author": "Shivesh Navin",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/shiveshnavin/node_paytm/issues"
27
+ },
28
+ "homepage": "https://github.com/shiveshnavin/node_paytm#readme",
29
+ "dependencies": {
30
+ "axios": "^1.3.4",
31
+ "body-parser": "^1.18.3",
32
+ "crypto": "^1.0.1",
33
+ "express": "^4.16.4",
34
+ "express-handlebars": "^3.0.2",
35
+ "mongoose": "^5.4.16",
36
+ "multi-db-orm": "^1.0.9",
37
+ "nodejs-base64-converter": "^1.0.5",
38
+ "razorpay": "^2.0.6",
39
+ "request": "^2.88.0",
40
+ "util": "^0.11.1"
41
+ }
42
+ }