Skip to content
This repository was archived by the owner on Jul 4, 2024. It is now read-only.

Commit c828974

Browse files
committed
This project is final. Releasing v1.0.0. Thank you
1 parent 20543a6 commit c828974

File tree

4 files changed

+13
-18
lines changed

4 files changed

+13
-18
lines changed

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
{
2-
"name": "netlify-function-test",
2+
"name": "paytm-netlify-lambda",
33
"version": "1.0.0",
4-
"description": "",
5-
"main": "index.js",
4+
"description": "Netlify Lambda Function for Serverless Paytm Payments Integration",
65
"scripts": {
76
"start": "netlify-lambda -c ./config/webpack.config.js serve src",
87
"build": "netlify-lambda -c ./config/webpack.config.js build src"
98
},
109
"repository": {
1110
"type": "git",
12-
"url": "git+https://github.com/soulsam480/netlify-function-test.git"
11+
"url": "git+https://github.com/soulsam480/paytm-netlify-lambda.git"
1312
},
1413
"keywords": [],
1514
"author": "Sambit Sahoo",
16-
"license": "ISC",
15+
"license": "MIT",
1716
"bugs": {
18-
"url": "https://github.com/soulsam480/netlify-function-test/issues"
17+
"url": "https://github.com/soulsam480/paytm-netlify-lambda/issues"
1918
},
20-
"homepage": "https://github.com/soulsam480/netlify-function-test#readme",
19+
"homepage": "https://github.com/soulsam480/paytm-netlify-lambda/blob/master/README.md",
2120
"dependencies": {
2221
"axios": "^0.19.2",
2322
"body-parser": "^1.19.0",

src/payConf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ router.post("/", cors(corsOptions), (req, res) => {
9090
);
9191
})
9292
.catch(() => {
93-
("<script>window.location ='fallback_url' </script>");
93+
res.send("<script>window.location ='fallback_url' </script>");
9494
});
9595
} else if (paytm_response.resultStatus === "TXN_FAILURE") {
9696
res.send("<script>window.location ='fallback_url'</script>");

src/payment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ router.post("/", cors(corsOptions), (req, res) => {
4343
) {
4444
var url = "";
4545
if (paytm_config.PAYTM_ENVIRONMENT == "PROD") {
46-
url = "https://securegw-stage.paytm.in/theia/processTransaction";
46+
url = "https://securegw.paytm.in/theia/processTransaction";
4747
} else if (paytm_config.PAYTM_ENVIRONMENT == "TEST") {
4848
url = "https://securegw-stage.paytm.in/theia/processTransaction";
4949
}

src/paytm/paytm_config.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
const { MERCHANT_KEY } = process.env;
2-
const { MID } = process.env;
3-
41
module.exports = {
52
paytm_config: {
63
PAYTM_ENVIRONMENT: "TEST", //possible values: TEST | PROD
7-
MID: MID, // Get it From https://dashboard.paytm.com/next/apikeys use Test id for test purpose and Production id for Production Purpose
4+
MID: " Your MID", // Get it From https://dashboard.paytm.com/next/apikeys use Test id for test purpose and Production id for Production Purpose
85
WEBSITE: "WEBSTAGING", // USE WEBSTAGING for testing, You Will get it for Production here https://dashboard.paytm.com/next/apikeys
96
CHANNEL_ID: "WEB", // Use WEB for Desktop Website and WAP for Mobile Website
107
INDUSTRY_TYPE_ID: "Retail", // Use Retail for Testing, For Production You Can Get it from here https://dashboard.paytm.com/next/apikeys
11-
MERCHANT_KEY: MERCHANT_KEY, // Get it From https://dashboard.paytm.com/next/apikeys use Test key for test purpose and Production key for Production Purpose
8+
MERCHANT_KEY: " Your MERCHANT_KEY", // Get it From https://dashboard.paytm.com/next/apikeys use Test key for test purpose and Production key for Production Purpose
129
CALLBACK_URL:
13-
"https://hopeful-mirzakhani-a59182.netlify.app/.netlify/functions/payConf", // Modify and Use this url for verifying payment, we will use cloud function DonationCallback function for Our usage
14-
/* https://hopeful-mirzakhani-a59182.netlify.app */
15-
/* // Additional Config
10+
"https://your_unique_site_id.netlify.app/.netlify/functions/payConf", // Modify and Use this url for verifying payment, we will use cloud function DonationCallback function for Our usage
11+
// Additional Config
1612

17-
MinAmount: 100, // Munimum amount you waana accept for donation
13+
/* MinAmount: 100, // Munimum amount you waana accept for donation
1814
PaymentInitURL: "http://myblogurl/donateViaPaytm", // Initial Location where the payment begin
1915
PaymentSuccessURL: "http://myblogurl/donationSuccessful", // Success Page URL
2016
PaymentFailureURL: "http://myblogurl/donationFailture", // Failture page URL */

0 commit comments

Comments
 (0)