All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zopen.wechat.pay.dto.PayCallbackResponse Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy