Skip to content

Commit

Permalink
Update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Oct 31, 2023
1 parent 3f4bcbb commit 1e9c80a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RESULT_PROPOSAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ public void onError(Exception error) {
```
## Single Result Object With Types

This approach is the most Kotlin-first pattern since the return type handling and casting can be
done in the least lines of code. It also resolves the nullability issues. However, the Java
integration becomes somewhat complex with casting. This approach aligns with how other payment
SDKs handle results.
This approach is the most Kotlin-first pattern. It also resolves the nullability issues. However,
the Java integration becomes somewhat complex with casting. This approach aligns with how other
payment SDKs handle results.

This approach relies on the Kotlin sealed class, so requires the `PaymentAuthResult` and
`PaymentResult` objects to live in `BraintreeCore`. This reduces code duplication in our SDK, but
requires casting by the merchants (ex: PaymentMethodNonce is returned instead of
`PaymentResult` objects to live in `BraintreeCore`. It also requires the launchable result
objects to all extend a single class (ex: `LaunchableRequest`). This reduces code duplication in
our SDK, but requires casting by the merchants (ex: PaymentMethodNonce is returned instead of
module-specific PayPalAccountNonce). Once the SDK is fully converted to Kotlin, these could be
moved into payment module specific sealed classes (ex: `PayPalPaymentAuthResult`).

Expand Down

0 comments on commit 1e9c80a

Please sign in to comment.