package com.jeequan.jeepay.core.model.openapi.biz.app;

import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.entity.PayOrder;
import com.jeequan.jeepay.core.model.openapi.biz.PayResultResp;
import com.jeequan.jeepay.core.model.rqrs.msg.ChannelAppletPayMsg;
import com.jeequan.jeepay.core.model.rqrs.msg.ChannelJsapiMsg;
import com.jeequan.jeepay.core.model.rqrs.payorder.UnifiedOrderRQ;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * TODO
 *
 * @author crystal
 * @date 2024/4/12 14:56
 */
@Getter
@Setter
@NoArgsConstructor
public class AppBizResp extends PayResultResp {

    private JSONObject payInfo;

    /**
     * 小程序支付参数
     */
    private ChannelAppletPayMsg liteInfo;

    public AppBizResp(PayOrder order, String payUrl,ChannelAppletPayMsg liteInfo) {
        super(order);
        JSONObject payInfo =  new JSONObject();
        payInfo.put("payUrl",payUrl);
        this.payInfo = payInfo;
        this.liteInfo = liteInfo;
    }

    public AppBizResp(PayOrder order,String pData) {
        super(order);
        JSONObject payInfo =  new JSONObject();
        payInfo.put("pData",pData);
        this.payInfo = payInfo;
    }
}
