PHP Class PayPal\Api\Order

An order transaction.
Inheritance: extends PayPal\Common\PayPalResourceModel
Afficher le fichier Open project: paypal/rest-api-sdk-php Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

authorize() public méthode

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
Résultat Authorization

capture() public méthode

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
Résultat Capture

get() public static méthode

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
Résultat Order

getAmount() public méthode

Amount being collected.
public getAmount ( ) : Amount
Résultat Amount

getCreateTime() public méthode

Time the resource was created in UTC ISO8601 format.
public getCreateTime ( ) : string
Résultat string

getFmfDetails() public méthode

Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
public getFmfDetails ( ) : FmfDetails
Résultat FmfDetails

getId() public méthode

Identifier of the order transaction.
public getId ( ) : string
Résultat string

getParentPayment() public méthode

ID of the Payment resource that this transaction is based on.
public getParentPayment ( ) : string
Résultat string

getPaymentMode() public méthode

specifies payment mode of the transaction
public getPaymentMode ( ) : string
Résultat string

getPendingReason() public méthode

Deprecation: [DEPRECATED] Reason code for the transaction state being Pending. Obsolete. Retained for backward compatability. Use reason_code field above instead.
public getPendingReason ( ) : string
Résultat string

getProtectionEligibility() public méthode

The level of seller protection in force for the transaction.
public getProtectionEligibility ( ) : string
Résultat string

getProtectionEligibilityType() public méthode

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
Résultat string

getPurchaseUnitReferenceId() public méthode

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
Deprecation: Use #getReferenceId instead
public getPurchaseUnitReferenceId ( ) : string
Résultat string

getReasonCode() public méthode

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
Résultat string

getReferenceId() public méthode

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
public getReferenceId ( ) : string
Résultat string

getState() public méthode

State of the order transaction.
public getState ( ) : string
Résultat string

getUpdateTime() public méthode

Time the resource was last updated in UTC ISO8601 format.
public getUpdateTime ( ) : string
Résultat string

setAmount() public méthode

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

setCreateTime() public méthode

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

setFmfDetails() public méthode

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() public méthode

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

setParentPayment() public méthode

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

setPaymentMode() public méthode

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() public méthode

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

setProtectionEligibility() public méthode

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

setProtectionEligibilityType() public méthode

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() public méthode

Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
Deprecation: Use #setReferenceId instead
public setPurchaseUnitReferenceId ( string $purchase_unit_reference_id )
$purchase_unit_reference_id string

setReasonCode() public méthode

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

setReferenceId() public méthode

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

setState() public méthode

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

setUpdateTime() public méthode

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

void() public méthode

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
Résultat Order