SHARE
TWEET

Untitled

sidson_aidson Jul 23rd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.post('/myIpn', (req, res) => {
  2.  
  3.     let SHA256Encrypt = (password) => {
  4.         let crypto = require('crypto');
  5.         let sha256 = crypto.createHash('sha256');
  6.         sha256.update(password);
  7.         return sha256.digest('hex');
  8.     };
  9.     let customField = JSON.parse(req.body.custom_field);
  10.     let refCommand = req.body.ref_command;
  11.     let itemName = req.body.item_name;
  12.     let itemPrice = req.body.item_price;
  13.     let devise = req.body.devise;
  14.     let commandName = req.body.command_name;
  15.     let env = req.body.env;
  16.     let token = req.body.token;
  17.     let apiKeySha256 = req.body.api_key_sha256;
  18.     let apiSecretSha256 = req.body.api_secret_sha256;
  19.  
  20.     let myApiKey = process.env['API_KEY'];
  21.     let myApiSecret = process.env['API_SECRET'];
  22.  
  23.     if(SHA256Encrypt(myApiSecret) === apiSecretSha256 && SHA256Encrypt(myApiKey) === apiKeySha256)
  24.     {
  25.         // from payexpresse;
  26.     }
  27.  
  28.  
  29.     return res.status(200).send('OK');
  30. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top