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 Authorization

Class Authorization

An authorization transaction.

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

Methods summary

public
# setId( string $id )

ID of the authorization transaction.

ID of the authorization transaction.

Parameters

$id

Returns


$this
public string
# getId( )

ID of the authorization transaction.

ID of the authorization transaction.

Returns

string
public
# setAmount( PayPal\Api\Amount $amount )

Amount being authorized.

Amount being authorized.

Parameters

$amount

Returns


$this
public PayPal\Api\Amount
# getAmount( )

Amount being authorized.

Amount being authorized.

Returns

PayPal\Api\Amount
public
# setPaymentMode( string $payment_mode )

Specifies the payment mode of the transaction. Valid Values: ["INSTANT_TRANSFER"]

Specifies the payment mode of the transaction. Valid Values: ["INSTANT_TRANSFER"]

Parameters

$payment_mode

Returns


$this
public string
# getPaymentMode( )

Specifies the payment mode of the transaction.

Specifies the payment mode of the transaction.

Returns

string
public
# setState( string $state )

State of the authorization. Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]

State of the authorization. Valid Values: ["pending", "authorized", "partially_captured", "captured", "expired", "voided"]

Parameters

$state

Returns


$this
public string
# getState( )

State of the authorization.

State of the authorization.

Returns

string
public
# setReasonCode( string $reason_code )

Reason code, AUTHORIZATION, for a transaction state of pending. Valid Values: ["AUTHORIZATION"]

Reason code, AUTHORIZATION, for a transaction state of pending. Valid Values: ["AUTHORIZATION"]

Parameters

$reason_code

Returns


$this
public string
# getReasonCode( )

Reason code, AUTHORIZATION, for a transaction state of pending.

Reason code, AUTHORIZATION, for a transaction state of pending.

Returns

string
public
# setPendingReason( string $pending_reason )

[DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead. Valid Values: ["AUTHORIZATION"]

[DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead. Valid Values: ["AUTHORIZATION"]

Parameters

$pending_reason

Returns


$this
public string
# getPendingReason( )

Deprecated

[DEPRECATED] Reason code for the transaction state being Pending.Obsolete. use reason_code field instead.

Returns

string
public
# setProtectionEligibility( string $protection_eligibility )

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal. Allowed values:
ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
PARTIALLY_ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to protection_eligibility_type for specifics.
INELIGIBLE- Merchant is not protected under the Seller Protection Policy. Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal. Allowed values:
ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
PARTIALLY_ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to protection_eligibility_type for specifics.
INELIGIBLE- Merchant is not protected under the Seller Protection Policy. Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]

Parameters

$protection_eligibility

Returns


$this
public string
# getProtectionEligibility( )

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal. Allowed values:
ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
PARTIALLY_ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to protection_eligibility_type for specifics.
INELIGIBLE- Merchant is not protected under the Seller Protection Policy.

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal. Allowed values:
ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received.
PARTIALLY_ELIGIBLE- Merchant is protected by PayPal's Seller Protection Policy for Item Not Received or Unauthorized Payments. Refer to protection_eligibility_type for specifics.
INELIGIBLE- Merchant is not protected under the Seller Protection Policy.

Returns

string
public
# setProtectionEligibilityType( string $protection_eligibility_type )

The kind of seller protection in force for the transaction. This property is returned only when the protection_eligibility property is set to ELIGIBLEor PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal. Allowed values:
ITEM_NOT_RECEIVED_ELIGIBLE- Sellers are protected against claims for items not received.
UNAUTHORIZED_PAYMENT_ELIGIBLE- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]

The kind of seller protection in force for the transaction. This property is returned only when the protection_eligibility property is set to ELIGIBLEor PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal. Allowed values:
ITEM_NOT_RECEIVED_ELIGIBLE- Sellers are protected against claims for items not received.
UNAUTHORIZED_PAYMENT_ELIGIBLE- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned. Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]

Parameters

$protection_eligibility_type

Returns


$this
public string
# getProtectionEligibilityType( )

The kind of seller protection in force for the transaction. This property is returned only when the protection_eligibility property is set to ELIGIBLEor PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal. Allowed values:
ITEM_NOT_RECEIVED_ELIGIBLE- Sellers are protected against claims for items not received.
UNAUTHORIZED_PAYMENT_ELIGIBLE- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned.

The kind of seller protection in force for the transaction. This property is returned only when the protection_eligibility property is set to ELIGIBLEor PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal. Allowed values:
ITEM_NOT_RECEIVED_ELIGIBLE- Sellers are protected against claims for items not received.
UNAUTHORIZED_PAYMENT_ELIGIBLE- Sellers are protected against claims for unauthorized payments.
One or both of the allowed values can be returned.

Returns

string
public
# setFmfDetails( PayPal\Api\FmfDetails $fmf_details )

Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See Fraud Management Filters Summary for more information.

Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See Fraud Management Filters Summary for more information.

Parameters

$fmf_details

Returns


$this
public PayPal\Api\FmfDetails
# getFmfDetails( )

Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See Fraud Management Filters Summary for more information.

Fraud Management Filter (FMF) details applied for the payment that could result in accept, deny, or pending action. Returned in a payment response only if the merchant has enabled FMF in the profile settings and one of the fraud filters was triggered based on those settings. See Fraud Management Filters Summary for more information.

Returns

PayPal\Api\FmfDetails
public
# setParentPayment( string $parent_payment )

ID of the Payment resource that this transaction is based on.

ID of the Payment resource that this transaction is based on.

Parameters

$parent_payment

Returns


$this
public string
# getParentPayment( )

ID of the Payment resource that this transaction is based on.

ID of the Payment resource that this transaction is based on.

Returns

string
public
# setProcessorResponse( PayPal\Api\ProcessorResponse $processor_response )

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.

Parameters

$processor_response

Returns


$this
public PayPal\Api\ProcessorResponse
# getProcessorResponse( )

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.

Returns

PayPal\Api\ProcessorResponse
public
# setValidUntil( string $valid_until )

Authorization expiration time and date as defined in RFC 3339 Section 5.6.

Authorization expiration time and date as defined in RFC 3339 Section 5.6.

Parameters

$valid_until

Returns


$this
public string
# getValidUntil( )

Authorization expiration time and date as defined in RFC 3339 Section 5.6.

Authorization expiration time and date as defined in RFC 3339 Section 5.6.

Returns

string
public
# setCreateTime( string $create_time )

Time of authorization as defined in RFC 3339 Section 5.6.

Time of authorization as defined in RFC 3339 Section 5.6.

Parameters

$create_time

Returns


$this
public string
# getCreateTime( )

Time of authorization as defined in RFC 3339 Section 5.6.

Time of authorization as defined in RFC 3339 Section 5.6.

Returns

string
public
# setUpdateTime( string $update_time )

Time that the resource was last updated.

Time that the resource was last updated.

Parameters

$update_time

Returns


$this
public string
# getUpdateTime( )

Time that the resource was last updated.

Time that the resource was last updated.

Returns

string
public
# setReferenceId( string $reference_id )

Identifier to the purchase or transaction unit corresponding to this authorization transaction.

Identifier to the purchase or transaction unit corresponding to this authorization transaction.

Parameters

$reference_id

Returns


$this
public string
# getReferenceId( )

Identifier to the purchase or transaction unit corresponding to this authorization transaction.

Identifier to the purchase or transaction unit corresponding to this authorization transaction.

Returns

string
public
# setReceiptId( string $receipt_id )

Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.

Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.

Parameters

$receipt_id

Returns


$this
public string
# getReceiptId( )

Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.

Receipt id is 16 digit number payment identification number returned for guest users to identify the payment.

Returns

string
public static PayPal\Api\Authorization
# get( string $authorizationId, PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Shows details for an authorization, by ID.

Shows details for an authorization, by ID.

Parameters

$authorizationId
$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\Authorization
public PayPal\Api\Capture
# capture( PayPal\Api\Capture $capture, PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Captures and processes an authorization, by ID. To use this call, the original payment call must specify an intent of authorize.

Captures and processes an authorization, by ID. To use this call, the original payment call must specify an intent of authorize.

Parameters

$capture
$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\Capture
public PayPal\Api\Authorization
# void( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.

Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.

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\Authorization
public PayPal\Api\Authorization
# reauthorize( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Reauthorizes a PayPal account payment, by authorization ID. To ensure that funds are still available, reauthorize a payment after the initial three-day honor period. Supports only the amount request parameter.

Reauthorizes a PayPal account payment, by authorization ID. To ensure that funds are still available, reauthorize a payment after the initial three-day honor period. Supports only the amount request parameter.

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\Authorization

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