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}
ファイルを表示 Open project: braintree/braintree_php Class Usage Examples

Public Methods

Method 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

Method 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 method

public __construct ( $gateway )

_doCreate() public method

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

billingAddressSignature() public static method

public static billingAddressSignature ( )

create() public method

public create ( $attribs )

createCreditCardUrl() public method

Deprecation: since version 2.3.0
public createCreditCardUrl ( ) : string
return string

createFromTransparentRedirect() public method

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

createNoValidate() public method

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

createSignature() public static method

public static createSignature ( )

credit() public method

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

creditNoValidate() public method

returns a Transaction object on success
public creditNoValidate ( $token, $transactionAttribs ) : Transaction
return Transaction

delete() public method

public delete ( $token )

expired() public method

returns a ResourceCollection of expired credit cards
public expired ( ) : ResourceCollection
return ResourceCollection

expiringBetween() public method

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

fetchExpired() public method

public fetchExpired ( $ids )

fetchExpiring() public method

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

find() public method

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

fromNonce() public method

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

sale() public method

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
return Braintree\Result\Successful | Braintree\Result\Error

saleNoValidate() public method

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

update() public method

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
return Braintree\Result\Successful | Braintree\Result\Error

updateCreditCardUrl() public method

public updateCreditCardUrl ( ) : string
return string

updateFromTransparentRedirect() public method

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

updateNoValidate() public method

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
return CreditCard

updateSignature() public static method

public static updateSignature ( )