PHP Class PayPal\Api\Capture

Inheritance: extends Resource
Show file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
get ( string $captureId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Capture Shows details for a captured payment, by ID.
getAmount ( ) : Amount The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
getCreateTime ( ) : string The date and time of capture, as defined in RFC 3339 Section 5.6.
getId ( ) : string The ID of the capture transaction.
getInvoiceNumber ( ) : string The invoice number to track this payment.
getIsFinalCapture ( ) : boolean Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false.
getParentPayment ( ) : string The ID of the payment on which this transaction is based.
getReasonCode ( ) : string The reason code that describes why the transaction state is pending or reversed.
getState ( ) : string The state of the capture.
getTransactionFee ( ) : PayPal\Api\Currency The transaction fee for this payment.
getUpdateTime ( ) : string The date and time when the resource was last updated.
refund ( Refund $refund, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Refund Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
refundCapturedPayment ( RefundRequest $refundRequest, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : DetailedRefund Refunds a captured payment, by ID. Include an amount object in the JSON request body.
setAmount ( Amount $amount ) The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
setCreateTime ( string $create_time ) The date and time of capture, as defined in RFC 3339 Section 5.6.
setId ( string $id ) The ID of the capture transaction.
setInvoiceNumber ( string $invoice_number ) The invoice number to track this payment.
setIsFinalCapture ( boolean $is_final_capture ) Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false.
setParentPayment ( string $parent_payment ) The ID of the payment on which this transaction is based.
setReasonCode ( string $reason_code ) The reason code that describes why the transaction state is pending or reversed.
setState ( string $state ) The state of the capture.
setTransactionFee ( PayPal\Api\Currency $transaction_fee ) The transaction fee for this payment.
setUpdateTime ( string $update_time ) The date and time when the resource was last updated.

Method Details

get() public static method

Shows details for a captured payment, by ID.
public static get ( string $captureId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Capture
$captureId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return Capture

getAmount() public method

The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
public getAmount ( ) : Amount
return Amount

getCreateTime() public method

The date and time of capture, as defined in RFC 3339 Section 5.6.
public getCreateTime ( ) : string
return string

getId() public method

The ID of the capture transaction.
public getId ( ) : string
return string

getInvoiceNumber() public method

The invoice number to track this payment.
public getInvoiceNumber ( ) : string
return string

getIsFinalCapture() public method

Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false.
public getIsFinalCapture ( ) : boolean
return boolean

getParentPayment() public method

The ID of the payment on which this transaction is based.
public getParentPayment ( ) : string
return string

getReasonCode() public method

The reason code that describes why the transaction state is pending or reversed.
public getReasonCode ( ) : string
return string

getState() public method

The state of the capture.
public getState ( ) : string
return string

getTransactionFee() public method

The transaction fee for this payment.
public getTransactionFee ( ) : PayPal\Api\Currency
return PayPal\Api\Currency

getUpdateTime() public method

The date and time when the resource was last updated.
public getUpdateTime ( ) : string
return string

refund() public method

Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
Deprecation: Please use #refundCapturedPayment 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 PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return Refund

refundCapturedPayment() public method

Refunds a captured payment, by ID. Include an amount object in the JSON request body.
public refundCapturedPayment ( 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 PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return DetailedRefund

setAmount() public method

The amount to capture. If the amount matches the orginally authorized amount, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured.
public setAmount ( Amount $amount )
$amount Amount

setCreateTime() public method

The date and time of capture, as defined in RFC 3339 Section 5.6.
public setCreateTime ( string $create_time )
$create_time string

setId() public method

The ID of the capture transaction.
public setId ( string $id )
$id string

setInvoiceNumber() public method

The invoice number to track this payment.
public setInvoiceNumber ( string $invoice_number )
$invoice_number string

setIsFinalCapture() public method

Indicates whether to release all remaining funds that the authorization holds in the funding instrument. Default is false.
public setIsFinalCapture ( boolean $is_final_capture )
$is_final_capture boolean

setParentPayment() public method

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

setReasonCode() public method

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

setState() public method

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

setTransactionFee() public method

The transaction fee for this payment.
public setTransactionFee ( PayPal\Api\Currency $transaction_fee )
$transaction_fee PayPal\Api\Currency

setUpdateTime() public method

The date and time when the resource was last updated.
public setUpdateTime ( string $update_time )
$update_time string