Skip to content

Commit

Permalink
Made required changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhumika1312 committed Jun 23, 2024
1 parent 4f12862 commit 354c2fd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
5 changes: 5 additions & 0 deletions New_APIs/Payment_API/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Node modules
node_modules/

# Environment variables
.env
17 changes: 17 additions & 0 deletions New_APIs/Payment_API/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions New_APIs/Payment_API/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"body-parser": "^1.20.2",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"open": "^10.1.0",
"paypal-rest-sdk": "^1.8.1"
Expand Down
5 changes: 3 additions & 2 deletions New_APIs/Payment_API/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const express = require('express');
const paypal = require('paypal-rest-sdk');
const bodyParser = require('body-parser');
const path = require('path');
require('dotenv').config();

const app = express();
const port = 3000;
Expand All @@ -13,8 +14,8 @@ app.use(express.static(path.join(__dirname, 'public')));

paypal.configure({
'mode': 'sandbox', // sandbox or live
'client_id': 'AVA7iFWZrxVJy-aEyxLLpq5udhboqo365fKwKfVNLK13ICJth7Hdubkh8fACoFwu8TkjaV6LMrSl--4x',
'client_secret': 'EMHXSvPOnUCkjoVDGKY-lE3jbszWS1kbak_fZMdmIBRxQSmVy0m05Ym4OxfbYRdV_8nGymoh-J_8pgs0'
'client_id': process.env.PAYPAL_CLIENT_ID,
'client_secret': process.env.PAYPAL_CLIENT_SECRET
});

app.post('/pay', (req, res) => {
Expand Down

0 comments on commit 354c2fd

Please sign in to comment.