JAVA SDK - cancel Agreement?
vished
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
May-27-2019
02:12 AM
Hi all,
How can I cancel an agreement?
I tried:
private void cancelAgreement(Agreement agreement, String accessToken) throws PayPalRESTException {
AgreementStateDescriptor agreementStateDescriptor = new AgreementStateDescriptor();
agreementStateDescriptor.setNote("Cancel the contract");
agreement.cancel(accessToken, agreementStateDescriptor);
}
But I got:
The method cancel(String, AgreementStateDescriptor) from the type Agreement is deprecated
Any ideas?
0 REPLIES 0

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Why does PayPal redirect to different pages (login vs credit card form) depending on browser mode? in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)
- Persist 403 ERROR in REST APIs
- How can I get the java SDK to gracefully let go of the page? in Sandbox Environment
- Unprocessable Entity when creating order from Billing Agreement in REST APIs
- cannot cancel automatic payment as merchant in PayPal Payments Standard