update something..

This commit is contained in:
jinyu 2015-06-28 09:44:10 +08:00
parent 0b35861009
commit 18c18b38eb
5 changed files with 10 additions and 9 deletions

View File

@ -155,7 +155,7 @@ public class CashApi {
* href="http://pay.weixin.qq.com/wiki/doc/api/mch_pay.php?chapter=14_1">企业付款</a> * href="http://pay.weixin.qq.com/wiki/doc/api/mch_pay.php?chapter=14_1">企业付款</a>
* @throws WeixinException * @throws WeixinException
*/ */
public MPPaymentResult mpPayment(File caFile, MPPayment mpPayment) public MPPaymentResult mchPayment(File caFile, MPPayment mpPayment)
throws WeixinException { throws WeixinException {
JSONObject obj = (JSONObject) JSON.toJSON(mpPayment); JSONObject obj = (JSONObject) JSON.toJSON(mpPayment);
obj.put("nonce_str", RandomUtil.generateString(16)); obj.put("nonce_str", RandomUtil.generateString(16));
@ -207,7 +207,7 @@ public class CashApi {
* href="http://pay.weixin.qq.com/wiki/doc/api/mch_pay.php?chapter=14_3">企业付款查询</a> * href="http://pay.weixin.qq.com/wiki/doc/api/mch_pay.php?chapter=14_3">企业付款查询</a>
* @throws WeixinException * @throws WeixinException
*/ */
public MPPaymentRecord mpPaymentQuery(File caFile, String outTradeNo) public MPPaymentRecord mchPaymentQuery(File caFile, String outTradeNo)
throws WeixinException { throws WeixinException {
JSONObject obj = new JSONObject(); JSONObject obj = new JSONObject();
obj.put("nonce_str", RandomUtil.generateString(16)); obj.put("nonce_str", RandomUtil.generateString(16));

View File

@ -448,7 +448,7 @@ public class WeixinPayProxy {
*/ */
public MPPaymentResult mpPayment(File caFile, MPPayment mpPayment) public MPPaymentResult mpPayment(File caFile, MPPayment mpPayment)
throws WeixinException { throws WeixinException {
return cashApi.mpPayment(caFile, mpPayment); return cashApi.mchPayment(caFile, mpPayment);
} }
/** /**
@ -458,7 +458,7 @@ public class WeixinPayProxy {
*/ */
public MPPaymentResult mpPayment(MPPayment mpPayment) public MPPaymentResult mpPayment(MPPayment mpPayment)
throws WeixinException { throws WeixinException {
return cashApi.mpPayment(DEFAULT_CA_FILE, mpPayment); return cashApi.mchPayment(DEFAULT_CA_FILE, mpPayment);
} }
/** /**
@ -477,7 +477,7 @@ public class WeixinPayProxy {
*/ */
public MPPaymentRecord mpPaymentQuery(File caFile, String outTradeNo) public MPPaymentRecord mpPaymentQuery(File caFile, String outTradeNo)
throws WeixinException { throws WeixinException {
return cashApi.mpPaymentQuery(caFile, outTradeNo); return cashApi.mchPaymentQuery(caFile, outTradeNo);
} }
/** /**
@ -487,6 +487,6 @@ public class WeixinPayProxy {
*/ */
public MPPaymentRecord mpPaymentQuery(String outTradeNo) public MPPaymentRecord mpPaymentQuery(String outTradeNo)
throws WeixinException { throws WeixinException {
return cashApi.mpPaymentQuery(DEFAULT_CA_FILE, outTradeNo); return cashApi.mchPaymentQuery(DEFAULT_CA_FILE, outTradeNo);
} }
} }

View File

@ -53,6 +53,7 @@ public class MPPaymentRecord extends ApiResult {
/** /**
* 收款用户openid * 收款用户openid
*/ */
@XmlElement(name = "openid")
private String openid; private String openid;
/** /**
* 收款用户姓名 * 收款用户姓名
@ -83,6 +84,7 @@ public class MPPaymentRecord extends ApiResult {
/** /**
* 企业付款描述信息 * 企业付款描述信息
*/ */
@XmlElement(name = "desc")
private String desc; private String desc;
/** /**
* 实名验证结果 PASS:通过 FAILED:不通过 * 实名验证结果 PASS:通过 FAILED:不通过

View File

@ -274,7 +274,6 @@ public class ObjectId implements Comparable<ObjectId>, java.io.Serializable {
private static final int _genmachine; private static final int _genmachine;
static { static {
try { try {
// build a 2-byte machine piece based on NICs info // build a 2-byte machine piece based on NICs info
int machinePiece; int machinePiece;

View File

@ -107,7 +107,7 @@ public class MediaApi extends MpApi {
*/ */
public String uploadMedia(InputStream is, MediaType mediaType, public String uploadMedia(InputStream is, MediaType mediaType,
boolean isMaterial) throws WeixinException { boolean isMaterial) throws WeixinException {
if (mediaType.equals(MediaType.video.name()) && isMaterial) { if (mediaType == MediaType.video && isMaterial) {
throw new WeixinException( throw new WeixinException(
"please invoke uploadMaterialVideo method"); "please invoke uploadMaterialVideo method");
} }
@ -133,7 +133,7 @@ public class MediaApi extends MpApi {
.toHexString()))); .toHexString())));
} }
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
; // ignore throw new WeixinException(e);
} finally { } finally {
try { try {
is.close(); is.close();