string gateway = "https://openapi.alipay.com/gateway.do";
string isvappaeskey = "xxxxx";
string isvappid = "isvappid";
string isvappprivatekey="s05e40 6iro1hfzop9nc";
string alipaypublickey="medbeu5/f0lvwidaqab";
//encryptkey填入当前第三方应用的aes密钥,encrypttype为"aes"
alipayclient alipayclient = new defaultalipayclient(gateway, isvappid,isvappprivatekey, "json", "utf-8",alipaypublickey, "rsa2", encryptkey, "aes");
alipayopenauthappaesgetrequest request = new alipayopenauthappaesgetrequest();
request.setbizcontent("{"
//填写需查询密钥的应用appid
//为模板设置就填写小程序模板appid,为商家设置就填写商家小程序appid
"\"merchant_app_id\":\"20191223601234564\""
" }");
alipayopenauthappaesgetresponse response = alipayclient.execute(request);
if(response.issuccess()){
system.out.println("调用成功");
} else {
system.out.println("调用失败");
}