薪税业务
下载地址
SDK 版本记录
版本 |
日期 |
说明 |
v1.0.1 |
2021-11-18 |
java sdk上线 |
员工批量开户?
简介
商户提交员工批量开户申请后,汇付先先给员工开户,之后通过异步通知向商户发送签约链接。商户将签约链接展示给用户并提示其完成签约。
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 员工批量开户服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/batchOpenAccount.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryStaffRegisterRequest request = new GcbSalaryStaffRegisterRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,汇付跨境系统商户号+01,共13位
request.setMerchantAcctId("1001215986501");
// 必填,批次请求流水号,
request.setOrderId(randomNum);
// 必填,核心企业会员号,
request.setCoreMemberId("148079084486732398");
// 必填,落地公司机构号,
request.setGroundAgentId("L20200527173554262");
// 必填,签约链接异步通知地址,
request.setNoticeUrlContactLink("http://192.168.26.107:6999/mock/notifyReceiverBg.do");
// 必填,签约结果异步通知地址,
request.setNoticeUrlContactResult("http://192.168.26.107:6999/mock/notifyReceiverBg.do");
// 必填,明细列表
// name 姓名 必填
// bankAcctName 卡号姓名 必填
// contactTelNo 手机号 必填 手机号,限制大陆手机号,不支持境外
// accountIdNo 持卡人证件号 必填
// idType 证件类型 必填 1-身份证;2-港澳通行证;
// cardNum 卡号 必填
// bankId 银行ID 必填 银联颁布的银行代码,参考附录
// reqTransId 请求流水号 必填
GcbSalaryStaffRegisterDetail detail = new GcbSalaryStaffRegisterDetail();
detail.setName("zhu");
detail.setBankAcctName("zhu");
detail.setContactTelNo("17366372672");
detail.setAccountIdNo("320001199002021211");
detail.setIdType("1");
detail.setCardNum("143673");
detail.setBankId("01020000");
detail.setReqTransId("14331");
List<GcbSalaryStaffRegisterDetail> batchOpenList = new ArrayList<GcbSalaryStaffRegisterDetail>();
batchOpenList.add(detail);
request.setBatchOpenList(batchOpenList);
// 发送请求
GcbSalaryStaffRegisterResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
接收签约链接通知示例
Java
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 实例化通知解析器
GcbPayCallbackMessageParser gcbMessageParser = new DefaultGcbPayCallbackMessageParser(base64PublicKey);
// 解析通知结果
GcbSalarySignUrlNotification result = gcbMessageParser.parse(httpServeletRequest, GcbSalarySignUrlNotification.class);
//根据响应结果,进行业务逻辑处理
// ......
接收签约结果通知示例
Java
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 实例化通知解析器
GcbPayCallbackMessageParser gcbMessageParser = new DefaultGcbPayCallbackMessageParser(base64PublicKey);
GcbSalarySignResult result = gcbMessageParser.parse(httpServeletRequest, GcbSalarySignResult.class);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 员工批量入驻接口 。
流程示意
调用流程详见 薪税流程 。
工资代发?
工资代发申请?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 工资代发申请服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/salaryModle.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryPaymentApplyRequest request = new GcbSalaryPaymentApplyRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,汇付跨境系统商户号+01,共13位
request.setMerchantAcctId("1001215986501");
// 必填,请求流水号,
request.setOrderId(randomNum);
// 必填,核心企业会员号,
request.setCoreMemberId("148079084486732398");
// 必填,落地公司会员号,
request.setGroundMemberId("980149419163571612");
// 必填,代发模式,1-普票 2-专票(由核心企业和落地公司签的合同决定的)
request.setSalaryModle("1");
// 必填,走账模式,1-直发 2-代发
request.setAccountModle("2");
// 必填,走账类型,1-单账户模式;
request.setModeIdcompany("1");
// 必填,异步通知地址,
request.setNoticeUrl("http://192.168.26.107:6999/mock/notifyReceiverBg.do");
// 必填,代发工资明细,明细参数参照下方参数字段
// salaryMonth 月份yyyyMMdd 必填
// name 姓名 必填
// accountIdNo 身份证号 必填
// contactTelNo 手机号 必填 手机号,限制大陆手机号,不支持境外
// salary 工资金额 必填 单位为分,无小数位
GcbSalaryPaymentApplyDetail detail = new GcbSalaryPaymentApplyDetail();
detail.setSalaryMonth("202006");
detail.setName("冯浩波");
detail.setAccountIdNo("321322199301097215");
detail.setContactTelNo("13218072315");
detail.setSalary("500");
List<GcbSalaryPaymentApplyDetail> batchSalaryModleDtos = new ArrayList<GcbSalaryPaymentApplyDetail>();
batchSalaryModleDtos.add(detail);
request.setBatchSalaryModleDtos(batchSalaryModleDtos);
// 发送请求
GcbSalaryPaymentApplyResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
接收通知示例
Java
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 实例化通知解析器
GcbPayCallbackMessageParser gcbMessageParser = new DefaultGcbPayCallbackMessageParser(base64PublicKey);
// 解析通知结果
GcbSalaryPaymentResult result = gcbMessageParser.parse(httpServeletRequest, GcbSalaryPaymentResult.class);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 工资代发接口 。
流程示意
调用流程详见 薪税流程 。
工资代发查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 工资代发结果查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/salaryResult.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryPaymentQueryRequest request = new GcbSalaryPaymentQueryRequest();
// 必填,商户号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号,核心企业会员号
request.setCoreMemberId("148079084486732398");
// 条件必填,批次号,若订单号未填,则批次号必填
request.setAttachId("");
// 条件必填,订单号,若批次号未填,则订单号必填
request.setOrderId("148079084486732398");
// 发送请求
GcbSalaryPaymentQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 工资代发查询接口(参见工资代发目录1.2) 。
个人提现?
个人提现申请?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 个人提现申请服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/withdrawPerson.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryWithdrawApplyRequest request = new GcbSalaryWithdrawApplyRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,汇付跨境系统商户号+01,共13位
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号,
request.setCoreMemberId("148079084486732398");
// 必填,员工会员号,
request.setPersonMemberId("248580562032924868");
// 必填,请求流水号,建议14位以上时间戳+随机数
request.setOrderId(randomNum);
// 必填,提现金额,单位为分
request.setOrderAmt("200");
// 必填,异步通知地址,提现异步通知,返回地址
request.setRetUrl("http://192.168.26.107:6999/mock/notifyReceiverBg.do");
// 发送请求
GcbSalaryWithdrawApplyResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
接收通知示例
Java
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 实例化通知解析器
GcbPayCallbackMessageParser gcbMessageParser = new DefaultGcbPayCallbackMessageParser(base64PublicKey);
// 解析通知结果
GcbSalaryWithdrawResult result = gcbMessageParser.parse(httpServeletRequest, GcbSalaryWithdrawResult.class);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 个人提现接口 。
流程示意
调用流程详见 薪税流程 。
个人提现查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 个人提现结果查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/withdrawInquire.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryWithdrawQueryRequest request = new GcbSalaryWithdrawQueryRequest();
// 必填,商户号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号
request.setCoreMemberId("148079084486732398");
// 条件必填,订单号,若系统流水号未填,则订单号必填
request.setOrderId("245665634");
// 条件必填,系统流水号,若订单号未填,则系统流水号必填
request.setTransSeqId("");
// 发送请求
GcbSalaryWithdrawQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 个人提现查询接口(参见个人提现目录1.2) 。
开票申请?
开票申请?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 开票申请服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/applyInvoice.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryInvoiceApplyRequest request = new GcbSalaryInvoiceApplyRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,订单号,必须唯一:建议14位以上时间戳+随机数
request.setOrderId(randomNum);
// 必填,商户号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号,
request.setCoreMemberId("148079084486732398");
// 必填,批次列表,代发批次号,多个英文逗号分隔,如1,2,3,4(多个表示合并开一张票)
request.setBatchList("144168,897255");
// 必填,异步地址,异步通知地址
request.setAsynUrl("http://192.168.26.107:6999/mock/notifyReceiverBg.do");
// 必填,接收人手机号,
request.setReceiveMobile("13218072315");
// 必填,接收人姓名,
request.setReceiveName("冯浩波");
// 必填,快递地址,
request.setCourierAddress("南京市江宁区");
// 非必填,购方税号,
request.setInvoiceTaxNo("");
// 非必填,购方公司名称,
request.setInvoiceName("");
// 非必填,购方公司地址,
request.setInvoiceAddress("");
// 非必填,购方公司账号,
request.setInvoiceCardNum("");
// 非必填,购方银行名称,
request.setInvoiceBankName("");
// 非必填,购方联系电话,
request.setInvoicePhone("");
// 非必填,备注,
request.setRemarks("");
// 发送请求
GcbSalaryInvoiceApplyResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
接收通知示例
Java
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 实例化通知解析器
GcbPayCallbackMessageParser gcbMessageParser = new DefaultGcbPayCallbackMessageParser(base64PublicKey);
// 解析通知结果
GcbSalaryInvoiceResult result = gcbMessageParser.parse(httpServeletRequest, GcbSalaryInvoiceResult.class);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 开票申请接口 。
流程示意
调用流程详见 薪税流程 。
开票查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 开票结果查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/queryInvoiceInfo.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryInvoiceQueryRequest request = new GcbSalaryInvoiceQueryRequest();
// 必填,商户号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号,必填
request.setCoreMemberId("148079084486732398");
// 非必填,开票批次号,开票批次号,可为空查询全部
request.setInvoiceBatch("");
// 必填,订单号,原请求订单号
request.setOrderId("20211021194132408");
// 发送请求
GcbSalaryInvoiceQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 开票查询接口(参见开票申请目录1.2) 。
资金调拨?
调拨申请?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 资金调拨申请服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/allotApply.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryAllotApplyRequest request = new GcbSalaryAllotApplyRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
String time = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
// 必填,必须唯一:建议14位以上时间戳+随机数
request.setOrderId(randomNum);
// 必填,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 条件必填,汇付跨境系统用户号,transType=2必填
request.setUserAcctId("");
// 非必填,1、从商户账户划拨;2、从用户账户划拨;不填默认为1。
request.setTransType("");
// 必填,核心企业机构号
request.setCoreMemberId("148079084486732398");
// 必填,单位为分,无小数位
request.setAmount("100");
// 发送请求
GcbSalaryAllotApplyResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 资金调拨接口 。
流程示意
调用流程详见 薪税流程 。
调拨查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 资金调拨结果查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/allotQuery.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryAllotQueryRequest request = new GcbSalaryAllotQueryRequest();
// 必填,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,核心企业会员号
request.setCoreMemberId("148079084486732398");
// 必填,原请求订单号
request.setOrderId("9920211021182204913");
// 发送请求
GcbSalaryAllotQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 调拨查询接口(参见资金调拨目录1.1) 。
签约查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 签约查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/contractQuery.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryContractQueryRequest request = new GcbSalaryContractQueryRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,订单号
request.setOrderId(randomNum);
// 必填,核心企业会员号,核心企业机构号
request.setCoreMemberId("148079084486732398");
// 条件必填,员工会员号,合同类型为6时必填
request.setPersonMemberId("");
// 必填,合同类型,必填 1:核心企业-税优公司 6:个人-税优公司
request.setContractType("1");
// 必填,开始时间,yyyyMMdd
request.setStartDate("20210101");
// 必填,结束时间,yyyyMMdd
request.setEndDate("20211231");
// 发送请求
GcbSalaryContractQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 签约查询接口 。
余额查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 余额查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/queryAccount.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryAccQueryRequest request = new GcbSalaryAccQueryRequest();
// 必填,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
//必填,核心企业会员号
request.setCoreMemberId("148079084486732398");
// 发送请求
GcbSalaryAccQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 余额查询接口 。
代发费用查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 代发费用查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/salaryCharge.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryFeeQueryRequest request = new GcbSalaryFeeQueryRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,员工会员号
request.setPersonMemberId("555077972985925781");
// 必填,落地公司会员号
request.setGroundMemberId("980149419163571612");
// 必填,订单号,必须唯一:建议14位以上时间戳+随机数
request.setOrderId(randomNum);
// 必填,核心企业会员号,核心企业机构号
request.setCoreMemberId("148079084486732398");
// 必填,代发模式,1-普票;2-专票
request.setSalaryModle("1");
// 必填,发放的工资金额,单位为分,无小数位
request.setSalary("60000");
// 发起请求
GcbSalaryFeeQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 代发试用查询接口 。
员工信息修改?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 员工信息修改服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/batchModifyAccount.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryStaffModifyRequest request = new GcbSalaryStaffModifyRequest();
String randomNum = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
// 必填,商户号,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 必填,订单号,必须唯一:建议14位以上时间戳+随机数
request.setOrderId(randomNum);
// 必填,核心企业会员号,核心企业机构号
request.setCoreMemberId("148079084486732398");
// 必填,明细
// memberId 员工会员号 必填
// contactTelNo 手机号 选填 手机号,限制大陆手机号,不支持境外。手机号/卡号至少一个有值
// cardNum 卡号 选填 手机号/卡号至少一个有值
GcbSalaryStaffModifyDetail detail = new GcbSalaryStaffModifyDetail();
detail.setMemberId("555077972985925781");
detail.setContactTelNo("18812341234");
detail.setCardNum("111");
List<GcbSalaryStaffModifyDetail> batchModifyList = new ArrayList<GcbSalaryStaffModifyDetail>();
batchModifyList.add(detail);
request.setBatchModifyList(batchModifyList);
// 发送请求
GcbSalaryStaffModifyResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 员工信息修改接口 。
员工入驻结果查询?
调用示例
Java
// 商户的私钥(base64编码格式)
String base64PrivateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMpT/BKCrfkPKbMggoIQVpYL8chw8e9do+vuh5f5OsZNVm+BAtpJY+nGTBW4ggWEbtDWh4e+IsCVDzeXVDUmPO4GXro0o7QZpOVN+bo28k1x69tw65HMLTgjx3jjrQK7JdON7cqbtqWN624GVMgk5mJGu0ua+eBiOPuIBM3Re+61AgMBAAECgYEAqWvWIjHnOCzoQCSy4/KGbrKlzbA2BrgksUVVqX57Jt5PyKMBHoRh87mmsHGF/tS8boeViac/NoAa8/P2AWN5lGFl8Z9A4NlpXojA+vn7bn2fIjDzsB8s2txkmskuzzoDhUSeiPGf/HjPG7w6fl1BiHiix2xRr8Bw5wTeMJmsXQECQQDwrktdw8NP0FzmqmyFzTfz97UDsexKQfLSaFq31YydMoYlHEwsZcZhNTTBx71tni7/2eEQdVtFToAQRbEvGJBVAkEA1zTDC18DBHeGQdMwywrdc9BhbYY4a2ucc8XhRHScQzzyG4WgSFTrorLAH6QohpmFHfHm0Ws6AfDDhdQwuNTE4QJARI6hUTguLlH/5ISvHP3z7j6lBURtNknKzTyEetENmMmHhJKm8A6dj5sESB6JSuxAHwkFHxcOxJMzz27KpcutcQJAfnQNS6g3kK9e31zmJdiriXrfVMjybAReeRTEKkJO859jL9LT/MyRbReVlsIR4g1hT9gtZc6Y1j0P1pp5SpITYQJAdxwKEBXokaZwWy2gzEt3XdXBYoR5lvg/3T4GSEMBJZRmlmZpBOTbg/yYaf7lXtGUm+mZ3UZsCfJvwufit314sw==";
// 汇付国际的公钥(base64编码格式)
String base64PublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvBaKblsfXTEAFLujPiQ3PlWL1TJd+l/ApN/16BcArl6Oo18Tb6xOCLlcFBr3xgmVokc8DP32PHAQdtmS8/Y9HziMFaf8NxTNH9whA7GobU1dmVP+tI31z1S5ZO82knNW9ghbcDwLCo251AWHg5tP4wgRCBOJS+bSuyRuAW15M/wIDAQAB";
// 员工入驻查询服务的url(测试环境)
String serverUrl = "https://hfgj.testpnr.com/salary/queryPersonnel.htm";
// 实例化客户端
GcbPayClient gcbPayClient = new DefaultGcbPayClient(serverUrl, base64PrivateKey, base64PublicKey);
// 构建请求对象
GcbSalaryStaffQueryRequest request = new GcbSalaryStaffQueryRequest();
// 必填,商户号,会员账号,由我司提供的商户号+01,共13位数字
request.setMerchantAcctId("1001215986501");
// 条件必填,订单号,原请求流水号(当前不支持,请使用会员号查询)
request.setOrderId("");
// 条件必填,会员号,请求流水号和会员号二选一
request.setPersonMemberId("898950625284576540");
// 发送请求
GcbSalaryStaffQueryResponse response = gcbPayClient.execute(request);
//根据响应结果,进行业务逻辑处理
// ......
参数说明
调用参数详见 员工入驻结果查询接口 。