forked from braintree/braintree_php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11322fe
commit acd9476
Showing
36 changed files
with
332 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
/** | ||
* Base functionality for library classes | ||
*/ | ||
abstract class Braintree_Base | ||
{ | ||
/** | ||
* Disable the default constructor | ||
* | ||
* Objects that inherit from Braintree_Base should be constructed with | ||
* the static factory() method. | ||
* | ||
* @ignore | ||
*/ | ||
protected function __construct() | ||
{ | ||
} | ||
|
||
/** | ||
* Disable cloning of objects | ||
* | ||
* @ignore | ||
*/ | ||
protected function __clone() | ||
{ | ||
} | ||
|
||
/** | ||
* Accessor for instance properties stored in the private $_attributes property | ||
* | ||
* @ignore | ||
* @param string $name | ||
* @return mixed | ||
*/ | ||
public function __get($name) | ||
{ | ||
if (array_key_exists($name, $this->_attributes)) { | ||
return $this->_attributes[$name]; | ||
} | ||
else { | ||
trigger_error('Undefined property on ' . get_class($this) . ': ' . $name, E_USER_NOTICE); | ||
return null; | ||
} | ||
} | ||
|
||
/** | ||
* Checks for the existance of a property stored in the private $_attributes property | ||
* | ||
* @ignore | ||
* @param string $name | ||
* @return boolean | ||
*/ | ||
public function __isset($name) | ||
{ | ||
return array_key_exists($name, $this->_attributes); | ||
} | ||
|
||
/** | ||
* Mutator for instance properties stored in the private $_attributes property | ||
* | ||
* @ignore | ||
* @param string $key | ||
* @param mixed $value | ||
*/ | ||
public function _set($key, $value) | ||
{ | ||
$this->_attributes[$key] = $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,53 @@ | ||
<?php | ||
class Braintree_CreditCardVerificationSearch | ||
{ | ||
static function id() { return new Braintree_TextNode('id'); } | ||
static function creditCardCardholderName() { return new Braintree_TextNode('credit_card_cardholder_name'); } | ||
static function id() { | ||
return new Braintree_TextNode('id'); | ||
} | ||
|
||
static function creditCardCardholderName() { | ||
return new Braintree_TextNode('credit_card_cardholder_name'); | ||
} | ||
|
||
static function creditCardExpirationDate() { return new Braintree_EqualityNode('credit_card_expiration_date'); } | ||
static function creditCardNumber() { return new Braintree_PartialMatchNode('credit_card_number'); } | ||
static function billingAddressDetailsPostalCode() { | ||
return new Braintree_TextNode('billing_address_details_postal_code'); | ||
} | ||
|
||
static function customerEmail() { | ||
return new Braintree_TextNode('customer_email'); | ||
} | ||
|
||
static function ids() { return new Braintree_MultipleValueNode('ids'); } | ||
static function customerId() { | ||
return new Braintree_TextNode('customer_id'); | ||
} | ||
|
||
static function paymentMethodToken(){ | ||
return new Braintree_TextNode('payment_method_token'); | ||
} | ||
|
||
static function creditCardExpirationDate() { | ||
return new Braintree_EqualityNode('credit_card_expiration_date'); | ||
} | ||
|
||
static function creditCardNumber() { | ||
return new Braintree_PartialMatchNode('credit_card_number'); | ||
} | ||
|
||
static function ids() { | ||
return new Braintree_MultipleValueNode('ids'); | ||
} | ||
|
||
static function createdAt() { | ||
return new Braintree_RangeNode("created_at"); | ||
} | ||
|
||
static function creditCardCardType() | ||
{ | ||
return new Braintree_MultipleValueNode("credit_card_card_type", array( | ||
Braintree_CreditCard::AMEX, | ||
Braintree_CreditCard::CARTE_BLANCHE, | ||
Braintree_CreditCard::CHINA_UNION_PAY, | ||
Braintree_CreditCard::DINERS_CLUB_INTERNATIONAL, | ||
Braintree_CreditCard::DISCOVER, | ||
Braintree_CreditCard::JCB, | ||
Braintree_CreditCard::LASER, | ||
Braintree_CreditCard::MAESTRO, | ||
Braintree_CreditCard::MASTER_CARD, | ||
Braintree_CreditCard::SOLO, | ||
Braintree_CreditCard::SWITCH_TYPE, | ||
Braintree_CreditCard::VISA, | ||
Braintree_CreditCard::UNKNOWN | ||
)); | ||
} | ||
|
||
|
||
static function createdAt() { return new Braintree_RangeNode("created_at"); } | ||
return new Braintree_MultipleValueNode("credit_card_card_type", Braintree_CreditCard::allCardTypes()); | ||
} | ||
|
||
static function status() | ||
{ | ||
return new Braintree_MultipleValueNode("status", Braintree_Result_CreditCardVerification::allStatuses()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.