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 Order

Class Order

An order transaction.

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

Methods summary

public
# setId( string $id )

Identifier of the order transaction.

Identifier of the order transaction.

Parameters

$id

Returns


$this
public string
# getId( )

Identifier of the order transaction.

Identifier of the order transaction.

Returns

string
public
# setPurchaseUnitReferenceId( string $purchase_unit_reference_id )

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Deprecated

Use #setReferenceId instead

Parameters

$purchase_unit_reference_id

Returns


$this
public string
# getPurchaseUnitReferenceId( )

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Deprecated

Use #getReferenceId instead

Returns

string
public
# setReferenceId( string $reference_id )

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Parameters

$reference_id

Returns


$this
public string
# getReferenceId( )

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.

Returns

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

Amount being collected.

Amount being collected.

Parameters

$amount

Returns


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

Amount being collected.

Amount being collected.

Returns

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

specifies payment mode of the transaction Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]

specifies payment mode of the transaction Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]

Parameters

$payment_mode

Returns


$this
public string
# getPaymentMode( )

specifies payment mode of the transaction

specifies payment mode of the transaction

Returns

string
public
# setState( string $state )

State of the order transaction. Valid Values: ["pending", "completed", "voided", "authorized", "captured"]

State of the order transaction. Valid Values: ["pending", "completed", "voided", "authorized", "captured"]

Parameters

$state

Returns


$this
public string
# getState( )

State of the order transaction.

State of the order transaction.

Returns

string
public
# setReasonCode( string $reason_code )

Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the payment_method is set to paypal. Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]

Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the payment_method is set to paypal. Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]

Parameters

$reason_code

Returns


$this
public string
# getReasonCode( )

Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the payment_method is set to paypal.

Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the payment_method is set to paypal.

Returns

string
public
# setPendingReason( string $pending_reason )

[DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead. Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]

[DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead. Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]

Parameters

$pending_reason

Returns


$this
public string
# getPendingReason( )

Deprecated

[DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.

Returns

string
public
# setProtectionEligibility( string $protection_eligibility )

The level of seller protection in force for the transaction. Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]

The level of seller protection in force for the transaction. Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]

Parameters

$protection_eligibility

Returns


$this
public string
# getProtectionEligibility( )

The level of seller protection in force for the transaction.

The level of seller protection in force for the transaction.

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
# 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
# setFmfDetails( PayPal\Api\FmfDetails $fmf_details )

Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.

Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.

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/pending action.

Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.

Returns

PayPal\Api\FmfDetails
public
# setCreateTime( string $create_time )

Time the resource was created in UTC ISO8601 format.

Time the resource was created in UTC ISO8601 format.

Parameters

$create_time

Returns


$this
public string
# getCreateTime( )

Time the resource was created in UTC ISO8601 format.

Time the resource was created in UTC ISO8601 format.

Returns

string
public
# setUpdateTime( string $update_time )

Time the resource was last updated in UTC ISO8601 format.

Time the resource was last updated in UTC ISO8601 format.

Parameters

$update_time

Returns


$this
public string
# getUpdateTime( )

Time the resource was last updated in UTC ISO8601 format.

Time the resource was last updated in UTC ISO8601 format.

Returns

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

Shows details for an order, by ID.

Shows details for an order, by ID.

Parameters

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

Captures a payment for an order, by ID. To use this call, the original payment call must specify an intent of order. In the JSON request body, include the payment amount and indicate whether this capture is the final capture for the authorization.

Captures a payment for an order, by ID. To use this call, the original payment call must specify an intent of order. In the JSON request body, include the payment amount and indicate whether this capture is the final capture for the authorization.

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\Order
# void( PayPal\Rest\ApiContext $apiContext = null, PayPalRestCall $restCall = null )

Voids, or cancels, an order, by ID. You cannot void an order if a payment has already been partially or fully captured.

Voids, or cancels, an order, by ID. You cannot void an order if a payment has already been partially or fully captured.

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

Authorizes an order, by ID. Include an amount object in the JSON request body.

Authorizes an order, by ID. Include an amount object in the JSON request body.

Parameters

$authorization
Authorization Object with Amount value to be authorized
$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