PHP Class PayPal\Api\PayoutItem

A sender-created definition of a payout to a single recipient.
Inheritance: extends PayPal\Common\PayPalResourceModel
Mostra file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
cancel ( string $payoutItemId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayoutItemDetails Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.
get ( string $payoutItemId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayoutItemDetails Obtain the status of a payout item by passing the item ID to the request URI.
getAmount ( ) : PayPal\Api\Currency The amount of money to pay the receiver.
getNote ( ) : string Optional. A sender-specified note for notifications. Value is any string value.
getReceiver ( ) : string The receiver of the payment. Corresponds to the recipient_type value in the request.
getRecipientType ( ) : string The type of ID that identifies the payment receiver. Value is:
    EMAIL. Unencrypted email. Value is a string of up to 127 single-byte characters.
  • PHONE. Unencrypted phone number.
    Note: The PayPal sandbox does not support the PHONE recipient type.
  • PAYPAL_ID. Encrypted PayPal account number.
If the sender_batch_header includes the recipient_type attribute, any payout item without its own recipient_type attribute uses the recipient_type value from sender_batch_header. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.
getSenderItemId ( ) : string A sender-specified ID number. Tracks the batch payout in an accounting system.
setAmount ( PayPal\Api\Currency $amount ) The amount of money to pay the receiver.
setNote ( string $note ) Optional. A sender-specified note for notifications. Value is any string value.
setReceiver ( string $receiver ) The receiver of the payment. Corresponds to the recipient_type value in the request.
setRecipientType ( string $recipient_type ) The type of ID that identifies the payment receiver. Value is:
    EMAIL. Unencrypted email. Value is a string of up to 127 single-byte characters.
  • PHONE. Unencrypted phone number.
    Note: The PayPal sandbox does not support the PHONE recipient type.
  • PAYPAL_ID. Encrypted PayPal account number.
If the sender_batch_header includes the recipient_type attribute, any payout item without its own recipient_type attribute uses the recipient_type value from sender_batch_header. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.
setSenderItemId ( string $sender_item_id ) A sender-specified ID number. Tracks the batch payout in an accounting system.

Method Details

cancel() public static method

Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.
public static cancel ( string $payoutItemId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayoutItemDetails
$payoutItemId 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 PayoutItemDetails

get() public static method

Obtain the status of a payout item by passing the item ID to the request URI.
public static get ( string $payoutItemId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : PayoutItemDetails
$payoutItemId 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 PayoutItemDetails

getAmount() public method

The amount of money to pay the receiver.
public getAmount ( ) : PayPal\Api\Currency
return PayPal\Api\Currency

getNote() public method

Optional. A sender-specified note for notifications. Value is any string value.
public getNote ( ) : string
return string

getReceiver() public method

The receiver of the payment. Corresponds to the recipient_type value in the request.
public getReceiver ( ) : string
return string

getRecipientType() public method

The type of ID that identifies the payment receiver. Value is:
    EMAIL. Unencrypted email. Value is a string of up to 127 single-byte characters.
  • PHONE. Unencrypted phone number.
    Note: The PayPal sandbox does not support the PHONE recipient type.
  • PAYPAL_ID. Encrypted PayPal account number.
If the sender_batch_header includes the recipient_type attribute, any payout item without its own recipient_type attribute uses the recipient_type value from sender_batch_header. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.
public getRecipientType ( ) : string
return string

getSenderItemId() public method

A sender-specified ID number. Tracks the batch payout in an accounting system.
public getSenderItemId ( ) : string
return string

setAmount() public method

The amount of money to pay the receiver.
public setAmount ( PayPal\Api\Currency $amount )
$amount PayPal\Api\Currency

setNote() public method

Optional. A sender-specified note for notifications. Value is any string value.
public setNote ( string $note )
$note string

setReceiver() public method

The receiver of the payment. Corresponds to the recipient_type value in the request.
public setReceiver ( string $receiver )
$receiver string

setRecipientType() public method

The type of ID that identifies the payment receiver. Value is:
    EMAIL. Unencrypted email. Value is a string of up to 127 single-byte characters.
  • PHONE. Unencrypted phone number.
    Note: The PayPal sandbox does not support the PHONE recipient type.
  • PAYPAL_ID. Encrypted PayPal account number.
If the sender_batch_header includes the recipient_type attribute, any payout item without its own recipient_type attribute uses the recipient_type value from sender_batch_header. If the sender_batch_header omits the recipient_type attribute, each payout item must include its own recipient_type value.
public setRecipientType ( string $recipient_type )
$recipient_type string

setSenderItemId() public method

A sender-specified ID number. Tracks the batch payout in an accounting system.
public setSenderItemId ( string $sender_item_id )
$sender_item_id string