交易搜索始终为空
Transaction search always empty
我尝试搜索所有交易,但得到的总是空集合。在我的 paypal 帐户中,我收到了很多交易。
我尝试了任何其他请求,同样我从所有请求中得到空
BraintreeGateway gw = new BraintreeGateway("access_token$...");
var request = new TransactionSearchRequest().Status.IncludedIn(TransactionStatus.ALL);
var collection = gw.Transaction.Search(request);
foreach (Braintree.Transaction transaction in collection)
{
Console.WriteLine(transaction.Id);
}
由于 ALL
不是有效的交易状态,您没有收到任何结果。可能的状态已链接 here。要搜索所有交易,您需要遍历每个交易状态。这是一个例子:
request = new TransactionSearchRequest().
Status.IncludedIn(TransactionStatus.AUTHORIZED,
TransactionStatus.SUBMITTED_FOR_SETTLEMENT
...); // add other statuses
collection = gateway.Transaction.Search(request);
完全披露:我在 Braintree 工作。如果您有任何其他问题,请随时联系
support.
我尝试搜索所有交易,但得到的总是空集合。在我的 paypal 帐户中,我收到了很多交易。
我尝试了任何其他请求,同样我从所有请求中得到空
BraintreeGateway gw = new BraintreeGateway("access_token$...");
var request = new TransactionSearchRequest().Status.IncludedIn(TransactionStatus.ALL);
var collection = gw.Transaction.Search(request);
foreach (Braintree.Transaction transaction in collection)
{
Console.WriteLine(transaction.Id);
}
由于 ALL
不是有效的交易状态,您没有收到任何结果。可能的状态已链接 here。要搜索所有交易,您需要遍历每个交易状态。这是一个例子:
request = new TransactionSearchRequest().
Status.IncludedIn(TransactionStatus.AUTHORIZED,
TransactionStatus.SUBMITTED_FOR_SETTLEMENT
...); // add other statuses
collection = gateway.Transaction.Search(request);
完全披露:我在 Braintree 工作。如果您有任何其他问题,请随时联系 support.