feat:付款码支付
This commit is contained in:
1 parent
92c5c630bb
commit
4f50cc2952
53 files changed
+630
-2298
No files matched your search
+5
-1
@@ -14,7 +14,9 @@ import java.util.Arrays;
|
||||
@Getter
|
||||
public enum HardXfjTypeEnum {
|
||||
|
||||
QRCODE_PAY("10", "二维码支付"),
|
||||
QRCODE_PAY("10", "钱包二维码支付"),
|
||||
WECHAT_QRCODE_PAY("11", "微信二维码支付"),
|
||||
ALI_QRCODE_PAY("12", "支付宝二维码支付"),
|
||||
CARD_PAY("20", "饭卡支付"),
|
||||
;
|
||||
private final String type;
|
||||
@@ -28,6 +30,8 @@ public enum HardXfjTypeEnum {
|
||||
public static HardPayTypeEnum getHardPayType(HardXfjTypeEnum type) {
|
||||
return switch (type) {
|
||||
case QRCODE_PAY -> HardPayTypeEnum.WALLET_QR_CODE;
|
||||
case WECHAT_QRCODE_PAY -> HardPayTypeEnum.WECHANT_SELF_QR_CODE_PAY;
|
||||
case ALI_QRCODE_PAY -> HardPayTypeEnum.ALI_SELF_QR_CODE_PAY;
|
||||
case CARD_PAY -> HardPayTypeEnum.WALLET_CARD;
|
||||
};
|
||||
}
|
||||
|
||||
+11
@@ -1,6 +1,7 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order.xfj;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.constant.xfj.HardXfjTypeEnum;
|
||||
import com.bsd.pjcloud.thirdparty.constant.miniplatform.AppPlusPlatformTypeEnum;
|
||||
import com.bsd.pjcloud.wallet.api.constant.WalletTypeEnum;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -37,4 +38,14 @@ public class HardXfjFastCreateOrderDto {
|
||||
*/
|
||||
private HardXfjTypeEnum xfjPayType;
|
||||
|
||||
/**
|
||||
* 终端支付类型
|
||||
*/
|
||||
private AppPlusPlatformTypeEnum platformType;
|
||||
|
||||
/**
|
||||
* 付款码支付code
|
||||
*/
|
||||
private String devicePayCode;
|
||||
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.wechat;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 撤销订单入参
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WechantReverseDto {
|
||||
|
||||
private Long orderId;
|
||||
|
||||
private String wechantOrderId;
|
||||
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.wechat;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WechatMicropayDto {
|
||||
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private Long merId;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 支付金额(分)
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 微信付款码code
|
||||
*/
|
||||
private String wechatQrCode;
|
||||
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.wechat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 查询订单入参
|
||||
*/
|
||||
@Data
|
||||
public class WechatQueryDto {
|
||||
|
||||
/**
|
||||
* 微信订单号
|
||||
*/
|
||||
private String wechantOrderId;
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.wechat;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 退款入参
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WechatRefundDto {
|
||||
|
||||
private Long orderId;
|
||||
|
||||
private String wechantOrderId;
|
||||
|
||||
private Long refundId;
|
||||
|
||||
private Integer orderPrice;
|
||||
|
||||
private Integer refundPrice;
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.wechat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 微信退款查询入参
|
||||
*/
|
||||
@Data
|
||||
public class WechatRefundQueryDto {
|
||||
|
||||
/**
|
||||
* 退款id
|
||||
*/
|
||||
private String refundId;
|
||||
|
||||
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 微信退款回调加密的返回参数
|
||||
*/
|
||||
@Data
|
||||
public class WechantRefunCallbackSoureVo {
|
||||
|
||||
/**
|
||||
* 公众账号ID
|
||||
*/
|
||||
private String appid;
|
||||
|
||||
/**
|
||||
* 退款的商户号
|
||||
*/
|
||||
private String mch_id;
|
||||
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
private String nonce_str;
|
||||
|
||||
/**
|
||||
* 加密信息
|
||||
*/
|
||||
private String req_info;
|
||||
}
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 微信退款回调返回参数
|
||||
*/
|
||||
@Data
|
||||
public class WechantRefunCallbackVo {
|
||||
|
||||
public static final String SUCCESS_CODE = "SUCCESS";
|
||||
|
||||
/**
|
||||
* 微信订单号
|
||||
*/
|
||||
private String transaction_id;
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String out_trade_no;
|
||||
|
||||
/**
|
||||
* 微信退款单号
|
||||
*/
|
||||
private String refund_id;
|
||||
|
||||
/**
|
||||
* 商户退款单号
|
||||
*/
|
||||
private String out_refund_no;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private String total_fee;
|
||||
|
||||
/**
|
||||
* 应结订单金额
|
||||
*/
|
||||
private String settlement_total_fee;
|
||||
|
||||
/**
|
||||
* 申请退款金额
|
||||
*/
|
||||
private String refund_fee;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
private String settlement_refund_fee;
|
||||
|
||||
/**
|
||||
* 退款状态
|
||||
*/
|
||||
private String refund_status;
|
||||
|
||||
public boolean isAllSuccess() {
|
||||
return ObjectUtil.equals(refund_status, SUCCESS_CODE);
|
||||
}
|
||||
|
||||
public static String wechantError() {
|
||||
return "<xml>" +
|
||||
"<return_code><![CDATA[FAIL]]></return_code>" +
|
||||
"<return_msg><![CDATA[FAIL]]></return_msg>" +
|
||||
"</xml>";
|
||||
}
|
||||
|
||||
public static String wechantSuccess() {
|
||||
return "<xml>" +
|
||||
" <return_code><![CDATA[SUCCESS]]></return_code>" +
|
||||
" <return_msg><![CDATA[OK]]></return_msg>\n" +
|
||||
"</xml>";
|
||||
}
|
||||
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 撤销订单返回
|
||||
*/
|
||||
@Data
|
||||
public class WechantReverseVo {
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
private String return_code;
|
||||
|
||||
private String return_msg;
|
||||
|
||||
private String appid;
|
||||
|
||||
private String mch_id;
|
||||
|
||||
private String nonce_str;
|
||||
|
||||
private String sign;
|
||||
|
||||
private String result_code;
|
||||
|
||||
private String err_code;
|
||||
|
||||
private String err_code_des;
|
||||
|
||||
private String recall;
|
||||
|
||||
public boolean isHttpSucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, return_code);
|
||||
}
|
||||
|
||||
public boolean isPaySucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, result_code);
|
||||
}
|
||||
|
||||
public boolean isAllSuccess() {
|
||||
return isHttpSucess() && isPaySucess();
|
||||
}
|
||||
}
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WechatMicropayVo {
|
||||
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
private String return_code;
|
||||
|
||||
private String return_msg;
|
||||
|
||||
private String appid;
|
||||
|
||||
private String mch_id;
|
||||
|
||||
private String device_info;
|
||||
|
||||
private String nonce_str;
|
||||
|
||||
private String sign;
|
||||
|
||||
private String result_code;
|
||||
|
||||
private String err_code;
|
||||
|
||||
private String err_code_des;
|
||||
|
||||
public boolean isHttpSucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, return_code);
|
||||
}
|
||||
|
||||
public boolean isPaySucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, result_code);
|
||||
}
|
||||
|
||||
public boolean isAllSuccess(){
|
||||
return isHttpSucess() && isPaySucess();
|
||||
}
|
||||
|
||||
}
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 查询订单返回
|
||||
*/
|
||||
@Data
|
||||
public class WechatQueryVo {
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
private String return_code;
|
||||
|
||||
private String return_msg;
|
||||
|
||||
private String appid;
|
||||
|
||||
private String mch_id;
|
||||
|
||||
private String nonce_str;
|
||||
|
||||
private String sign;
|
||||
|
||||
private String result_code;
|
||||
|
||||
private String err_code;
|
||||
|
||||
private String err_code_des;
|
||||
|
||||
private String device_info;
|
||||
|
||||
/**
|
||||
* 用户标识
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 是否关注公众账号
|
||||
*/
|
||||
private String is_subscribe;
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
*/
|
||||
private String trade_type;
|
||||
|
||||
/**
|
||||
* 交易状态
|
||||
*/
|
||||
private String trade_state;
|
||||
|
||||
/**
|
||||
* 付款银行
|
||||
*/
|
||||
private String bank_type;
|
||||
|
||||
/**
|
||||
* 标价金额
|
||||
*/
|
||||
private String total_fee;
|
||||
|
||||
/**
|
||||
* 应结订单金额
|
||||
*/
|
||||
private String settlement_total_fee;
|
||||
|
||||
/**
|
||||
* 标价币种
|
||||
*/
|
||||
private String fee_type;
|
||||
|
||||
/**
|
||||
* 现金支付金额
|
||||
*/
|
||||
private String cash_fee;
|
||||
|
||||
/**
|
||||
* 现金支付币种
|
||||
*/
|
||||
private String cash_fee_type;
|
||||
|
||||
/**
|
||||
* 代金券金额
|
||||
*/
|
||||
private String coupon_fee;
|
||||
|
||||
/**
|
||||
* 代金券使用数量
|
||||
*/
|
||||
private String coupon_count;
|
||||
|
||||
/**
|
||||
* 微信支付订单号
|
||||
*/
|
||||
private String transaction_id;
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String out_trade_no;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*/
|
||||
private String attach;
|
||||
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
private String time_end;
|
||||
|
||||
/**
|
||||
* 交易状态描述
|
||||
*/
|
||||
private String trade_state_desc;
|
||||
|
||||
public boolean isHttpSucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, return_code);
|
||||
}
|
||||
|
||||
public boolean isPaySucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, result_code);
|
||||
}
|
||||
}
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 退款返回
|
||||
*/
|
||||
@Data
|
||||
public class WechatRefundQueryVo {
|
||||
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
/**
|
||||
* 业务结果
|
||||
*/
|
||||
private String result_code;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
*/
|
||||
private String err_code;
|
||||
|
||||
/**
|
||||
* 错误描述
|
||||
*/
|
||||
private String err_code_des;
|
||||
|
||||
/**
|
||||
* 公众账号ID
|
||||
*/
|
||||
private String appid;
|
||||
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
private String mch_id;
|
||||
|
||||
/**
|
||||
* 随机字符串
|
||||
*/
|
||||
private String nonce_str;
|
||||
|
||||
/**
|
||||
* 签名
|
||||
*/
|
||||
private String sign;
|
||||
|
||||
/**
|
||||
* 订单总退款次数
|
||||
*/
|
||||
private Long total_refund_count;
|
||||
|
||||
/**
|
||||
* 微信订单号
|
||||
*/
|
||||
private String transaction_id;
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String out_trade_no;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private Long total_fee;
|
||||
|
||||
/**
|
||||
* 应结订单金额
|
||||
*/
|
||||
private Long settlement_total_fee;
|
||||
|
||||
/**
|
||||
* 货币种类
|
||||
*/
|
||||
private String fee_type;
|
||||
|
||||
/**
|
||||
* 现金支付金额
|
||||
*/
|
||||
private Long cash_fee;
|
||||
|
||||
/**
|
||||
* 退款笔数
|
||||
*/
|
||||
private Long refund_count;
|
||||
|
||||
/**
|
||||
* 退款总金额
|
||||
*/
|
||||
private Long refund_fee;
|
||||
|
||||
public boolean isHttpSucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, err_code);
|
||||
}
|
||||
|
||||
public boolean isPaySucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, result_code);
|
||||
}
|
||||
|
||||
}
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.wechat;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 退款返回
|
||||
*/
|
||||
@Data
|
||||
public class WechatRefundVo {
|
||||
|
||||
public static final String SUCCESS = "SUCCESS";
|
||||
|
||||
private String return_code;
|
||||
|
||||
private String return_msg;
|
||||
|
||||
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 transaction_id;
|
||||
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
private String out_trade_no;
|
||||
|
||||
/**
|
||||
* 商户退款单号
|
||||
*/
|
||||
private String out_refund_no;
|
||||
|
||||
/**
|
||||
* 微信退款单号
|
||||
*/
|
||||
private String refund_id;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
private String refund_fee;
|
||||
|
||||
/**
|
||||
* 应结退款金额
|
||||
*/
|
||||
private String settlement_refund_fee;
|
||||
|
||||
/**
|
||||
* 标价金额
|
||||
*/
|
||||
private String total_fee;
|
||||
|
||||
/**
|
||||
* 应结订单金额
|
||||
*/
|
||||
private String settlement_total_fee;
|
||||
|
||||
public boolean isHttpSucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, return_code);
|
||||
}
|
||||
|
||||
public boolean isPaySucess() {
|
||||
return ObjectUtil.equals(WechatMicropayVo.SUCCESS, result_code);
|
||||
}
|
||||
|
||||
public boolean isAllSuccess() {
|
||||
return isHttpSucess() && isPaySucess();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user