/**
  * @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;
 }
Esempio n. 2
0
 /**
  * Init fields map with Braintree filters
  * @return void
  */
 private function initFieldsToFiltersMap()
 {
     $this->searchFieldsToFiltersMap = ['id' => $this->braintreeSearchAdapter->id(), 'merchantAccountId' => $this->braintreeSearchAdapter->merchantAccountId(), 'orderId' => $this->braintreeSearchAdapter->orderId(), 'paypalDetails_paymentId' => $this->braintreeSearchAdapter->paypalPaymentId(), 'createdUsing' => $this->braintreeSearchAdapter->createdUsing(), 'type' => $this->braintreeSearchAdapter->type(), 'createdAt' => $this->braintreeSearchAdapter->createdAt(), 'amount' => $this->braintreeSearchAdapter->amount(), 'status' => $this->braintreeSearchAdapter->status(), 'settlementBatchId' => $this->braintreeSearchAdapter->settlementBatchId(), 'paymentInstrumentType' => $this->braintreeSearchAdapter->paymentInstrumentType()];
 }