PHP Класс PayPal\Api\Order

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

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

Метод Описание
authorize ( Authorization $authorization, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Authorization Authorizes an order, by ID. Include an amount object in the JSON request body.
capture ( Capture $capture, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Capture 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.
get ( string $orderId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Order Shows details for an order, by ID.
getAmount ( ) : Amount Amount being collected.
getCreateTime ( ) : string Time the resource was created in UTC ISO8601 format.
getFmfDetails ( ) : FmfDetails Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
getId ( ) : string Identifier of the order transaction.
getParentPayment ( ) : string ID of the Payment resource that this transaction is based on.
getPaymentMode ( ) : string specifies payment mode of the transaction
getPendingReason ( ) : string
getProtectionEligibility ( ) : string The level of seller protection in force for the transaction.
getProtectionEligibilityType ( ) : string 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.
getPurchaseUnitReferenceId ( ) : string Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
getReasonCode ( ) : string 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.
getReferenceId ( ) : string Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
getState ( ) : string State of the order transaction.
getUpdateTime ( ) : string Time the resource was last updated in UTC ISO8601 format.
setAmount ( Amount $amount ) Amount being collected.
setCreateTime ( string $create_time ) Time the resource was created in UTC ISO8601 format.
setFmfDetails ( FmfDetails $fmf_details ) Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
setId ( string $id ) Identifier of the order transaction.
setParentPayment ( string $parent_payment ) ID of the Payment resource that this transaction is based on.
setPaymentMode ( string $payment_mode ) specifies payment mode of the transaction Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
setPendingReason ( string $pending_reason ) [DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
setProtectionEligibility ( string $protection_eligibility ) The level of seller protection in force for the transaction.
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.
setPurchaseUnitReferenceId ( string $purchase_unit_reference_id ) Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
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.
setReferenceId ( string $reference_id ) Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
setState ( string $state ) State of the order transaction.
setUpdateTime ( string $update_time ) Time the resource was last updated in UTC ISO8601 format.
void ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Order Voids, or cancels, an order, by ID. You cannot void an order if a payment has already been partially or fully captured.

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

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

Authorizes an order, by ID. Include an amount object in the JSON request body.
public authorize ( Authorization $authorization, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Authorization
$authorization Authorization Authorization Object with Amount value to be authorized
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Authorization

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

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.
public capture ( Capture $capture, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Capture
$capture Capture
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Capture

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

Shows details for an order, by ID.
public static get ( string $orderId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Order
$orderId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Order

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

Amount being collected.
public getAmount ( ) : Amount
Результат Amount

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

Time the resource was created in UTC ISO8601 format.
public getCreateTime ( ) : string
Результат string

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

Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
public getFmfDetails ( ) : FmfDetails
Результат FmfDetails

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

Identifier of the order transaction.
public getId ( ) : string
Результат string

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

ID of the Payment resource that this transaction is based on.
public getParentPayment ( ) : string
Результат string

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

specifies payment mode of the transaction
public getPaymentMode ( ) : string
Результат string

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

Устаревший: [DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
public getPendingReason ( ) : string
Результат string

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

The level of seller protection in force for the transaction.
public getProtectionEligibility ( ) : string
Результат 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.
public getProtectionEligibilityType ( ) : string
Результат string

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

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
Устаревший: Use #getReferenceId instead
public getPurchaseUnitReferenceId ( ) : string
Результат 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.
public getReasonCode ( ) : string
Результат string

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

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
public getReferenceId ( ) : string
Результат string

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

State of the order transaction.
public getState ( ) : string
Результат string

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

Time the resource was last updated in UTC ISO8601 format.
public getUpdateTime ( ) : string
Результат string

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

Amount being collected.
public setAmount ( Amount $amount )
$amount Amount

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

Time the resource was created in UTC ISO8601 format.
public setCreateTime ( string $create_time )
$create_time string

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

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

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

Identifier of the order transaction.
public setId ( string $id )
$id string

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

ID of the Payment resource that this transaction is based on.
public setParentPayment ( string $parent_payment )
$parent_payment string

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

specifies payment mode of the transaction Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
public setPaymentMode ( string $payment_mode )
$payment_mode string

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

Valid Values: ["payer_shipping_unconfirmed", "multi_currency", "risk_review", "regulatory_review", "verification_required", "order", "other"]
public setPendingReason ( string $pending_reason )
$pending_reason string

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

Valid Values: ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "INELIGIBLE"]
public setProtectionEligibility ( string $protection_eligibility )
$protection_eligibility string

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

Valid Values: ["ITEM_NOT_RECEIVED_ELIGIBLE", "UNAUTHORIZED_PAYMENT_ELIGIBLE", "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE"]
public setProtectionEligibilityType ( string $protection_eligibility_type )
$protection_eligibility_type string

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

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
Устаревший: Use #setReferenceId instead
public setPurchaseUnitReferenceId ( string $purchase_unit_reference_id )
$purchase_unit_reference_id string

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

Valid Values: ["PAYER_SHIPPING_UNCONFIRMED", "MULTI_CURRENCY", "RISK_REVIEW", "REGULATORY_REVIEW", "VERIFICATION_REQUIRED", "ORDER", "OTHER"]
public setReasonCode ( string $reason_code )
$reason_code string

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

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
public setReferenceId ( string $reference_id )
$reference_id string

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

Valid Values: ["pending", "completed", "voided", "authorized", "captured"]
public setState ( string $state )
$state string

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

Time the resource was last updated in UTC ISO8601 format.
public setUpdateTime ( string $update_time )
$update_time string

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

Voids, or cancels, an order, by ID. You cannot void an order if a payment has already been partially or fully captured.
public void ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Order
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Order