PHP Class PayPal\Api\Sale

Inheritance: extends PayPal\Common\PPModel, implements PayPal\Rest\IResource
Afficher le fichier Open project: paypal/rest-api-sdk-php Class Usage Examples

Méthodes publiques

Méthode Description
addPaymentHoldReason ( string $string ) Append PaymentHoldReasons to the list.
get ( string $saleId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Sale Shows details for a sale, by ID. Returns only sales that were created through the REST API.
getAmount ( ) : Amount Amount being collected.
getBillingAgreementId ( ) : string ID of the billing agreement used as reference to execute this transaction.
getClearingTime ( ) : string Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the payment_method is set to paypal.
getCreateTime ( ) : string Time of sale as defined in RFC 3339 Section 5.6
getExchangeRate ( ) : string Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
getFmfDetails ( ) : FmfDetails 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.
getId ( ) : string Identifier of the sale transaction.
getParentPayment ( ) : string ID of the payment resource on which this transaction is based.
getPaymentHoldReasons ( ) : string[] Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
getPaymentHoldStatus ( ) : string Status of the Recipient Fund. For now, it will be returned only when fund status is held
getPaymentMode ( ) : string Specifies payment mode of the transaction. Only supported when the payment_method is set to paypal.
getProcessorResponse ( ) : PayPal\Api\ProcessorResponse Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.
getProtectionEligibility ( ) : string The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal.
getProtectionEligibilityType ( ) : string The kind of seller protection in force for the transaction. It is returned only when protection_eligibility is ELIGIBLE or PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal.
getPurchaseUnitReferenceId ( ) : string Identifier to the purchase or transaction unit corresponding to this sale transaction.
getReasonCode ( ) : string Reason code for the transaction state being Pending or Reversed. Only supported when the payment_method is set to paypal.
getReceiptId ( ) : string Receipt id is a payment identification number returned for guest users to identify the payment.
getReceivableAmount ( ) : PayPal\Api\Currency Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
getState ( ) : string State of the sale transaction.
getTransactionFee ( ) : PayPal\Api\Currency Transaction fee applicable for this payment.
getUpdateTime ( ) : string Time the resource was last updated in UTC ISO8601 format.
refund ( Refund $refund, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Refund Refund a completed payment by passing the sale_id in the request URI. In addition, include an empty JSON payload in the request body for a full refund. For a partial refund, include an amount object in the request body.
refundSale ( RefundRequest $refundRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : DetailedRefund Refunds a sale, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
removePaymentHoldReason ( string $string ) Remove PaymentHoldReasons from the list.
setAmount ( Amount $amount ) Amount being collected.
setBillingAgreementId ( string $billing_agreement_id ) ID of the billing agreement used as reference to execute this transaction.
setClearingTime ( string $clearing_time ) Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the payment_method is set to paypal.
setCreateTime ( string $create_time ) Time of sale as defined in RFC 3339 Section 5.6
setExchangeRate ( string $exchange_rate ) Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
setFmfDetails ( 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.
setId ( string $id ) Identifier of the sale transaction.
setParentPayment ( string $parent_payment ) ID of the payment resource on which this transaction is based.
setPaymentHoldReasons ( string[] $payment_hold_reasons ) Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
setPaymentHoldStatus ( string $payment_hold_status ) Status of the Recipient Fund. For now, it will be returned only when fund status is held Valid Values: ["HELD"]
setPaymentMode ( string $payment_mode ) Specifies payment mode of the transaction. Only supported when the payment_method is set to paypal.
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.
setProtectionEligibility ( string $protection_eligibility ) The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal.
setProtectionEligibilityType ( string $protection_eligibility_type ) The kind of seller protection in force for the transaction. It is returned only when protection_eligibility is ELIGIBLE or PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal.
setPurchaseUnitReferenceId ( string $purchase_unit_reference_id ) Identifier to the purchase or transaction unit corresponding to this sale transaction.
setReasonCode ( string $reason_code ) Reason code for the transaction state being Pending or Reversed. Only supported when the payment_method is set to paypal.
setReceiptId ( string $receipt_id ) Receipt id is a payment identification number returned for guest users to identify the payment.
setReceivableAmount ( PayPal\Api\Currency $receivable_amount ) Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
setState ( string $state ) State of the sale transaction.
setTransactionFee ( PayPal\Api\Currency $transaction_fee ) Transaction fee applicable for this payment.
setUpdateTime ( string $update_time ) Time the resource was last updated in UTC ISO8601 format.

Method Details

addPaymentHoldReason() public méthode

Append PaymentHoldReasons to the list.
public addPaymentHoldReason ( string $string )
$string string

get() public static méthode

Shows details for a sale, by ID. Returns only sales that were created through the REST API.
public static get ( string $saleId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Sale
$saleId 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 Sale

getAmount() public méthode

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

getBillingAgreementId() public méthode

ID of the billing agreement used as reference to execute this transaction.
public getBillingAgreementId ( ) : string
Résultat string

getClearingTime() public méthode

Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the payment_method is set to paypal.
public getClearingTime ( ) : string
Résultat string

getCreateTime() public méthode

Time of sale as defined in RFC 3339 Section 5.6
public getCreateTime ( ) : string
Résultat string

getExchangeRate() public méthode

Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
public getExchangeRate ( ) : string
Résultat string

getFmfDetails() public méthode

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.
public getFmfDetails ( ) : FmfDetails
Résultat FmfDetails

getId() public méthode

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

getParentPayment() public méthode

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

getPaymentHoldReasons() public méthode

Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
public getPaymentHoldReasons ( ) : string[]
Résultat string[]

getPaymentHoldStatus() public méthode

Status of the Recipient Fund. For now, it will be returned only when fund status is held
public getPaymentHoldStatus ( ) : string
Résultat string

getPaymentMode() public méthode

Specifies payment mode of the transaction. Only supported when the payment_method is set to paypal.
public getPaymentMode ( ) : string
Résultat string

getProcessorResponse() public méthode

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.
public getProcessorResponse ( ) : PayPal\Api\ProcessorResponse
Résultat PayPal\Api\ProcessorResponse

getProtectionEligibility() public méthode

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal.
public getProtectionEligibility ( ) : string
Résultat string

getProtectionEligibilityType() public méthode

The kind of seller protection in force for the transaction. It is returned only when protection_eligibility is ELIGIBLE or PARTIALLY_ELIGIBLE. Only supported when the payment_method is set to paypal.
public getProtectionEligibilityType ( ) : string
Résultat string

getPurchaseUnitReferenceId() public méthode

Identifier to the purchase or transaction unit corresponding to this sale transaction.
public getPurchaseUnitReferenceId ( ) : string
Résultat string

getReasonCode() public méthode

Reason code for the transaction state being Pending or Reversed. Only supported when the payment_method is set to paypal.
public getReasonCode ( ) : string
Résultat string

getReceiptId() public méthode

Receipt id is a payment identification number returned for guest users to identify the payment.
public getReceiptId ( ) : string
Résultat string

getReceivableAmount() public méthode

Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
public getReceivableAmount ( ) : PayPal\Api\Currency
Résultat PayPal\Api\Currency

getState() public méthode

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

getTransactionFee() public méthode

Transaction fee applicable for this payment.
public getTransactionFee ( ) : PayPal\Api\Currency
Résultat PayPal\Api\Currency

getUpdateTime() public méthode

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

refund() public méthode

Refund a completed payment by passing the sale_id in the request URI. In addition, include an empty JSON payload in the request body for a full refund. For a partial refund, include an amount object in the request body.
Deprecation: Please use #refundSale instead.
public refund ( Refund $refund, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Refund
$refund Refund
$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 Refund

refundSale() public méthode

Refunds a sale, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
public refundSale ( RefundRequest $refundRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : DetailedRefund
$refundRequest RefundRequest
$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 DetailedRefund

removePaymentHoldReason() public méthode

Remove PaymentHoldReasons from the list.
public removePaymentHoldReason ( string $string )
$string string

setAmount() public méthode

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

setBillingAgreementId() public méthode

ID of the billing agreement used as reference to execute this transaction.
public setBillingAgreementId ( string $billing_agreement_id )
$billing_agreement_id string

setClearingTime() public méthode

Expected clearing time for eCheck Transactions. Returned when payment is made with eCheck. Only supported when the payment_method is set to paypal.
public setClearingTime ( string $clearing_time )
$clearing_time string

setCreateTime() public méthode

Time of sale as defined in RFC 3339 Section 5.6
public setCreateTime ( string $create_time )
$create_time string

setExchangeRate() public méthode

Exchange rate applied for this transaction. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
public setExchangeRate ( string $exchange_rate )
$exchange_rate string

setFmfDetails() public méthode

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.
public setFmfDetails ( FmfDetails $fmf_details )
$fmf_details FmfDetails

setId() public méthode

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

setParentPayment() public méthode

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

setPaymentHoldReasons() public méthode

Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
public setPaymentHoldReasons ( string[] $payment_hold_reasons )
$payment_hold_reasons string[]

setPaymentHoldStatus() public méthode

Status of the Recipient Fund. For now, it will be returned only when fund status is held Valid Values: ["HELD"]
public setPaymentHoldStatus ( string $payment_hold_status )
$payment_hold_status string

setPaymentMode() public méthode

Valid Values: ["INSTANT_TRANSFER", "MANUAL_BANK_TRANSFER", "DELAYED_TRANSFER", "ECHECK"]
public setPaymentMode ( string $payment_mode )
$payment_mode string

setProcessorResponse() public méthode

Response codes returned by the processor concerning the submitted payment. Only supported when the payment_method is set to credit_card.
public setProcessorResponse ( PayPal\Api\ProcessorResponse $processor_response )
$processor_response PayPal\Api\ProcessorResponse

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 or transaction unit corresponding to this sale transaction.
public setPurchaseUnitReferenceId ( string $purchase_unit_reference_id )
$purchase_unit_reference_id string

setReasonCode() public méthode

Valid Values: ["CHARGEBACK", "GUARANTEE", "BUYER_COMPLAINT", "REFUND", "UNCONFIRMED_SHIPPING_ADDRESS", "ECHECK", "INTERNATIONAL_WITHDRAWAL", "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", "PAYMENT_REVIEW", "REGULATORY_REVIEW", "UNILATERAL", "VERIFICATION_REQUIRED", "TRANSACTION_APPROVED_AWAITING_FUNDING"]
public setReasonCode ( string $reason_code )
$reason_code string

setReceiptId() public méthode

Receipt id is a payment identification number returned for guest users to identify the payment.
public setReceiptId ( string $receipt_id )
$receipt_id string

setReceivableAmount() public méthode

Net amount the merchant receives for this transaction in their receivable currency. Returned only in cross-currency use cases where a merchant bills a buyer in a non-primary currency for that buyer.
public setReceivableAmount ( PayPal\Api\Currency $receivable_amount )
$receivable_amount PayPal\Api\Currency

setState() public méthode

Valid Values: ["completed", "partially_refunded", "pending", "refunded", "denied"]
public setState ( string $state )
$state string

setTransactionFee() public méthode

Transaction fee applicable for this payment.
public setTransactionFee ( PayPal\Api\Currency $transaction_fee )
$transaction_fee PayPal\Api\Currency

setUpdateTime() public méthode

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