// You can prevent duplicate batches from being processed. If you specify a `sender_batch_id` that was used in the last 30 days, the batch will not be processed. For items, you can specify a `sender_item_id`. If the value for the `sender_item_id` is a duplicate of a payout item that was processed in the last 30 days, the item will not be processed.
// #### Batch Header Instance
$senderBatchHeader->setSenderBatchId(uniqid())
->setEmailSubject("You have a payment");
// #### Sender Item
// Please note that if you are using single payout with sync mode, you can only pass one Item in the request
$senderItem1=new\PayPal\Api\PayoutItem();
$senderItem1->setRecipientType('Email')
->setNote('Thanks you.')
->setReceiver('shirt-supplier-one@gmail.com')
->setSenderItemId("item_1".uniqid())
->setAmount(new\PayPal\Api\Currency('{
"value":"0.99",
"currency":"USD"
}'));
// #### Sender Item 2
// There are many different ways of assigning values in PayPal SDK. Here is another way where you could directly inject json string.
$senderItem2=new\PayPal\Api\PayoutItem(
'{
"recipient_type":"EMAIL",
"amount":{
"value":0.90,
"currency":"USD"
},
"receiver":"shirt-supplier-two@mail.com",
"note":"Thank you.",
"sender_item_id":"item_2"
}'
);
// #### Sender Item 3
// One more way of assigning values in constructor when creating instance of PayPalModel object. Injecting array.