// Path: src/com/jfinal/weixin/sdk/cache/IAccessTokenCache.java
// public interface IAccessTokenCache {
// 
// 	// 默认超时时间7200秒 5秒用于程序执行误差
// 	final int DEFAULT_TIME_OUT = 7200 - 5;
// 
// 	<T> T get(String key);
// 
// 	void set(String key, Object value);
// 
// 	void remove(String key);
// 
// }


import com.jfinal.kit.HttpKit;
import com.jfinal.weixin.sdk.cache.IAccessTokenCache;
import com.jfinal.weixin.sdk.kit.ParaMap;
/**
 * Copyright (c) 2011-2015, Unas 小强哥 (unas@qq.com).
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 */

package com.jfinal.weixin.sdk.api;


/**
 * 
 * 生成签名之前必须先了解一下jsapi_ticket，jsapi_ticket是公众号用于调用微信JS接口的临时票据
 * https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi
 * 
 * 微信卡券接口签名凭证api_ticket
 * https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=wx_card
 */
public class JsTicketApi {

	private static String apiUrl = "https://api.weixin.qq.com/cgi-bin/ticket/getticket";

// Path: src/com/jfinal/weixin/sdk/cache/IAccessTokenCache.java
// public interface IAccessTokenCache {
// 
// 	// 默认超时时间7200秒 5秒用于程序执行误差
// 	final int DEFAULT_TIME_OUT = 7200 - 5;
// 
// 	<T> T get(String key);
// 
// 	void set(String key, Object value);
// 
// 	void remove(String key);
// 
// }


// Path: src/com/jfinal/weixin/sdk/api/JsTicketApi.java
import com.jfinal.kit.HttpKit;
import com.jfinal.weixin.sdk.cache.IAccessTokenCache;
import com.jfinal.weixin.sdk.kit.ParaMap;

/**
 * Copyright (c) 2011-2015, Unas 小强哥 (unas@qq.com).
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 */

package com.jfinal.weixin.sdk.api;


/**
 * 
 * 生成签名之前必须先了解一下jsapi_ticket，jsapi_ticket是公众号用于调用微信JS接口的临时票据
 * https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi
 * 
 * 微信卡券接口签名凭证api_ticket
 * https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=wx_card
 */
public class JsTicketApi {

	private static String apiUrl = "https://api.weixin.qq.com/cgi-bin/ticket/getticket";

	static IAccessTokenCache accessTokenCache = ApiConfigKit.getAccessTokenCache();