PHP Class Braintree\CreditCardGateway

== More information == For more detailed information on CreditCards, see {@link http://www.braintreepayments.com/gateway/credit-card-api http://www.braintreepaymentsolutions.com/gateway/credit-card-api}
For more detailed information on CreditCard verifications, see {@link http://www.braintreepayments.com/gateway/credit-card-verification-api http://www.braintreepaymentsolutions.com/gateway/credit-card-verification-api}
Afficher le fichier Open project: braintree/braintree_php Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $gateway )
_doCreate ( string $subPath, array $params ) : mixed sends the create request to the gateway
billingAddressSignature ( )
create ( $attribs )
createCreditCardUrl ( ) : string
createFromTransparentRedirect ( $queryString ) : Braintree\Result\Successful | Error create a customer from a TransparentRedirect operation
createNoValidate ( array $attribs ) : CreditCard attempts the create operation assuming all data will validate returns a CreditCard object instead of a Result
createSignature ( )
credit ( $token, $transactionAttribs ) : Braintree\Result\Successful | Error create a credit on the card for the passed transaction
creditNoValidate ( $token, $transactionAttribs ) : Transaction create a credit on this card, assuming validations will pass
delete ( $token )
expired ( ) : ResourceCollection returns a ResourceCollection of expired credit cards
expiringBetween ( $startDate, $endDate ) : ResourceCollection returns a ResourceCollection of credit cards expiring between start/end
fetchExpired ( $ids )
fetchExpiring ( $startDate, $endDate, $ids )
find ( string $token ) : CreditCard find a creditcard by token
fromNonce ( string $nonce ) : CreditCard Convert a payment method nonce to a credit card
sale ( string $token, array $transactionAttribs ) : Braintree\Result\Successful | Error create a new sale for the current card
saleNoValidate ( string $token, array $transactionAttribs ) : Transaction create a new sale using this card, assuming validations will pass
update ( string $token, array $attributes ) : Braintree\Result\Successful | Error updates the creditcard record
updateCreditCardUrl ( ) : string
updateFromTransparentRedirect ( $queryString ) : object update a customer from a TransparentRedirect operation
updateNoValidate ( string $token, array $attributes ) : CreditCard update a creditcard record, assuming validations will pass
updateSignature ( )

Private Methods

Méthode Description
_doUpdate ( $httpVerb, $subPath, array $params ) : mixed sends the update request to the gateway
_validateId ( string $identifier = null, $identifierType = "token" ) verifies that a valid credit card identifier is being used
_verifyGatewayResponse ( array $response ) : Braintree\Result\Successful | Error generic method for validating incoming gateway responses
baseOptions ( )
baseSignature ( $options )

Method Details

__construct() public méthode

public __construct ( $gateway )

_doCreate() public méthode

sends the create request to the gateway
public _doCreate ( string $subPath, array $params ) : mixed
$subPath string
$params array
Résultat mixed

billingAddressSignature() public static méthode

public static billingAddressSignature ( )

create() public méthode

public create ( $attribs )

createCreditCardUrl() public méthode

Deprecation: since version 2.3.0
public createCreditCardUrl ( ) : string
Résultat string

createFromTransparentRedirect() public méthode

create a customer from a TransparentRedirect operation
Deprecation: since version 2.3.0
public createFromTransparentRedirect ( $queryString ) : Braintree\Result\Successful | Error
Résultat Braintree\Result\Successful | Braintree\Result\Error

createNoValidate() public méthode

attempts the create operation assuming all data will validate returns a CreditCard object instead of a Result
public createNoValidate ( array $attribs ) : CreditCard
$attribs array
Résultat CreditCard

createSignature() public static méthode

public static createSignature ( )

credit() public méthode

create a credit on the card for the passed transaction
public credit ( $token, $transactionAttribs ) : Braintree\Result\Successful | Error
Résultat Braintree\Result\Successful | Braintree\Result\Error

creditNoValidate() public méthode

returns a Transaction object on success
public creditNoValidate ( $token, $transactionAttribs ) : Transaction
Résultat Transaction

delete() public méthode

public delete ( $token )

expired() public méthode

returns a ResourceCollection of expired credit cards
public expired ( ) : ResourceCollection
Résultat ResourceCollection

expiringBetween() public méthode

returns a ResourceCollection of credit cards expiring between start/end
public expiringBetween ( $startDate, $endDate ) : ResourceCollection
Résultat ResourceCollection

fetchExpired() public méthode

public fetchExpired ( $ids )

fetchExpiring() public méthode

public fetchExpiring ( $startDate, $endDate, $ids )

find() public méthode

find a creditcard by token
public find ( string $token ) : CreditCard
$token string credit card unique id
Résultat CreditCard

fromNonce() public méthode

Convert a payment method nonce to a credit card
public fromNonce ( string $nonce ) : CreditCard
$nonce string payment method nonce
Résultat CreditCard

sale() public méthode

create a new sale for the current card
See also: Transaction::sale()
public sale ( string $token, array $transactionAttribs ) : Braintree\Result\Successful | Error
$token string
$transactionAttribs array
Résultat Braintree\Result\Successful | Braintree\Result\Error

saleNoValidate() public méthode

returns a Transaction object on success
See also: Transaction::sale()
public saleNoValidate ( string $token, array $transactionAttribs ) : Transaction
$token string
$transactionAttribs array
Résultat Transaction

update() public méthode

if calling this method in context, $token is the 2nd attribute. $token is not sent in object context.
public update ( string $token, array $attributes ) : Braintree\Result\Successful | Error
$token string (optional)
$attributes array
Résultat Braintree\Result\Successful | Braintree\Result\Error

updateCreditCardUrl() public méthode

public updateCreditCardUrl ( ) : string
Résultat string

updateFromTransparentRedirect() public méthode

update a customer from a TransparentRedirect operation
Deprecation: since version 2.3.0
public updateFromTransparentRedirect ( $queryString ) : object
Résultat object

updateNoValidate() public méthode

if calling this method in context, $token is the 2nd attribute. $token is not sent in object context. returns a CreditCard object on success
public updateNoValidate ( string $token, array $attributes ) : CreditCard
$token string
$attributes array
Résultat CreditCard

updateSignature() public static méthode

public static updateSignature ( )