package cn.pluss.platform.leshua;

import java.io.File;
import java.util.Map;

import cn.pluss.platform.entity.MerchantOrder;
import cn.pluss.platform.entity.MerchantStore;
import cn.pluss.platform.vo.MerchantOrderVO;
import cn.pluss.platform.wap.MerchantLeshuaDTO;
import com.alibaba.fastjson.JSONObject;

import cn.pluss.platform.api.Result;

import javax.servlet.http.HttpServletRequest;

/**
 * @author yuchen
 * 
 * @Description 
 */
public interface LeshuaService {
	
	/**
	 * 
	 * requestSaasApi:(调用进件接口). <br/> 
	 * 
	 * @author Administrator 
	 * @param url
	 * @param data
	 * @return 
	 * @since JDK 1.8
	 */
	public  Result<Object> requestApi(String url, JSONObject data);
	
	/**
	 * 
	 * requestApi:(调用进件上传图片接口). <br/> 
	 * 
	 * @author Administrator 
	 * @param url
	 * @param data
	 * @param pictures
	 * @return 
	 * @since JDK 1.8
	 */
	 public Result<Object> requestApi(String url,JSONObject data,Map<String,File> pictures);
	 
	 /**
		 * 调用乐刷交易接口
		 * @param reqMap
		 * @param apiKey
		 * @param isCheckRespSign 是否对返回参数进行验签
		 * @return
		 * @throws Exception
		 */
	 public  String requestPay(Map<String,String> reqMap, String apiKey, boolean isCheckRespSign)throws Exception;
	 
	 /**
	  * 
	  * leshuaImgUpload:(图片url). <br/> 
	  * 
	  * @author Administrator 
	  * @param path
	  * @return
	  * @throws Exception 
	  * @since JDK 1.8
	  */
	 public String leshuaImgUpload(String path) throws Exception;
	 
	 /**
	  * 
	  * openMerchantService:(乐刷商家费率修改). <br/> 
	  * 
	  * @author Administrator 
	  * @param map 
	  * @since JDK 1.8
	  */
	 public Result<Map<String, Object>> openMerchantService(Map<String, Object> map) throws Exception;
	/**
	 * 乐刷交易结果查询
	 * @param order
	 * @param mchId
	 * @return
	 */
	Map<String, Object> requestTransQuery(MerchantOrder order,String mchId) throws Exception;


	Map<String,Object> tradePay(Map<String,String> params, HttpServletRequest request,MerchantStore store,String orderNumber) throws Exception;;

	/**
	 * 退款
	 * @param queryMerchantOrder
	 * @param leshuaMchId
	 * @return
	 */
	Map<String, Object> leshuaReturn(MerchantOrderVO queryMerchantOrder, String leshuaMchId);
}

