mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-07-05 09:55:03 +08:00
刷卡付,条码付实现
为兼容刷卡付等支付结果校验,修改校验接口入参
This commit is contained in:
@@ -4,7 +4,6 @@ import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -18,25 +17,25 @@ import java.util.Map;
|
||||
* </pre>
|
||||
*/
|
||||
public class PayMessage implements Serializable {
|
||||
private Map<String, String> payMessage = null;
|
||||
private Map<String, Object> payMessage = null;
|
||||
private String msgType;
|
||||
private String payType;
|
||||
private String transactionType;
|
||||
private String fromPay;
|
||||
private String describe;
|
||||
|
||||
public PayMessage(Map<String, String> payMessage) {
|
||||
public PayMessage(Map<String, Object> payMessage) {
|
||||
this.payMessage = payMessage;
|
||||
}
|
||||
|
||||
public PayMessage(Map<String, String> payMessage, String payType, String msgType) {
|
||||
public PayMessage(Map<String, Object> payMessage, String payType, String msgType) {
|
||||
this(payMessage);
|
||||
this.payType = payType;
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
|
||||
public PayMessage(Map<String, String> payMessage, String msgType, String payType, String transactionType) {
|
||||
public PayMessage(Map<String, Object> payMessage, String msgType, String payType, String transactionType) {
|
||||
this.payMessage = payMessage;
|
||||
this.msgType = msgType;
|
||||
this.payType = payType;
|
||||
@@ -84,25 +83,25 @@ public class PayMessage implements Serializable {
|
||||
this.describe = describe;
|
||||
}
|
||||
public String getDiscount(){
|
||||
return payMessage.get("discount");
|
||||
return (String) payMessage.get("discount");
|
||||
}
|
||||
public String getSubject(){
|
||||
return payMessage.get("subject");
|
||||
return (String) payMessage.get("subject");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/////////微信与支付宝共用
|
||||
public String getOutTradeNo(){
|
||||
return payMessage.get("out_trade_no");
|
||||
return (String) payMessage.get("out_trade_no");
|
||||
}
|
||||
|
||||
public String getSign(){
|
||||
return payMessage.get("sign");
|
||||
return (String) payMessage.get("sign");
|
||||
}
|
||||
|
||||
public Number getTotalFee(){
|
||||
String total_fee = payMessage.get("total_fee");
|
||||
String total_fee = (String) payMessage.get("total_fee");
|
||||
if (null == total_fee || "".equals(total_fee)){ return 0; }
|
||||
if (isNumber(total_fee)){
|
||||
BigDecimal totalFee = new BigDecimal(total_fee);
|
||||
@@ -138,7 +137,7 @@ public class PayMessage implements Serializable {
|
||||
return payMessage.toString();
|
||||
}
|
||||
|
||||
public Map<String, String> getPayMessage() {
|
||||
public Map<String, Object> getPayMessage() {
|
||||
return payMessage;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user