"jetbrains:/idea/checkout/git" did not exist on "6f3445fa046519c29512c1b0d59d7ecd6124022c"
Commit 5def62fe authored by jmdhappy's avatar jmdhappy
Browse files

微信支付SDK更换为weixin-java-pay,增加微信H5支付,优化一些异常情况的处理

parent dd9d81f9
package org.xxpay.service.channel.tencent.protocol.refund_query_protocol;
/**
* User: rizenguo
* Date: 2014/10/25
* Time: 16:36
*/
public class RefundQueryResData {
//协议层
private String return_code = "";
private String return_msg = "";
//协议返回的具体数据(以下字段在return_code 为SUCCESS 的时候有返回)
private String result_code = "";
private String err_code = "";
private String err_code_des = "";
private String appid = "";
private String mch_id = "";
private String nonce_str = "";
private String sign = "";
private String device_info = "";
private String transaction_id = "";
private String out_trade_no = "";
private int refund_count = 0;
//TODO 这里要用对象来装,因为有可能出现多个数据
private String out_refund_no = "";
private String refund_id = "";
private String refund_channel = "";
private String refund_fee = "";
private String coupon_refund_fee = "";
private String refund_status = "";
public String getReturn_code() {
return return_code;
}
public void setReturn_code(String return_code) {
this.return_code = return_code;
}
public String getReturn_msg() {
return return_msg;
}
public void setReturn_msg(String return_msg) {
this.return_msg = return_msg;
}
public String getResult_code() {
return result_code;
}
public void setResult_code(String result_code) {
this.result_code = result_code;
}
public String getErr_code() {
return err_code;
}
public void setErr_code(String err_code) {
this.err_code = err_code;
}
public String getErr_code_des() {
return err_code_des;
}
public void setErr_code_des(String err_code_des) {
this.err_code_des = err_code_des;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getMch_id() {
return mch_id;
}
public void setMch_id(String mch_id) {
this.mch_id = mch_id;
}
public String getNonce_str() {
return nonce_str;
}
public void setNonce_str(String nonce_str) {
this.nonce_str = nonce_str;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getDevice_info() {
return device_info;
}
public void setDevice_info(String device_info) {
this.device_info = device_info;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getOut_trade_no() {
return out_trade_no;
}
public void setOut_trade_no(String out_trade_no) {
this.out_trade_no = out_trade_no;
}
public int getRefund_count() {
return refund_count;
}
public void setRefund_count(int refund_count) {
this.refund_count = refund_count;
}
public String getOut_refund_no() {
return out_refund_no;
}
public void setOut_refund_no(String out_refund_no) {
this.out_refund_no = out_refund_no;
}
public String getRefund_id() {
return refund_id;
}
public void setRefund_id(String refund_id) {
this.refund_id = refund_id;
}
public String getRefund_channel() {
return refund_channel;
}
public void setRefund_channel(String refund_channel) {
this.refund_channel = refund_channel;
}
public String getRefund_fee() {
return refund_fee;
}
public void setRefund_fee(String refund_fee) {
this.refund_fee = refund_fee;
}
public String getCoupon_refund_fee() {
return coupon_refund_fee;
}
public void setCoupon_refund_fee(String coupon_refund_fee) {
this.coupon_refund_fee = coupon_refund_fee;
}
public String getRefund_status() {
return refund_status;
}
public void setRefund_status(String refund_status) {
this.refund_status = refund_status;
}
}
package org.xxpay.service.channel.tencent.service;
import org.xxpay.service.channel.tencent.common.Configure;
import org.xxpay.service.channel.tencent.protocol.downloadbill_protocol.DownloadBillReqData;
/**
* User: rizenguo
* Date: 2014/10/29
* Time: 16:04
*/
public class DownloadBillService extends BaseService {
public DownloadBillService() throws IllegalAccessException, InstantiationException, ClassNotFoundException {
super(Configure.DOWNLOAD_BILL_API);
}
//ALL,返回当日所有订单信息,默认值
public static final String BILL_TYPE_ALL = "ALL";
//SUCCESS,返回当日成功支付的订单
public static final String BILL_TYPE_SUCCESS = "SUCCESS";
//REFUND,返回当日退款订单
public static final String BILL_TYPE_REFUND = "REFUND";
//REVOKED,已撤销的订单
public static final String BILL_TYPE_REVOKE = "REVOKE";
/**
* 请求对账单下载服务
* @param downloadBillReqData 这个数据对象里面包含了API要求提交的各种数据字段
* @return API返回的XML数据
* @throws Exception
*/
public String request(DownloadBillReqData downloadBillReqData) throws Exception {
//--------------------------------------------------------------------
//发送HTTPS的Post请求到API地址
//--------------------------------------------------------------------
String responseString = sendPost(downloadBillReqData);
return responseString;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment