package com.winsun.utils;

/**
 * 微信请求地址配置及微信参数类
 * @author 董有沛
 * @date 2017-03-31
 */
public class WxConfig {
	
/**************公众号参数信息*************/
	// 公众号appid  校园服务号
	public static final String APPID = "wx0641dc1dc4d34384";
	
	// 公众号秘钥 secret  校园服务号
	public static final String APPSECRET =  "3b43b46fc94d4e98588ee6ad992fa5c7";
	public static final String headUrl = "http://dianyuanjiangli.com";
	public static final String KEY = "WINSUN123456xyjl987654wxpay88888";
	public static final String MAC_ID = "1498149672";
	public static final String NOTIFY_URL = "http://dianyuanjiangli.com/xyjl/yx/wxpay/yxt!payNotify.action";
	
//	// 公众号appid  网讯测试服务号
//	public static final String APPID = "wxfc18f5186b729d15";
//	
//	// 公众号秘钥 secret  网讯测试服务号
//	public static final String APPSECRET = "122278f3fb555468848ff040620505ad";
//
//	public static final String headUrl = "http://167460x6b0.51mypc.cn";
//	
//	public static final String KEY = "WINSUN123456xyjl987654wxpay55555";
//	
//	public static final String MAC_ID = "1346602601";
//	
//	public static final String NOTIFY_URL = "http://167460x6b0.51mypc.cn/xyjl/yx/wxpay/yxt!payNotify.action";

	/**************消息类型**************/
	
	// 文本类型
	public static final String MSG_TEXT = "text";
	// 图片类型
	public static final String MSG_IMAGE = "image";
	// 语音类型
	public static final String MSG_VOICE = "voice";
	// 视频类型
	public static final String MSG_VIDEO = "video";
	// 小视频类型
	public static final String MSG_SHORT_VIDEO = "shortvideo";
	// 位置类型
	public static final String MSG_LOCATION = "location";
	// 链接类型
	public static final String MSG_LINK = "link";
	// 事件类型
	public static final String MSG_EVENT = "event";
		
	/****************事件类型******************/
	
	// 订阅事件
	public static final String EVENT_SUBSCRIBE = "subscribe";
	// 取消订阅事件
	public static final String EVENT_UNSUBSCRIBE = "unsubscribe";
	// 扫带参数的二维码事件   ps: 只有用户已关注了公众号，事件类型才是scan，未关注时，事件类型是subscribe
	public static final String EVENT_SCAN = "SCAN";
	// 上报位置事件
	public static final String EVENT_LOCATION = "LOCATION";
	// 自定义菜单的拉取消息事件
	public static final String EVENT_CLICK = "CLICK";
	// 自定义菜单的链接跳转事件
	public static final String EVENT_VIEW = "VIEW";

	/****************微信接口地址******************/
	
	// accessToken生成
	public static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="+ APPID +"&secret=" + APPSECRET;
	
	// 临时二维码
	public static String TEMPORARY_CODE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token="; 
	
	// 永久二维码生成
	public static String PERMANENT_CODE_URL = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token="; 
	
	// 使用请求二维码返回ticket换取二维码图片   ps:(ticket需UrlEncode)
	public static String TICKET_CODE_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=";

	// 授权地址
	public static String OAuth = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + APPID + "&redirect_uri=&response_type=code&scope=&state=#wechat_redirect";
		
	/***********************/
	public static String commonUrl = "http://open.weixin.qq.com/connect/oauth2/authorize?appid="+ APPID +"&redirect_uri=&response_type=code&scope=snsapi_base&state=frommenu#wechat_redirect";
	
}
