// API used: GET /v1/payments/billing-agreements/<Agreement-Id>/transactions? start-date=yyyy-mm-dd&end-date=yyyy-mm-dd
// Retrieving the Agreement object from Get Billing Agreement. This may not be necessary if you are trying to search for transactions of already created Agreement.
/** @var Agreement $agreement */
$agreement=require'GetBillingAgreement.php';
// Replace this with your AgreementId to search transactions based on your agreement.
$agreementId=$agreement->getId();
usePayPal\Api\Agreement;
// Adding Params to search transaction within a given time frame.