前端通过授权请求信息字串获取支付宝用户信息,后台保存用户信心实现体现功能,有完整版和极简版
package com.framework.loippi.plugin.aliapppay.util;
import com.alipay.api.AlipayApiException;
import com.alipay.api.internal.util.AlipaySignature;
import com.framework.loippi.cache.ConfigCache;
import com.framework.loippi.plugin.aliapppay.sign.Base64;
import com.framework.loippi.plugin.wxapppay.MD5;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Random;
public class AliPayInfoStrUtil {
/**
* 获取授权请求信息字串
* @return
*/
public static String getInfoStr(){
StringBuilder infoStr=new StringBuilder();
infoStr.append("apiname=com.alipay.account.auth");
infoStr.append("&app_id="+你的appId);
infoStr.append("&app_name=mc");