KKSU
2024-01-17 ec4e65ba157bded805081aa40977b1d996fd2b21
src/main/java/cc/mrbird/febs/pay/service/WxFaPiaoService.java
@@ -1,11 +1,22 @@
package cc.mrbird.febs.pay.service;
import java.security.KeyPair;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.util.Map;
public interface WxFaPiaoService {
    String createAuthorization(String method, String canonicalUrl, String body, KeyPair keyPair);//生成Token
    String createAuthorization(String method, String canonicalUrl, String body, PrivateKey keyPair) throws UnsupportedEncodingException, NoSuchAlgorithmException;//生成Token
    KeyPair getPrivateKey();//通过证书获取私钥公钥
    PrivateKey getPrivateKeyV3() throws IOException;//获取私钥
    String sendPatch(String url, String params, String token);
    String sendPost(String url, String params, String token);
    Map<String, Object> fapiaoCallBack(HttpServletResponse response, HttpServletRequest request);
}