增加微信支付转换短链接API #101

This commit is contained in:
Binary Wang
2017-03-27 14:22:33 +08:00
parent d7d5b169d1
commit 96d72fe542
6 changed files with 143 additions and 4 deletions

View File

@@ -0,0 +1,46 @@
package com.github.binarywang.wxpay.bean.request;
import com.thoughtworks.xstream.annotations.XStreamAlias;
/**
* <pre>
* 转换短链接请求对象类
* Created by Binary Wang on 2017-3-27.
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
* </pre>
*/
@XStreamAlias("xml")
public class WxPayShorturlRequest extends WxPayBaseRequest {
/**
* <pre>
* URL链接
* long_url
* 是
* String(512)
* weixin//wxpay/bizpayurl?sign=XXXXX&appid=XXXXX&mch_id=XXXXX&product_id=XXXXXX&time_stamp=XXXXXX&nonce_str=XXXXX
* 需要转换的URL签名用原串传输需URLencode
* </pre>
*/
@XStreamAlias("long_url")
private String longUrl;
public String getLongUrl() {
return this.longUrl;
}
public void setLongUrl(String longUrl) {
this.longUrl = longUrl;
}
public WxPayShorturlRequest() {
}
public WxPayShorturlRequest(String longUrl) {
this.longUrl = longUrl;
}
@Override
protected void checkConstraints() {
//do nothing
}
}

View File

@@ -9,6 +9,7 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
* </pre>
*/
@XStreamAlias("xml")
public class WxPayOrderReverseResult extends WxPayBaseResult {
/**

View File

@@ -0,0 +1,34 @@
package com.github.binarywang.wxpay.bean.result;
import com.thoughtworks.xstream.annotations.XStreamAlias;
/**
* <pre>
* 转换短链接结果对象类
* Created by Binary Wang on 2017-3-27.
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
* </pre>
*/
@XStreamAlias("xml")
public class WxPayShorturlResult extends WxPayBaseResult {
/**
* <pre>
* URL链接
* short_url
* 是
* String(64)
* weixin//wxpay/s/XXXXXX
* 转换后的URL
* </pre>
*/
@XStreamAlias("short_url")
private String shortUrl;
public String getShortUrl() {
return this.shortUrl;
}
public void setShortUrl(String shortUrl) {
this.shortUrl = shortUrl;
}
}