|
|
@ -1,4 +1,6 @@ |
|
|
|
using com.alibaba.openapi.client; |
|
|
|
using BBWY._1688SDK.entity.Order; |
|
|
|
using BBWY.Common.Models; |
|
|
|
using com.alibaba.openapi.client; |
|
|
|
using com.alibaba.openapi.client.policy; |
|
|
|
using Jd.Api; |
|
|
|
using Jd.Api.Request; |
|
|
@ -60,15 +62,53 @@ namespace BBWY.Test |
|
|
|
//var token = "50a4c0f5c55848b5a8a715709e8d6fe0jntb"; //卿卿玩具专营店
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
var request = new { AppKey = "1074007", AppSecret = "0r9u4Fc9zK", AppToken = "8093fdc5-6adc-46c7-b640-87218c1dcccd" }; |
|
|
|
var client = GetSyncAPIClient(request.AppKey, request.AppSecret); |
|
|
|
RequestPolicy reqPolicy = new RequestPolicy(); |
|
|
|
reqPolicy.HttpMethod = "POST"; |
|
|
|
reqPolicy.NeedAuthorization = false; |
|
|
|
reqPolicy.RequestSendTimestamp = false; |
|
|
|
reqPolicy.UseHttps = false; |
|
|
|
reqPolicy.UseSignture = true; |
|
|
|
reqPolicy.AccessPrivateApi = false; |
|
|
|
|
|
|
|
Request _request = new Request(); |
|
|
|
APIId apiId = new APIId |
|
|
|
{ |
|
|
|
Name = "alibaba.trade.pay.protocolPay.preparePay", |
|
|
|
NamespaceValue = "com.alibaba.trade", |
|
|
|
Version = 1 |
|
|
|
}; |
|
|
|
_request.ApiId = apiId; |
|
|
|
|
|
|
|
//var param = new
|
|
|
|
//{
|
|
|
|
// orderId = 3494275885416167358
|
|
|
|
//};
|
|
|
|
|
|
|
|
Process rdpProcess = new Process(); |
|
|
|
rdpProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\cmdkey.exe"); |
|
|
|
rdpProcess.StartInfo.Arguments = "/generic:TERMSRV/116.62.152.18 /user:administrator /pass:kaicn1132+-"; |
|
|
|
rdpProcess.Start(); |
|
|
|
//var param = new tradeWithholdPreparePayParam()
|
|
|
|
//{
|
|
|
|
// orderId = 3494275885416167358
|
|
|
|
//};
|
|
|
|
|
|
|
|
var param = new |
|
|
|
{ |
|
|
|
tradeWithholdPreparePayParam = new |
|
|
|
{ |
|
|
|
orderId = 3494275885416167358 |
|
|
|
} |
|
|
|
}; |
|
|
|
_request.RequestEntity = param; |
|
|
|
if (!string.IsNullOrEmpty(request.AppToken)) |
|
|
|
_request.AccessToken = request.AppToken; |
|
|
|
var result = client.NewRequest(_request, reqPolicy); |
|
|
|
if (result.Value<bool>("success") != true) |
|
|
|
throw new BusinessException(result.Value<string>("message")); |
|
|
|
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(result)); |
|
|
|
} |
|
|
|
|
|
|
|
rdpProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\mstsc.exe"); |
|
|
|
rdpProcess.StartInfo.Arguments = "/v: 116.62.152.18 /console"; |
|
|
|
rdpProcess.Start(); |
|
|
|
Console.ReadKey(); |
|
|
|
} |
|
|
|
|
|
|
|