12345678910111213141516171819202122232425262728293031323334353637 |
- package com.fdkankan.pay.httpClient.client;
- import com.alibaba.fastjson.JSONObject;
- import com.dtflys.forest.annotation.*;
- import org.springframework.web.bind.annotation.RequestHeader;
- /**
- * 获取,调用4dkk服务
- */
- @BaseRequest(sslProtocol = "TLS")
- public interface WxClient {
- /**
- * 获取 access_token
- */
- @Get("https://open.weixin.qq.com/connect/oauth2/authorize?" +
- "appid={appid}&redirect_uri={redirectUri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect")
- JSONObject getCode(@Query("appid") String app_id, @Query("redirectUri") String redirectUri);
- /**
- * 获取 access_token
- */
- @Get("https://api.weixin.qq.com/sns/oauth2/access_token?appid={appid}&secret={secret}&code={code}&grant_type=authorization_code")
- JSONObject getToken(@Query("appid") String app_id, @Query("secret") String app_secret,@Query("code") String code);
- /**
- * 申请账单
- */
- @Get(value = "https://api.mch.weixin.qq.com/v3/bill/fundflowbill",headers = {
- "Accept:application/json",
- "Content-Type: application/json"
- })
- JSONObject tradeBill(@Query("bill_date") String bill_date,
- @Query("bill_type") String bill_type,
- @Query("tar_type") String tar_type,
- @Header("Authorization") String authorization);
- }
|