AlipayClient alipayClient = new DefaultAlipayClient("https://openapi.alipay.com/gateway.do","app_id","your private_key","json","GBK","alipay_public_key","RSA2");
KoubeiAdvertDeliveryDiscountAuthwebBatchqueryRequest request = new KoubeiAdvertDeliveryDiscountAuthwebBatchqueryRequest();
request.setBizContent("{" +
"\"shop_id\":\"2015072900077000000001362202\"," +
"\"latitude\":\"31.22967\"," +
"\"longitude\":\"121.4762\"," +
"\"channel\":\"yufabu\"" +
" }");
KoubeiAdvertDeliveryDiscountAuthwebBatchqueryResponse response = alipayClient.pageExecute(request,accessToken);
if(response.isSuccess()){
System.out.println("调用成功");
} else {
System.out.println("调用失败");
}
IAopClient client = new DefaultAopClient("https://openapi.alipay.com/gateway.do", "app_id", "merchant_private_key", "json", "1.0", "RSA2", "alipay_public_key", "GBK", false);
KoubeiAdvertDeliveryDiscountAuthwebBatchqueryRequest request= new KoubeiAdvertDeliveryDiscountAuthwebBatchqueryRequest() ;
request.BizContent="{" +
"\"shop_id\":\"2015072900077000000001362202\"," +
"\"latitude\":\"31.22967\"," +
"\"longitude\":\"121.4762\"," +
"\"channel\":\"yufabu\"" +
" }";
KoubeiAdvertDeliveryDiscountAuthwebBatchqueryResponse response=client.pageExecute(request,accessToken);
Console.WriteLine(response.Body);
$aop = new AopClient ();
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
$aop->appId = 'your app_id';
$aop->rsaPrivateKey = '请填写开发者私钥去头去尾去回车,一行字符串';
$aop->alipayrsaPublicKey='请填写支付宝公钥,一行字符串';
$aop->apiVersion = '1.0';
$aop->signType = 'RSA2';
$aop->postCharset='GBK';
$aop->format='json';
$request = new KoubeiAdvertDeliveryDiscountAuthwebBatchqueryRequest ();
$request->setBizContent("{" .
"\"shop_id\":\"2015072900077000000001362202\"," .
"\"latitude\":\"31.22967\"," .
"\"longitude\":\"121.4762\"," .
"\"channel\":\"yufabu\"" .
" }");
$result = $aop->pageExecute ( $request , $accessToken );
$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";
$resultCode = $result->$responseNode->code;
if(!empty($resultCode)&&$resultCode == 10000){
echo "成功";
} else {
echo "失败";
}
https://openapi.alipay.com/gateway.do?timestamp=2013-01-01 08:08:08&method=koubei.advert.delivery.discount.authweb.batchquery&app_id=5183&sign_type=RSA2&sign=ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE&version=1.0&auth_token=20130319e9b8d53d09034da8998caefa756c4006&biz_content=
{
"shop_id":"2015072900077000000001362202",
"latitude":"31.22967",
"longitude":"121.4762",
"channel":"yufabu"
}
//为确保安全通信,需自行验证响应示例中的sign值是否为蚂蚁金服所提供。