public static function Braintree_CreditCard::expiringBetween in Commerce Braintree 7
returns a ResourceCollection of credit cards expiring between start/end
Return value
object ResourceCollection
2 calls to Braintree_CreditCard::expiringBetween()
- Braintree_CreditCardTest::testExpiringBetween in braintree_php/
tests/ integration/ CreditCardTest.php - Braintree_CreditCardTest::testExpiringBetween_parsesCreditCardDetailsUnderTransactionsCorrectly in braintree_php/
tests/ integration/ CreditCardTest.php
File
- braintree_php/
lib/ Braintree/ CreditCard.php, line 163
Class
- Braintree_CreditCard
- Creates and manages Braintree CreditCards
Code
public static function expiringBetween($startDate, $endDate) {
$queryPath = '/payment_methods/all/expiring_ids?start=' . date('mY', $startDate) . '&end=' . date('mY', $endDate);
$response = Braintree_Http::post($queryPath);
$pager = array(
'className' => __CLASS__,
'classMethod' => 'fetchExpiring',
'methodArgs' => array(
$startDate,
$endDate,
),
);
return new Braintree_ResourceCollection($response, $pager);
}