net.mingsoft.pay.bean.PayBean Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
* 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有
* 遵循 铭软科技《服务协议》中的《保密条款》
*/
package net.mingsoft.pay.bean;
import net.mingsoft.basic.util.BasicUtil;
import org.springframework.util.StringUtils;
import net.mingsoft.basic.util.StringUtil;
public class PayBean{
/**
* 自定义支付界面
*/
private String page;
/**
* 异步同步接口
*/
private String notifyUrl;
/**
* 支付成功跳转地址
*/
private String returnUrl;
/**
* 订单号
*/
private String orderNo;
/**
* 订单标题
*/
private String orderName;
/**
* 订单价格
*/
private String orderPrice;
/**
* 订单描述
*/
private String orderDesc;
/**
* 订单详情
*/
private String showUrl;
/**
* 支付类型,weixin|alipay
*/
private String type;
/**
* 支付主机地址
*/
private String host;
/**
* 授权码
* 扫码支付授权码,设备读取用户微信中的条码或者二维码信息注:用户刷卡条形码规则:18位纯数字,以10、11、12、13、14、15开头)
*/
private String authCode;
/**
* 微信appId
* https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=3_1
*/
private String appId;
/**
* 微信支付商户号
*/
private String mchId;
/**
* 微信支付API密钥
*/
private String key;
/**
* Appsecret
*/
private String secret;
/**
* 微信证书(退款需要)
* https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4
*/
private String weixinResource;
/**
* 自定义参数,例如:订单编号集合、店名、其他信息
*/
private String attach;
/**
* 是否来自手机终端
*/
private boolean isMobile;
/**
* 手机终端:true,pc端:false
*/
public boolean isMobile() {
return BasicUtil.isMobileDevice();
}
public void setMobile(boolean isMobile) {
this.isMobile = isMobile;
}
/**
* 用户在微信中的唯一标识
*/
private String weixinOpenId;
public String getWeixinOpenId() {
return weixinOpenId;
}
public void setWeixinOpenId(String weixinOpenId) {
this.weixinOpenId = weixinOpenId;
}
public String getAttach() {
return attach;
}
public void setAttach(String attach) {
this.attach = attach;
}
public String getWeixinResource() {
return weixinResource;
}
public void setWeixinResource(String weixinResource) {
this.weixinResource = weixinResource;
}
public String getAuthCode() {
return authCode;
}
public void setAuthCode(String authCode) {
this.authCode = authCode;
}
public String getNotifyUrl() {
return notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getOrderName() {
return orderName;
}
public void setOrderName(String orderName) {
this.orderName = orderName;
}
public String getOrderPrice() {
return orderPrice;
}
public void setOrderPrice(String orderPrice) {
this.orderPrice = orderPrice;
}
public String getOrderDesc() {
return orderDesc;
}
public void setOrderDesc(String orderDesc) {
this.orderDesc = orderDesc;
}
public String getShowUrl() {
return showUrl;
}
public void setShowUrl(String showUrl) {
this.showUrl = showUrl;
}
public String getPage() {
return page;
}
public void setPage(String page) {
this.page = page;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getMchId() {
return mchId;
}
public void setMchId(String mchId) {
this.mchId = mchId;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
//支付类型
public static class Type {
public static final String WEIXIN = "weixin";
public static final String WEIXIN_H5 = "weixin_h5";
public static final String WEIXIN_APP = "weixin_app";
public static final String ALIPAY = "alipay";
public static final String ALIPAY_APP = "alipay_app";
public static final String FREE = "free";
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
}