JDK 1.4
JDK 1.5
PHP
.NET
Python
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zmop.Api;
using Zmop.Api.Request;
using Zmop.Api.Response;
using Zmop.Api.Util;
namespace opensdk_dotnet4._0
{
class Program
{
//芝麻信用网关地址
private const string gatewayUrl = "https://zmopenapi.zmxy.com.cn/openapi.do";
//芝麻 RSA 公钥
private const string zhimaPublicKey = "***";
//商户 RSA 私钥
private const string privateKey = "***";
//数据编码格式
private const string charset = "UTF-8";
////芝麻分配给商户的 appId
private const string appId = "501";
public static void testZhimaCreditEpScoreGet()
{
DefaultZmopClient client = new DefaultZmopClient(gatewayUrl, appId, privateKey, zhimaPublicKey,charset);
ZhimaCreditEpScoreGetRequest request = new ZhimaCreditEpScoreGetRequest();
request.SetChannel("apppc");
request.SetPlatform("zmop");
request.OpenId = "268810000007909449496"; //必要参数
request.TransactionId = "201512100936588040000000465158"; //必要参数
request.ProductCode = "w1010100003000001418"; //必要参数
ZhimaCreditEpScoreGetResponse response = client.Execute(request);
ZhimaCreditEpScoreGetResponse resp = response;
}
static void Main(string[] args)
{
testZhimaCreditEpScoreGet();
}
}
}
#!/usr/bin/python
# encoding=utf-8
from zmop.ZmopClient import ZmopClient
from zmop.request.ZhimaCreditEpScoreGetRequest import *
gatewayUrl = "https://zmopenapi.zmxy.com.cn/openapi.do" # 芝麻信用网关地址
privateKeyFile = "d:\\keys\\private_key.pem" # 商户私钥文件路径
zmPublicKeyFile = "d:\\keys\\public_key.pem" # 芝麻公钥文件路径
charset = "UTF-8" # 数据编码格式
appid = "1000***" # 芝麻分配给商户的 appId
Client = ZmopClient(gatewayUrl, appid, charset, privateKeyFile, zmPublicKeyFile)
request = ZhimaCreditEpScoreGetRequest()
request.SetChannel("apppc") # 必要参数 这个参数具体填什么请咨询技术支持同学.
request.setPlatform("zmop") # 非必填参数,默认值是zmop
request.setOpenId("268810000007909449496") # 必要参数
request.setTransactionId("201512100936588040000000465158") # 必要参数
request.setProductCode("w1010100003000001418") # 必要参数
response = Client.execute(request)
print(response)
include('./ZmopClient.php');
class TestZhimaCreditEpScoreGet {
//芝麻信用网关地址
public $gatewayUrl = "https://zmopenapi.zmxy.com.cn/openapi.do";
//商户私钥文件
public $privateKeyFile = "d:\\keys\\private_key.pem";
//芝麻公钥文件
public $zmPublicKeyFile = "d:\\keys\\public_key.pem";
//数据编码格式
public $charset = "UTF-8";
//芝麻分配给商户的 appId
public $appId = "501";
public function testZhimaCreditEpScoreGet(){
$client = new ZmopClient($this->gatewayUrl,$this->appId,$this->charset,$this->privateKeyFile,$this->zmPublicKeyFile);
$request = new ZhimaCreditEpScoreGetRequest();
$request->setChannel("apppc");
$request->setPlatform("zmop");
$request->setOpenId("268810000007909449496");// 必要参数
$request->setTransactionId("201512100936588040000000465158");// 必要参数
$request->setProductCode("w1010100003000001418");// 必要参数
$response = $client->execute($request);
echo json_encode($response);
}
}
import com.antgroup.zmxy.openplatform.api.DefaultZhimaClient;
import com.antgroup.zmxy.openplatform.api.FileItem;
import com.antgroup.zmxy.openplatform.api.ZhimaApiException;
import com.antgroup.zmxy.openplatform.api.request.ZhimaCreditEpScoreGetRequest;
import com.antgroup.zmxy.openplatform.api.response.ZhimaCreditEpScoreGetResponse;
public class TestZhimaCreditEpScoreGet {
//芝麻开放平台地址
private String gatewayUrl = "https://zmopenapi.zmxy.com.cn/openapi.do";
//商户应用 Id
private String appId = "***";
//商户 RSA 私钥
private String privateKey = "***";
//芝麻 RSA 公钥
private String zhimaPublicKey = "***";
public void testZhimaCreditEpScoreGet() {
ZhimaCreditEpScoreGetRequest req = new ZhimaCreditEpScoreGetRequest();
req.setChannel("apppc");
req.setPlatform("zmop");
req.setOpenId("268810000007909449496");// 必要参数
req.setTransactionId("201512100936588040000000465158");// 必要参数
req.setProductCode("w1010100003000001418");// 必要参数
DefaultZhimaClient client = new DefaultZhimaClient(gatewayUrl, appId, privateKey, zhimaPublicKey);
try {
ZhimaCreditEpScoreGetResponse response = client.execute(req);
System.out.println(response.isSuccess());
System.out.println(response.getErrorCode());
System.out.println(response.getErrorMessage());
} catch (ZhimaApiException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
TestZhimaCreditEpScoreGet result = new TestZhimaCreditEpScoreGet();
result.testZhimaCreditEpScoreGet();
}
}
import com.antgroup.zmxy.openplatform.api.DefaultZhimaClient;
import com.antgroup.zmxy.openplatform.api.FileItem;
import com.antgroup.zmxy.openplatform.api.ZhimaApiException;
import com.antgroup.zmxy.openplatform.api.request.ZhimaCreditEpScoreGetRequest;
import com.antgroup.zmxy.openplatform.api.response.ZhimaCreditEpScoreGetResponse;
public class TestZhimaCreditEpScoreGet {
//芝麻开放平台地址
private String gatewayUrl = "https://zmopenapi.zmxy.com.cn/openapi.do";
//商户应用 Id
private String appId = "***";
//商户 RSA 私钥
private String privateKey = "***";
//芝麻 RSA 公钥
private String zhimaPublicKey = "***";
public void testZhimaCreditEpScoreGet() {
ZhimaCreditEpScoreGetRequest req = new ZhimaCreditEpScoreGetRequest();
req.setChannel("apppc");
req.setPlatform("zmop");
req.setOpenId("268810000007909449496");// 必要参数
req.setTransactionId("201512100936588040000000465158");// 必要参数
req.setProductCode("w1010100003000001418");// 必要参数
DefaultZhimaClient client = new DefaultZhimaClient(gatewayUrl, appId, privateKey, zhimaPublicKey);
try {
ZhimaCreditEpScoreGetResponse response =(ZhimaCreditEpScoreGetResponse)client.execute(req);
System.out.println(response.isSuccess());
System.out.println(response.getErrorCode());
System.out.println(response.getErrorMessage());
} catch (ZhimaApiException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
TestZhimaCreditEpScoreGet result = new TestZhimaCreditEpScoreGet();
result.testZhimaCreditEpScoreGet();
}
}