$agreement = Agreement::get($createdAgreement->getId(), $apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", null, $patchRequest, $ex);
exit(1);
}
ResultPrinter::printResult("Updated the Agreement with new Description and Updated Shipping Address", "Agreement", $agreement->getId(), $patchRequest, $agreement);
return $agreement;
Update an agreement
This sample code demonstrate how you can update a billing agreement, as documented here at: https://developer.paypal.com/webapps/developer/docs/api/#update-an-agreement API used: /v1/payments/billing-agreements/