PHP Class PayPal\Api\CreditCard

Inheritance: extends PayPal\Common\PayPalResourceModel
Afficher le fichier Open project: paypal/rest-api-sdk-php Class Usage Examples

Méthodes publiques

Méthode Description
all ( array $params, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayPal\Api\CreditCardList Retrieves a list of Credit Card resources.
create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard Creates a new Credit Card Resource (aka Tokenize).
delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean Delete the Credit Card resource for the given identifier.
get ( string $creditCardId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard Obtain the Credit Card resource for the given identifier.
getBillingAddress ( ) : Address Billing Address associated with this card.
getCreateTime ( ) : string Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time.
getCvv2 ( ) : string 3-4 digit card validation code.
getExpireMonth ( ) : integer Expiration month with no leading zero. Acceptable values are 1 through 12.
getExpireYear ( ) : integer 4-digit expiration year.
getExternalCardId ( ) : string A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
getExternalCustomerId ( ) : string A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of payer_id when creating or using a stored funding instrument in the vault.**
getFirstName ( ) : string Cardholder's first name.
getId ( ) : string ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
getLastName ( ) : string Cardholder's last name.
getMerchantId ( ) : string A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id
getNumber ( ) : string Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.*
getPayerId ( ) : string A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.
getState ( ) : string State of the credit card funding instrument.
getType ( ) : string Credit card type. Valid types are: visa, mastercard, discover, amex
getUpdateTime ( ) : string Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time.
getValidUntil ( ) : string Funding instrument expiration date.
setBillingAddress ( Address $billing_address ) Billing Address associated with this card.
setCreateTime ( string $create_time ) Funding instrument expiration date.
setCvv2 ( string $cvv2 ) 3-4 digit card validation code.
setExpireMonth ( integer $expire_month ) Expiration month with no leading zero. Acceptable values are 1 through 12.
setExpireYear ( integer $expire_year ) 4-digit expiration year.
setExternalCardId ( string $external_card_id ) A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
setExternalCustomerId ( string $external_customer_id ) A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of payer_id when creating or using a stored funding instrument in the vault.**
setFirstName ( string $first_name ) Cardholder's first name.
setId ( string $id ) ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
setLastName ( string $last_name ) Cardholder's last name.
setMerchantId ( string $merchant_id ) A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id
setNumber ( string $number ) Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.*
setPayerId ( string $payer_id ) A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.
setState ( string $state ) State of the credit card funding instrument.
setType ( string $type ) Credit card type. Valid types are: visa, mastercard, discover, amex
setUpdateTime ( string $update_time ) Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time.
setValidUntil ( string $valid_until ) Date/Time until this resource can be used fund a payment.
update ( PatchRequest $patchRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard Update information in a previously saved card. Only the modified fields need to be passed in the request.

Method Details

all() public static méthode

Retrieves a list of Credit Card resources.
public static all ( array $params, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayPal\Api\CreditCardList
$params array
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Résultat PayPal\Api\CreditCardList

create() public méthode

Creates a new Credit Card Resource (aka Tokenize).
public create ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Résultat CreditCard

delete() public méthode

Delete the Credit Card resource for the given identifier.
public delete ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Résultat boolean

get() public static méthode

Obtain the Credit Card resource for the given identifier.
public static get ( string $creditCardId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard
$creditCardId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Résultat CreditCard

getBillingAddress() public méthode

Billing Address associated with this card.
public getBillingAddress ( ) : Address
Résultat Address

getCreateTime() public méthode

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time.
public getCreateTime ( ) : string
Résultat string

getCvv2() public méthode

3-4 digit card validation code.
public getCvv2 ( ) : string
Résultat string

getExpireMonth() public méthode

Expiration month with no leading zero. Acceptable values are 1 through 12.
public getExpireMonth ( ) : integer
Résultat integer

getExpireYear() public méthode

4-digit expiration year.
public getExpireYear ( ) : integer
Résultat integer

getExternalCardId() public méthode

A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
public getExternalCardId ( ) : string
Résultat string

getExternalCustomerId() public méthode

A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of payer_id when creating or using a stored funding instrument in the vault.**
public getExternalCustomerId ( ) : string
Résultat string

getFirstName() public méthode

Cardholder's first name.
public getFirstName ( ) : string
Résultat string

getId() public méthode

ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
Deprecation: Not publicly available
public getId ( ) : string
Résultat string

getLastName() public méthode

Cardholder's last name.
public getLastName ( ) : string
Résultat string

getMerchantId() public méthode

A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id
public getMerchantId ( ) : string
Résultat string

getNumber() public méthode

Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.*
public getNumber ( ) : string
Résultat string

getPayerId() public méthode

A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.
Deprecation: This is being deprecated in favor of the `external_customer_id` property.
public getPayerId ( ) : string
Résultat string

getState() public méthode

State of the credit card funding instrument.
public getState ( ) : string
Résultat string

getType() public méthode

Credit card type. Valid types are: visa, mastercard, discover, amex
public getType ( ) : string
Résultat string

getUpdateTime() public méthode

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time.
public getUpdateTime ( ) : string
Résultat string

getValidUntil() public méthode

Funding instrument expiration date.
public getValidUntil ( ) : string
Résultat string

setBillingAddress() public méthode

Billing Address associated with this card.
public setBillingAddress ( Address $billing_address )
$billing_address Address

setCreateTime() public méthode

Funding instrument expiration date.
public setCreateTime ( string $create_time )
$create_time string

setCvv2() public méthode

3-4 digit card validation code.
public setCvv2 ( string $cvv2 )
$cvv2 string

setExpireMonth() public méthode

Expiration month with no leading zero. Acceptable values are 1 through 12.
public setExpireMonth ( integer $expire_month )
$expire_month integer

setExpireYear() public méthode

4-digit expiration year.
public setExpireYear ( integer $expire_year )
$expire_year integer

setExternalCardId() public méthode

A unique identifier of the bank account resource. Generated and provided by the facilitator so it can be used to restrict the usage of the bank account to the specific merchant.
public setExternalCardId ( string $external_card_id )
$external_card_id string

setExternalCustomerId() public méthode

A unique identifier of the customer to whom this bank account belongs. Generated and provided by the facilitator. **This is now used in favor of payer_id when creating or using a stored funding instrument in the vault.**
public setExternalCustomerId ( string $external_customer_id )
$external_customer_id string

setFirstName() public méthode

Cardholder's first name.
public setFirstName ( string $first_name )
$first_name string

setId() public méthode

ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
Deprecation: Not publicly available
public setId ( string $id )
$id string

setLastName() public méthode

Cardholder's last name.
public setLastName ( string $last_name )
$last_name string

setMerchantId() public méthode

A user provided, optional convenvience field that functions as a unique identifier for the merchant on behalf of whom this credit card is being stored for. Note that this has no relation to PayPal merchant id
public setMerchantId ( string $merchant_id )
$merchant_id string

setNumber() public méthode

Credit card number. Numeric characters only with no spaces or punctuation. The string must conform with modulo and length required by each credit card type. *Redacted in responses.*
public setNumber ( string $number )
$number string

setPayerId() public méthode

A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.
Deprecation: This is being deprecated in favor of the `external_customer_id` property.
public setPayerId ( string $payer_id )
$payer_id string

setState() public méthode

Valid Values: ["expired", "ok"]
public setState ( string $state )
$state string

setType() public méthode

Credit card type. Valid types are: visa, mastercard, discover, amex
public setType ( string $type )
$type string

setUpdateTime() public méthode

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time.
public setUpdateTime ( string $update_time )
$update_time string

setValidUntil() public méthode

Date/Time until this resource can be used fund a payment.
public setValidUntil ( string $valid_until )
$valid_until string

update() public méthode

Update information in a previously saved card. Only the modified fields need to be passed in the request.
public update ( PatchRequest $patchRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : CreditCard
$patchRequest PatchRequest
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Résultat CreditCard