package com.softwarebr.nunu.service.pay.weixin.impl;

import com.softwarebr.nunu.service.pay.PaymentService;
import com.softwarebr.nunu.service.pay.weixin.WeiXinPayNotifyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 微信支付通知
 *
 * @author lilin
 * @date 2019/11/1 15:59
 */
@Service
@Slf4j
public class WeiXinPayNotifyServiceImpl implements WeiXinPayNotifyService {

    @Autowired
    PaymentService paymentService;

    @Override
    public void tradeSuccess(String outTradeNo, String buyerId, String buyerPayAmount) {
        paymentService.paySuccess(outTradeNo);
        log.info("tradeSuccess(outTradeNo={}, buyerId={})", outTradeNo, buyerId);
    }
}
