📜  paytm 集成中的回调 url - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:23.085000             🧑  作者: Mango

代码示例1
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");
    }
  }