[英]How get paymants list with PayPal .NET SDK?
I trying get list of payment transactions with next code: 我尝试使用下一个代码获取付款交易清单:
static void Main(string[] args)
{
var config = ConfigManager.Instance.GetProperties();
var accessToken = new OAuthTokenCredential(config).GetAccessToken();
var apiContext = new APIContext(accessToken);
var payments = Payment.List(apiContext);
}
But I receive empty list. 但我收到空列表。 How I can get payment history info with PayPal .NET SDK?
如何使用PayPal .NET SDK获取付款历史信息?
Resolved by using merchant-sdk-dotnet . 通过使用merchant-sdk-dotnet解决 。
static void Main(string[] args)
{
var config = ConfigManager.Instance.GetProperties();
var service = new PayPalAPIInterfaceServiceService(config);
var req = new TransactionSearchReq
{
TransactionSearchRequest = new TransactionSearchRequestType("2019-06-20T11:00:00Z")
};
var data = service.TransactionSearch(req);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.