Answers for "callback url in paytm integration"

0

callback url in paytm integration

async verifyChecksum({
    request,
    auth,
    response
  }) {

    var paytmParams = {};
    var paytmChecksum;
    for (var key in request) {
      if (key == "CHECKSUMHASH") {
        paytmChecksum = request[key];
      } else {
        paytmParams[key] = request[key];
      }
    }

    // const checksum = request.only(['checksum']);

    if (paytm_checksum.verifychecksum(paytmParams, paytm_config.MERCHANT_KEY, paytmChecksum)) {
      console.log("Checksum Verification => true");
      response.send("Checksum Verification => true");
    } else {
      console.log("Checksum Verification => false");
      response.send("Checksum Verification => false");
    }
  }
Posted by: Guest on August-26-2020

Browse Popular Code Answers by Language