com.zopen.wechat.pay.dto.PayCallbackResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zopen-ato-starter Show documentation
Show all versions of zopen-ato-starter Show documentation
Alibaba Tencent And Others For Spring Boot.
package com.zopen.wechat.pay.dto;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
/**
* 支付回调的返回
*
* @author [email protected]
* @since 2019/8/24
*/
@XmlRootElement(name = "xml")
public class PayCallbackResponse implements Serializable {
private static final long serialVersionUID = 1L;
private String return_code;
private String return_msg;
public String getReturn_code() {
return return_code;
}
public static PayCallbackResponse initError(String message) {
PayCallbackResponse response = new PayCallbackResponse();
response.setReturn_code("FAIL");
response.setReturn_msg(message);
return response;
}
public static PayCallbackResponse initSuccess() {
PayCallbackResponse response = new PayCallbackResponse();
response.setReturn_code("SUCCESS");
response.setReturn_msg("OK");
return response;
}
@Override
public String toString() {
return "PayCallbackResponse{" +
"return_code='" + return_code + '\'' +
", return_msg='" + return_msg + '\'' +
'}';
}
public void setReturn_code(String return_code) {
this.return_code = return_code;
}
public String getReturn_msg() {
return return_msg;
}
public void setReturn_msg(String return_msg) {
this.return_msg = return_msg;
}
}