PHP Класс PayPal\Api\CreditCard

Наследование: extends PayPal\Common\PayPalResourceModel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

all() публичный статический Метод

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
Результат PayPal\Api\CreditCardList

create() публичный Метод

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
Результат CreditCard

delete() публичный Метод

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
Результат boolean

get() публичный статический Метод

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
Результат CreditCard

getBillingAddress() публичный Метод

Billing Address associated with this card.
public getBillingAddress ( ) : Address
Результат Address

getCreateTime() публичный Метод

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time.
public getCreateTime ( ) : string
Результат string

getCvv2() публичный Метод

3-4 digit card validation code.
public getCvv2 ( ) : string
Результат string

getExpireMonth() публичный Метод

Expiration month with no leading zero. Acceptable values are 1 through 12.
public getExpireMonth ( ) : integer
Результат integer

getExpireYear() публичный Метод

4-digit expiration year.
public getExpireYear ( ) : integer
Результат integer

getExternalCardId() публичный Метод

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
Результат string

getExternalCustomerId() публичный Метод

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
Результат string

getFirstName() публичный Метод

Cardholder's first name.
public getFirstName ( ) : string
Результат string

getId() публичный Метод

ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
Устаревший: Not publicly available
public getId ( ) : string
Результат string

getLastName() публичный Метод

Cardholder's last name.
public getLastName ( ) : string
Результат string

getMerchantId() публичный Метод

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
Результат string

getNumber() публичный Метод

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
Результат string

getPayerId() публичный Метод

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.
Устаревший: This is being deprecated in favor of the `external_customer_id` property.
public getPayerId ( ) : string
Результат string

getState() публичный Метод

State of the credit card funding instrument.
public getState ( ) : string
Результат string

getType() публичный Метод

Credit card type. Valid types are: visa, mastercard, discover, amex
public getType ( ) : string
Результат string

getUpdateTime() публичный Метод

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates the updation time.
public getUpdateTime ( ) : string
Результат string

getValidUntil() публичный Метод

Funding instrument expiration date.
public getValidUntil ( ) : string
Результат string

setBillingAddress() публичный Метод

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

setCreateTime() публичный Метод

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

setCvv2() публичный Метод

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

setExpireMonth() публичный Метод

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

setExpireYear() публичный Метод

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

setExternalCardId() публичный Метод

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() публичный Метод

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() публичный Метод

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

setId() публичный Метод

ID of the credit card. This ID is provided in the response when storing credit cards. **Required if using a stored credit card.**
Устаревший: Not publicly available
public setId ( string $id )
$id string

setLastName() публичный Метод

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

setMerchantId() публичный Метод

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() публичный Метод

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() публичный Метод

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.
Устаревший: This is being deprecated in favor of the `external_customer_id` property.
public setPayerId ( string $payer_id )
$payer_id string

setState() публичный Метод

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

setType() публичный Метод

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

setUpdateTime() публичный Метод

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() публичный Метод

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

update() публичный Метод

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
Результат CreditCard