com.alipay.api.response.MonitorHeartbeatSynResponse Java Examples

The following examples show how to use com.alipay.api.response.MonitorHeartbeatSynResponse. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbsHbRunner.java    From MeetingFilm with Apache License 2.0 6 votes vote down vote up
@Override
public void run() {
    AlipayHeartbeatSynRequestBuilder builder = getBuilder();
    builder.setAppAuthToken(getAppAuthToken());

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);

    StringBuilder sb = new StringBuilder(response.getCode())
                            .append(":")
                            .append(response.getMsg());
    if (StringUtils.isNotEmpty(response.getSubCode())) {
        sb.append(", ")
        .append(response.getSubCode())
        .append(":")
        .append(response.getSubMsg());
    }
    log.info(sb.toString());
}
 
Example #2
Source File: AlipayMonitorServiceImpl.java    From MeetingFilm with Apache License 2.0 5 votes vote down vote up
@Override
public MonitorHeartbeatSynResponse heartbeatSyn(AlipayHeartbeatSynRequestBuilder builder) {
    validateBuilder(builder);

    MonitorHeartbeatSynRequest request = new MonitorHeartbeatSynRequest();
    request.putOtherTextParam("app_auth_token", builder.getAppAuthToken());
    request.setBizContent(builder.toJsonString());
    log.info("heartbeat.sync bizContent:" + request.getBizContent());

    return (MonitorHeartbeatSynResponse) getResponse(client, request);
}
 
Example #3
Source File: Main.java    From mmall20180107 with Apache License 2.0 5 votes vote down vote up
public void test_monitor_sys() {
    // 系统商使用的交易信息格式,json字符串类型
    List<SysTradeInfo> sysTradeInfoList = new ArrayList<SysTradeInfo>();
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000001", 5.2, HbStatus.S));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000002", 4.4, HbStatus.F));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000003", 11.3, HbStatus.P));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000004", 3.2, HbStatus.X));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000005", 4.1, HbStatus.X));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_SCANER);
    //        exceptionInfoList.add(ExceptionInfo.HE_PRINTER);
    //        exceptionInfoList.add(ExceptionInfo.HE_OTHER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    String appAuthToken = "应用授权令牌";//根据真实值填写

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
            .setAppAuthToken(appAuthToken).setProduct(Product.FP).setType(Type.CR)
            .setEquipmentId("cr1000001").setEquipmentStatus(EquipStatus.NORMAL)
            .setTime(Utils.toDate(new Date())).setStoreId("store10001").setMac("0a:00:27:00:00:00")
            .setNetworkType("LAN").setProviderId("2088911212323549") // 设置系统商pid
            .setSysTradeInfoList(sysTradeInfoList) // 系统商同步trade_info信息
            //                .setExceptionInfoList(exceptionInfoList)  // 填写异常信息,如果有的话
            .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
            ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #4
Source File: Main.java    From mmall20180107 with Apache License 2.0 5 votes vote down vote up
public void test_monitor_pos() {
    // POS厂商使用的交易信息格式,字符串类型
    List<PosTradeInfo> posTradeInfoList = new ArrayList<PosTradeInfo>();
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1324", 7));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.X, "1326", 15));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1401", 8));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.F, "1405", 3));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_PRINTER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
            .setProduct(Product.FP)
            .setType(Type.SOFT_POS)
            .setEquipmentId("soft100001")
            .setEquipmentStatus(EquipStatus.NORMAL)
            .setTime("2015-09-28 11:14:49")
            .setManufacturerPid("2088000000000009")
            // 填写机具商的支付宝pid
            .setStoreId("store200001").setEquipmentPosition("31.2433190000,121.5090750000")
            .setBbsPosition("2869719733-065|2896507033-091").setNetworkStatus("gggbbbgggnnn")
            .setNetworkType("3G").setBattery("98").setWifiMac("0a:00:27:00:00:00")
            .setWifiName("test_wifi_name").setIp("192.168.1.188")
            .setPosTradeInfoList(posTradeInfoList) // POS厂商同步trade_info信息
            //                .setExceptionInfoList(exceptionInfoList) // 填写异常信息,如果有的话
            .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
            ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #5
Source File: Main.java    From mmall-kay-Java with Apache License 2.0 5 votes vote down vote up
public void test_monitor_sys() {
    // 系统商使用的交易信息格式,json字符串类型
    List<SysTradeInfo> sysTradeInfoList = new ArrayList<SysTradeInfo>();
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000001", 5.2, HbStatus.S));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000002", 4.4, HbStatus.F));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000003", 11.3, HbStatus.P));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000004", 3.2, HbStatus.X));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000005", 4.1, HbStatus.X));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_SCANER);
    //        exceptionInfoList.add(ExceptionInfo.HE_PRINTER);
    //        exceptionInfoList.add(ExceptionInfo.HE_OTHER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    String appAuthToken = "应用授权令牌";//根据真实值填写

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
        .setAppAuthToken(appAuthToken).setProduct(Product.FP).setType(Type.CR)
        .setEquipmentId("cr1000001").setEquipmentStatus(EquipStatus.NORMAL)
        .setTime(Utils.toDate(new Date())).setStoreId("store10001").setMac("0a:00:27:00:00:00")
        .setNetworkType("LAN").setProviderId("2088911212323549") // 设置系统商pid
        .setSysTradeInfoList(sysTradeInfoList) // 系统商同步trade_info信息
        //                .setExceptionInfoList(exceptionInfoList)  // 填写异常信息,如果有的话
        .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
    ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #6
Source File: Main.java    From mmall-kay-Java with Apache License 2.0 5 votes vote down vote up
public void test_monitor_pos() {
    // POS厂商使用的交易信息格式,字符串类型
    List<PosTradeInfo> posTradeInfoList = new ArrayList<PosTradeInfo>();
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1324", 7));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.X, "1326", 15));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1401", 8));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.F, "1405", 3));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_PRINTER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
        .setProduct(Product.FP)
        .setType(Type.SOFT_POS)
        .setEquipmentId("soft100001")
        .setEquipmentStatus(EquipStatus.NORMAL)
        .setTime("2015-09-28 11:14:49")
        .setManufacturerPid("2088000000000009")
        // 填写机具商的支付宝pid
        .setStoreId("store200001").setEquipmentPosition("31.2433190000,121.5090750000")
        .setBbsPosition("2869719733-065|2896507033-091").setNetworkStatus("gggbbbgggnnn")
        .setNetworkType("3G").setBattery("98").setWifiMac("0a:00:27:00:00:00")
        .setWifiName("test_wifi_name").setIp("192.168.1.188")
        .setPosTradeInfoList(posTradeInfoList) // POS厂商同步trade_info信息
        //                .setExceptionInfoList(exceptionInfoList) // 填写异常信息,如果有的话
        .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
    ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #7
Source File: Main.java    From MMall_JAVA with GNU General Public License v3.0 5 votes vote down vote up
public void test_monitor_sys() {
    // 系统商使用的交易信息格式,json字符串类型
    List<SysTradeInfo> sysTradeInfoList = new ArrayList<SysTradeInfo>();
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000001", 5.2, HbStatus.S));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000002", 4.4, HbStatus.F));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000003", 11.3, HbStatus.P));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000004", 3.2, HbStatus.X));
    sysTradeInfoList.add(SysTradeInfo.newInstance("00000005", 4.1, HbStatus.X));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_SCANER);
    //        exceptionInfoList.add(ExceptionInfo.HE_PRINTER);
    //        exceptionInfoList.add(ExceptionInfo.HE_OTHER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    String appAuthToken = "应用授权令牌";//根据真实值填写

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
        .setAppAuthToken(appAuthToken).setProduct(Product.FP).setType(Type.CR)
        .setEquipmentId("cr1000001").setEquipmentStatus(EquipStatus.NORMAL)
        .setTime(Utils.toDate(new Date())).setStoreId("store10001").setMac("0a:00:27:00:00:00")
        .setNetworkType("LAN").setProviderId("2088911212323549") // 设置系统商pid
        .setSysTradeInfoList(sysTradeInfoList) // 系统商同步trade_info信息
        //                .setExceptionInfoList(exceptionInfoList)  // 填写异常信息,如果有的话
        .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
    ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #8
Source File: Main.java    From MMall_JAVA with GNU General Public License v3.0 5 votes vote down vote up
public void test_monitor_pos() {
    // POS厂商使用的交易信息格式,字符串类型
    List<PosTradeInfo> posTradeInfoList = new ArrayList<PosTradeInfo>();
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1324", 7));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.X, "1326", 15));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.S, "1401", 8));
    posTradeInfoList.add(PosTradeInfo.newInstance(HbStatus.F, "1405", 3));

    // 填写异常信息,如果有的话
    List<ExceptionInfo> exceptionInfoList = new ArrayList<ExceptionInfo>();
    exceptionInfoList.add(ExceptionInfo.HE_PRINTER);

    // 填写扩展参数,如果有的话
    Map<String, Object> extendInfo = new HashMap<String, Object>();
    //        extendInfo.put("SHOP_ID", "BJ_ZZ_001");
    //        extendInfo.put("TERMINAL_ID", "1234");

    AlipayHeartbeatSynRequestBuilder builder = new AlipayHeartbeatSynRequestBuilder()
        .setProduct(Product.FP)
        .setType(Type.SOFT_POS)
        .setEquipmentId("soft100001")
        .setEquipmentStatus(EquipStatus.NORMAL)
        .setTime("2015-09-28 11:14:49")
        .setManufacturerPid("2088000000000009")
        // 填写机具商的支付宝pid
        .setStoreId("store200001").setEquipmentPosition("31.2433190000,121.5090750000")
        .setBbsPosition("2869719733-065|2896507033-091").setNetworkStatus("gggbbbgggnnn")
        .setNetworkType("3G").setBattery("98").setWifiMac("0a:00:27:00:00:00")
        .setWifiName("test_wifi_name").setIp("192.168.1.188")
        .setPosTradeInfoList(posTradeInfoList) // POS厂商同步trade_info信息
        //                .setExceptionInfoList(exceptionInfoList) // 填写异常信息,如果有的话
        .setExtendInfo(extendInfo) // 填写扩展信息,如果有的话
    ;

    MonitorHeartbeatSynResponse response = monitorService.heartbeatSyn(builder);
    dumpResponse(response);
}
 
Example #9
Source File: MonitorHeartbeatSynRequest.java    From alipay-sdk-java-all with Apache License 2.0 4 votes vote down vote up
public Class<MonitorHeartbeatSynResponse> getResponseClass() {
	return MonitorHeartbeatSynResponse.class;
}
 
Example #10
Source File: MonitorHeartbeatSynRequest.java    From alipay-sdk with Apache License 2.0 4 votes vote down vote up
public Class<MonitorHeartbeatSynResponse> getResponseClass() {
	return MonitorHeartbeatSynResponse.class;
}
 
Example #11
Source File: MonitorHeartbeatSynRequest.java    From pay with Apache License 2.0 4 votes vote down vote up
public Class<MonitorHeartbeatSynResponse> getResponseClass() {
	return MonitorHeartbeatSynResponse.class;
}
 
Example #12
Source File: AlipayMonitorService.java    From MeetingFilm with Apache License 2.0 votes vote down vote up
public MonitorHeartbeatSynResponse heartbeatSyn(AlipayHeartbeatSynRequestBuilder builder);