Braintree\TransactionSearch::authorizationExpiredAt PHP Method

authorizationExpiredAt() public static method

public static authorizationExpiredAt ( )
    public static function authorizationExpiredAt()
    {
        return new RangeNode("authorizationExpiredAt");
    }

Usage Example

 public function test_rangeNode_authorizationExpiredAt()
 {
     $two_days_ago = date_create("now -2 days", new DateTimeZone("UTC"));
     $yesterday = date_create("now -1 day", new DateTimeZone("UTC"));
     $tomorrow = date_create("now +1 day", new DateTimeZone("UTC"));
     $collection = Braintree\Transaction::search([Braintree\TransactionSearch::authorizationExpiredAt()->between($two_days_ago, $yesterday)]);
     $this->assertEquals(0, $collection->maximumCount());
     $collection = Braintree\Transaction::search([Braintree\TransactionSearch::authorizationExpiredAt()->between($yesterday, $tomorrow)]);
     $this->assertGreaterThan(0, $collection->maximumCount());
     $this->assertEquals(Braintree\Transaction::AUTHORIZATION_EXPIRED, $collection->firstItem()->status);
 }