package com.kxs.common.pay.handlers;

import com.alibaba.fastjson.JSON;
import com.kxs.common.pay.enums.PayConstants;
import com.kxs.common.pay.enums.PayPlatformEnum;
import com.kxs.common.pay.model.PayMessage;
import com.kxs.common.pay.service.PayService;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * 默认支付回调处理程序
 *
 * @author 没秃顶的码农
 * @date 2024-04-28
 */
@Slf4j
public class DefaultPayMessageHandler implements PayMessageHandler<PayMessage, PayService> {

    public DefaultPayMessageHandler() {
    }

    public String handle(PayMessage payMessage, PayService payService) {
        log.info("回调支付消息处理器，回调消息：" + JSON.toJSONString(payMessage.getPayMessage()));

        return PayConstants.ALI_PAY_SUCCESS;
    }

    @Override
    public int getOrder() {
        return Integer.MIN_VALUE;
    }
}