Claus Ibsen created CAMEL-28065:
-----------------------------------
Summary: camel-braintree - oauth API cannot work, stale methodName
list and other leftovers
Key: CAMEL-28065
URL: https://issues.apache.org/jira/browse/CAMEL-28065
Project: Camel
Issue Type: Bug
Components: camel-braintree
Reporter: Claus Ibsen
Fix For: 4.25.0
h4. 1. The oauth API cannot work
BraintreeConfiguration.newBraintreeGateway
(BraintreeConfiguration.java:233-237) builds the gateway from accessToken or
merchantId/publicKey/privateKey only. The OAuth calls need new
BraintreeGateway(clientId, clientSecret), so createTokenFromCode,
createTokenFromRefreshToken and revokeAccessToken send the wrong credentials,
and connectUrl has a null client_id. There is no IT for oauth. Proposed change:
add clientId/clientSecret (secret = true) options and build the gateway with
them, or remove the oauth API. The API descriptions now say it cannot be
configured.
h4. 2. Stale methodName enum
The hand-written enums of methodName in BraintreeConfiguration.java:46-49 list
holdInEscrow (gone from braintree-java 3.55.1) and miss all,
adjustAuthorization, connectUrl, createTokenFromCode,
createTokenFromRefreshToken, revokeAccessToken, packageTracking, reverse,
updateCustomFields, parseWithoutSignatureVerification.
h4. 3. subscription/delete
The SDK sends DELETE /subscriptions/{id} and ignores customerId; the endpoint
is not in the Braintree API reference (cancel is the documented way).
SubscriptionGatewayIT.java:65 is a TODO stub. Consider deprecating it.
h4. 4. Leftovers
pom.xml:205: the oauth API has a copied MerchantAccountCreateForCurrencyRequest
substitution that does nothing. No ITs for oauth, merchantAccount and
usBankAccount; several SubscriptionGatewayIT methods are TODO stubs.
Found while writing the API method and parameter descriptions of CAMEL-27980
(https://github.com/apache/camel/pull/31273).
_Filed by Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)