C# 事务搜索始终为空

C# 事务搜索始终为空,c#,paypal,braintree,C#,Paypal,Braintree,我尝试搜索所有交易,但我得到的总是空的集合。在我的贝宝账户中,我有很多交易 我尝试了其他任何请求,但所有请求都是空的 BraintreeGateway gw = new BraintreeGateway("access_token$..."); var request = new TransactionSearchRequest().Status.IncludedIn(TransactionStatus.ALL); var collection = gw.Transaction.Search(r

我尝试搜索所有交易,但我得到的总是空的集合。在我的贝宝账户中,我有很多交易

我尝试了其他任何请求,但所有请求都是空的

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
不是有效的交易状态,因此您不会收到任何结果。可能的状态已链接。要搜索所有事务,您需要迭代每个事务状态。以下是一个例子:

request = new TransactionSearchRequest().
      Status.IncludedIn(TransactionStatus.AUTHORIZED,
                        TransactionStatus.SUBMITTED_FOR_SETTLEMENT
                        ...);  // add other statuses
collection = gateway.Transaction.Search(request);
充分披露:我在Braintree工作。如果您有任何进一步的问题,请随时联系
.

由于
ALL
不是有效的交易状态,因此您不会收到任何结果。可能的状态已链接。要搜索所有事务,您需要迭代每个事务状态。以下是一个例子:

request = new TransactionSearchRequest().
      Status.IncludedIn(TransactionStatus.AUTHORIZED,
                        TransactionStatus.SUBMITTED_FOR_SETTLEMENT
                        ...);  // add other statuses
collection = gateway.Transaction.Search(request);
充分披露:我在Braintree工作。如果您有任何进一步的问题,请随时联系