/** * @param OrderPaymentInterface $payment * @return boolean */ private function isExpiredAuthorization(OrderPaymentInterface $payment) { $collection = $this->braintreeAdapter->search([$this->braintreeSearchAdapter->id()->is($payment->getLastTransId()), $this->braintreeSearchAdapter->status()->is(Transaction::AUTHORIZATION_EXPIRED)]); return $collection->maximumCount() > 0; }