package cn.pluss.platform.ali;

import java.util.Map;

import cn.pluss.platform.entity.MercOrderDetail;
import com.alipay.api.AlipayApiException;

import cn.pluss.platform.api.Result;
import cn.pluss.platform.dto.BatchInfoDTO;
import cn.pluss.platform.entity.DeviceMerchantBuy;
import cn.pluss.platform.dto.DeviceMerchantBuyDTO;
import cn.pluss.platform.entity.MerchantBaseInfo;

/**
 * @author yuchen
 *
 * @Description 
 * 支付宝进件service
 */
public interface AliService {
	
	/**
	 * 
	 * getBatchNo:(开启事务). <br/> 
	 *
	 * @author Administrator 
	 * @param dto
	 * @return
	 * @throws AlipayApiException 
	 * @since JDK 1.8
	 */
	Result<String> getBatchNo(MerchantBaseInfo merchantBaseInfo);
	
	/**
	 * 
	 * facetofaceSign:(是否当面付产品提交信息成功). <br/> 
	 *
	 * @author Administrator 
	 * @param dto
	 * @return 
	 * @since JDK 1.8
	 */
	Boolean facetofaceSign(BatchInfoDTO dto);
	
	/**
	 * 
	 * agentConfirm:(提交事务). <br/> 
	 *
	 * @author Administrator 
	 * @param batchNo
	 * @return
	 * @throws AlipayApiException 
	 * @since JDK 1.8
	 */
	Boolean agentConfirm(String batchNo);
	
	/**
	 * 
	 * AppPayParam:(app支付统一下单). <br/> 
	 *
	 * @author Administrator 
	 * @return 
	 * @since JDK 1.8
	 */
	Result<Map<String, Object>> appPayParam(Map<String, String> map, DeviceMerchantBuyDTO deviceMerchantBuyDTO);

	/**
	 *
	 * AppPayParam:(app支付统一下单). <br/>
	 *
	 * @author Administrator
	 * @return
	 * @since JDK 1.8
	 */
	Result<Map<String, Object>> appPayParamV2(Map<String, String> map, DeviceMerchantBuyDTO deviceMerchantBuyDTO);

	/**
	 * app统一支付下单，非商城
	 * @param map
	 * @return
	 */
	Map<String, Object> appPayParam(Map<String, String> map);

	/**
	 * 
	 * AppRefund:(app支付退款). <br/> 
	 *
	 * @author Administrator 
	 * @param deviceMerchantBuy
	 * @return 
	 * @since JDK 1.8
	 */
	Result<Map<String, Object>> appRefund(DeviceMerchantBuy deviceMerchantBuy);

	/**
	 * 退款V2
	 * @param orderDetail
	 * @return
	 */
	Map<String, Object> refundV2(MercOrderDetail orderDetail);
}

