PHP Класс PayPal\Api\Sale

Наследование: extends PayPal\Common\PPModel, implements PayPal\Rest\IResource
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

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

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

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

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
Результат Sale

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

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

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

ID of the billing agreement used as reference to execute this transaction.
public getBillingAgreementId ( ) : string
Результат string

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

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
Результат string

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

Time of sale as defined in RFC 3339 Section 5.6
public getCreateTime ( ) : string
Результат string

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

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
Результат string

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.
public getFmfDetails ( ) : FmfDetails
Результат FmfDetails

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

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

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

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

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

Reasons for PayPal holding recipient fund. It is set only if payment hold status is held
public getPaymentHoldReasons ( ) : string[]
Результат string[]

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

Status of the Recipient Fund. For now, it will be returned only when fund status is held
public getPaymentHoldStatus ( ) : string
Результат string

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

Specifies payment mode of the transaction. Only supported when the payment_method is set to paypal.
public getPaymentMode ( ) : string
Результат string

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

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
Результат PayPal\Api\ProcessorResponse

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

The level of seller protection in force for the transaction. Only supported when the payment_method is set to paypal.
public getProtectionEligibility ( ) : string
Результат string

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

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
Результат string

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

Identifier to the purchase or transaction unit corresponding to this sale transaction.
public getPurchaseUnitReferenceId ( ) : string
Результат string

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

Reason code for the transaction state being Pending or Reversed. Only supported when the payment_method is set to paypal.
public getReasonCode ( ) : string
Результат string

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

Receipt id is a payment identification number returned for guest users to identify the payment.
public getReceiptId ( ) : string
Результат string

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

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
Результат PayPal\Api\Currency

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

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

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

Transaction fee applicable for this payment.
public getTransactionFee ( ) : PayPal\Api\Currency
Результат PayPal\Api\Currency

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

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

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.
Устаревший: 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
Результат Refund

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

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
Результат DetailedRefund

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

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

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

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

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

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

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

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() публичный Метод

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

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

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() публичный Метод

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() публичный Метод

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

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

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

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

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() публичный Метод

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() публичный Метод

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

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

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() публичный Метод

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

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

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() публичный Метод

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

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

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() публичный Метод

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

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

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

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

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