Skip to content

Commit

Permalink
Merge pull request Project-Based-Learning-IT#40 from Project-Based-Le…
Browse files Browse the repository at this point in the history
…arning-IT/Mayank

some error resolve
  • Loading branch information
Mayank8085 committed Apr 1, 2021
2 parents 0d577fc + 13d93d6 commit bd2f26f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions backend/routes/patients.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Patient = require('../models/patient.model');
const Appointment = require('../models/appointment.model');
const jwt = require('jsonwebtoken');
const stripe =require("stripe")("sk_test_51IabQNSCj4BydkZ38AsoDragCM19yaMzGyBVng5KUZnCNrxCJuj308HmdAvoRcUEe2PEdoORMosOaRz1Wl8UX0Gt00FCuSwYpz")
const uuid = require('uuid/v4');
const { v4: uuidv4 } = require('uuid');

// To get all the patients
// ** ONLY FOR TESTING **
Expand Down Expand Up @@ -183,8 +183,8 @@ router.route('/upcoming-appointments').post(async (req, res) => {

router.route("/payment").post(async (req,res)=>{
const {finalBalnce, token}=req.body;
console.log(product);
const idempotencyKey = uuid();
// console.log(product);
const idempotencyKey = uuidv4();

return stripe.customers
.create({
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Patient/Payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ const Payment = (props) => {

const makePayment=async(token)=>{

const {result}= await Axios.post( `${process.env.REACT_APP_SERVER_URL}/patients/payment`,{
const {data}= await Axios.post( `${process.env.REACT_APP_SERVER_URL}/patients/payment`,{
token, finalBalnce
})

console.log(result);
console.log(data);



Expand Down

0 comments on commit bd2f26f

Please sign in to comment.