app2.js 2.65 KB
const express = require('express')
const app = express()

app.post('/api/v2/aaf/eligibleService.json', function (req, res) {
    res.send({
        resultCode:"20000",
        developerMessage:"Success"
    })
  })
  // app.post('/api/v2/aaf/eligibleService.json', function (req, res) {
  //   res.send({
  //     resultCode: "40401",
  //     developerMessage: "Data Not Found",
  //   }
  // )
  // })

  app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) {
    res.send({
      "resultCode": "20000",
      "resultDescription": "Success",
      "resultData": [
      ]
    }
    )
  })

  app.post('/api/v1/phx-inventory/jboss/inquiryCashStock', function (req, res) {
    res.send({
      "resultCode": "20000",
      "resultDescription": "Success",
      "resultData": [
      ]
    }
    )
  })

  app.get('/api/v1/phx-inventory/jboss/inquiryCashStock', function (req, res) {
    res.send({
      "resultCode": "20000",
      "resultDescription": "Success",
      "resultData": [
      ]
    })
  })
  
  // app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) {
  //   res.send({
  //     resultCode : "40400",
  //     developerMessage : "Url not found",
  //     userMessage:null,
  //     moreInfo: "http://smaf.pantry.ais/errors/12345",
  //     refundVolumeV2Response : {
  //       result:null,
  //       resultDescription:null,
  //       endUserIdentify:null,
  //       networkType:null
  //     }
  //     })
  //   })

    // app.post('/api/v1/mpay/billingonbehalf/reserveAndChargeVolume.json', function (req, res) {
    //   res.send({
    //     developerMessage : null,
    //     userMessage: null,
    //     resultCode : null,
    //     moreInfo: null,
    //     reserveAndChargeVolumeResponse : {
    //     result: "SVC1300",
    //     resultDescription: "UNKNOW_MSISDN",
    //     endUserIdentifier: "66873381009",
    //     networkType: null
    //     }
    //     }
    //     )
    //   })

  app.post('/api/v3/outRedirect/', function (req, res) {
    res.send({
      ret_code: "SUCCESS",
      ret_msg: "SUCCESS"
      })
  })
  // app.post('/api/v3/outRedirect/', function (req, res) {
  //   res.send({
  //     sub_msg: "40401",
  //     sub_code: "APP_ID_NOT_EXIST",
  //     ret_msg: "APP 信息检查失败",
  //     ret_code: "FAIL"
  //    })
  // })

  app.post('/api/v1/mpay/billingonbehalf/partialRefundVolume.json', function (req, res) {
    res.send({
        // refundVolumeV2Response : {
          result: "SUCCESS",
        resultDescription: "60713000154960518477",
        endUserIdentifier: "66873381009",
        networkType: "prepaid"
      // }
      })
  })

app.listen(3002);