Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • Address
  • Agreement
  • AgreementDetails
  • AgreementStateDescriptor
  • AgreementTransaction
  • AgreementTransactions
  • AlternatePayment
  • Amount
  • Authorization
  • BankAccount
  • BankAccountsList
  • BankToken
  • BaseAddress
  • Billing
  • BillingAgreementToken
  • BillingInfo
  • CancelNotification
  • Capture
  • CarrierAccount
  • CarrierAccountToken
  • CartBase
  • ChargeModel
  • Cost
  • CountryCode
  • CreateProfileResponse
  • Credit
  • CreditCard
  • CreditCardHistory
  • CreditCardList
  • CreditCardToken
  • CreditFinancingOffered
  • Currency
  • CurrencyConversion
  • CustomAmount
  • DetailedRefund
  • Details
  • Error
  • ErrorDetails
  • ExtendedBankAccount
  • ExternalFunding
  • FileAttachment
  • FlowConfig
  • FmfDetails
  • FundingDetail
  • FundingInstrument
  • FundingOption
  • FundingSource
  • FuturePayment
  • HyperSchema
  • Image
  • Incentive
  • InputFields
  • InstallmentInfo
  • InstallmentOption
  • Invoice
  • InvoiceAddress
  • InvoiceItem
  • InvoiceNumber
  • InvoiceSearchResponse
  • Item
  • ItemList
  • Links
  • Measurement
  • MerchantInfo
  • MerchantPreferences
  • Metadata
  • NameValuePair
  • Notification
  • OpenIdAddress
  • OpenIdError
  • OpenIdSession
  • OpenIdTokeninfo
  • OpenIdUserinfo
  • Order
  • OverrideChargeModel
  • Participant
  • Patch
  • PatchRequest
  • Payee
  • Payer
  • PayerInfo
  • Payment
  • PaymentCard
  • PaymentCardToken
  • PaymentDefinition
  • PaymentDetail
  • PaymentExecution
  • PaymentHistory
  • PaymentInstruction
  • PaymentOptions
  • PaymentSummary
  • PaymentTerm
  • Payout
  • PayoutBatch
  • PayoutBatchHeader
  • PayoutItem
  • PayoutItemDetails
  • PayoutSenderBatchHeader
  • Phone
  • Plan
  • PlanList
  • PotentialPayerInfo
  • Presentation
  • PrivateLabelCard
  • ProcessorResponse
  • RecipientBankingInstruction
  • RedirectUrls
  • Refund
  • RefundDetail
  • RefundRequest
  • RelatedResources
  • Sale
  • Search
  • ShippingAddress
  • ShippingCost
  • ShippingInfo
  • Tax
  • Template
  • TemplateData
  • Templates
  • TemplateSettings
  • TemplateSettingsMetadata
  • Terms
  • Transaction
  • TransactionBase
  • Transactions
  • VerifyWebhookSignature
  • VerifyWebhookSignatureResponse
  • Webhook
  • WebhookEvent
  • WebhookEventList
  • WebhookEventType
  • WebhookEventTypeList
  • WebhookList
  • WebProfile

Class CreditCard

Class CreditCard

PayPal\Common\PayPalModel
Extended by PayPal\Common\PayPalResourceModel implements PayPal\Rest\IResource
Extended by PayPal\Api\CreditCard
Namespace: PayPal\Api
Package: PayPal\Api
Located at PayPal/Api/CreditCard.php

Methods summary

public
# 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.

ID of the credit card. This ID is provided in the response when storing credit cards. Required if using a stored credit card.

Deprecated

Not publicly available

Parameters

$id

Returns


$this
public 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.

ID of the credit card. This ID is provided in the response when storing credit cards. Required if using a stored credit card.

Deprecated

Not publicly available

Returns

string
public
# 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.

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.

Parameters

$number

Returns


$this
public 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.

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.

Returns

string
public
# setType( string $type )

Credit card type. Valid types are: visa, mastercard, discover, amex

Credit card type. Valid types are: visa, mastercard, discover, amex

Parameters

$type

Returns


$this
public string
# getType( )

Credit card type. Valid types are: visa, mastercard, discover, amex

Credit card type. Valid types are: visa, mastercard, discover, amex

Returns

string
public
# setExpireMonth( integer $expire_month )

Expiration month with no leading zero. Acceptable values are 1 through 12.

Expiration month with no leading zero. Acceptable values are 1 through 12.

Parameters

$expire_month

Returns


$this
public integer
# getExpireMonth( )

Expiration month with no leading zero. Acceptable values are 1 through 12.

Expiration month with no leading zero. Acceptable values are 1 through 12.

Returns

integer
public
# setExpireYear( integer $expire_year )

4-digit expiration year.

4-digit expiration year.

Parameters

$expire_year

Returns


$this
public integer
# getExpireYear( )

4-digit expiration year.

4-digit expiration year.

Returns

integer
public
# setCvv2( string $cvv2 )

3-4 digit card validation code.

3-4 digit card validation code.

Parameters

$cvv2

Returns


$this
public string
# getCvv2( )

3-4 digit card validation code.

3-4 digit card validation code.

Returns

string
public
# setFirstName( string $first_name )

Cardholder's first name.

Cardholder's first name.

Parameters

$first_name

Returns


$this
public string
# getFirstName( )

Cardholder's first name.

Cardholder's first name.

Returns

string
public
# setLastName( string $last_name )

Cardholder's last name.

Cardholder's last name.

Parameters

$last_name

Returns


$this
public string
# getLastName( )

Cardholder's last name.

Cardholder's last name.

Returns

string
public
# setBillingAddress( PayPal\Api\Address $billing_address )

Billing Address associated with this card.

Billing Address associated with this card.

Parameters

$billing_address

Returns


$this
public PayPal\Api\Address
# getBillingAddress( )

Billing Address associated with this card.

Billing Address associated with this card.

Returns

PayPal\Api\Address
public
# 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.

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.

Parameters

$external_customer_id

Returns


$this
public 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.

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.

Returns

string
public
# 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

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

Parameters

$merchant_id

Returns


$this
public 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

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

Returns

string
public
# 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.

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.

Deprecated

This is being deprecated in favor of the external_customer_id property.

Parameters

$payer_id

Returns


$this
public 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.

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.

Deprecated

This is being deprecated in favor of the external_customer_id property.

Returns

string
public
# 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.

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.

Parameters

$external_card_id

Returns


$this
public string
# 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.

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.

Returns

string
public
# setState( string $state )

State of the credit card funding instrument. Valid Values: ["expired", "ok"]

State of the credit card funding instrument. Valid Values: ["expired", "ok"]

Parameters

$state

Returns


$this
public string
# getState( )

State of the credit card funding instrument.

State of the credit card funding instrument.

Returns

string
public
# setCreateTime( string $create_time )

Funding instrument expiration date.

Funding instrument expiration date.

Parameters

$create_time

Returns


$this
public string
# getCreateTime( )

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time.

Resource creation time as ISO8601 date-time format (ex: 1994-11-05T13:15:30Z) that indicates creation time.

Returns

string
public
# setUpdateTime( string $update_time )

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

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

Parameters

$update_time

Returns


$this
public string
# getUpdateTime( )

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

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

Returns

string
public
# setValidUntil( string $valid_until )

Date/Time until this resource can be used fund a payment.

Date/Time until this resource can be used fund a payment.

Parameters

$valid_until

Returns


$this
public string
# getValidUntil( )

Funding instrument expiration date.

Funding instrument expiration date.

Returns

string
public PayPal\Api\CreditCard
# create( PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Creates a new Credit Card Resource (aka Tokenize).

Creates a new Credit Card Resource (aka Tokenize).

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\CreditCard
public static PayPal\Api\CreditCard
# get( string $creditCardId, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Obtain the Credit Card resource for the given identifier.

Obtain the Credit Card resource for the given identifier.

Parameters

$creditCardId
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\CreditCard
public boolean
# delete( PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Delete the Credit Card resource for the given identifier.

Delete the Credit Card resource for the given identifier.

Parameters

$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

boolean
public PayPal\Api\CreditCard
# update( PayPal\Api\PatchRequest $patchRequest, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Update information in a previously saved card. Only the modified fields need to be passed in the request.

Update information in a previously saved card. Only the modified fields need to be passed in the request.

Parameters

$patchRequest
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\CreditCard
public static PayPal\Api\CreditCardList
# all( array $params, PayPal\Rest\ApiContext $apiContext = null, PayPal\Transport\PayPalRestCall $restCall = null )

Retrieves a list of Credit Card resources.

Retrieves a list of Credit Card resources.

Parameters

$params
$apiContext
is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall
is the Rest Call Service that is used to make rest calls

Returns

PayPal\Api\CreditCardList

Methods inherited from PayPal\Common\PayPalResourceModel

addLink(), executeCall(), getLink(), getLinks(), removeLink(), setLinks(), updateAccessToken()

Methods inherited from PayPal\Common\PayPalModel

__construct(), __get(), __isset(), __set(), __toString(), __unset(), fromArray(), fromJson(), getList(), setCredential(), toArray(), toJSON()

Properties summary

Properties inherited from PayPal\Common\PayPalModel

$credential

API documentation generated by ApiGen