[MAJOR] Add Venmo eligibility checks, Checkout functionality#456
Merged
Conversation
…demo - Add CreateVenmoOrderUseCase for Venmo-specific order creation - Implement PayWithVenmoView and PayWithVenmoViewModel for Venmo checkout UI - Add VenmoClient with funding eligibility check and app switching logic - Implement venmo success view and complete order flow - Add padding to Venmo screen for better UX
- Add VenmoEligibilityResult sealed class to VenmoClient - Add isEligible() suspend function to check Venmo eligibility - Update demo app to show eligibility check as Step 1 - Display Venmo button only when eligible - Remove LSAT authentication from GetFundingEligibility (use public endpoint)
NoResult means the intent is unrelated to Venmo flow (e.g., initial app launch). Only show Step 3 when user actually completes Venmo checkout and returns with Success or Canceled result.
- Only show Step 2 if Venmo is eligible - Display Ineligible and Error results as failure states in Step 1 - Prevents user from proceeding with order creation if not eligible
Adds required X-App-Guid header with a random UUID to all GraphQL requests to match PayPal API requirements (visible in curl commands for GetFundingEligibility and similar GraphQL operations).
- Remove constructor parameters from Environment enum - Use property getters with when expressions for url, graphQLEndpoint, venmoEnvironment - Add @get:RestrictTo on venmoEnvironment for library-internal use - Add customVenmoEnvironment to demo app settings (optional, for Venmo testing) - Add validation for venmo environment values (sandbox/live/qa)
- Change GetFundingEligibility.invoke() to require buyerCountry parameter - Remove unused currency parameter - Update VenmoClient.isEligible() to accept and validate buyerCountry - Replace hardcoded 'US' with dynamic buyerCountry value - Fix demo app to pass buyerCountry to isEligible()
- Tests for isEligible() method: success, ineligible, API failure, validation - Tests for start() method: successful launch, failure cases, parameter validation - Tests for finishStart() method: deep link parsing, cancellation, approval handling - Add test dependencies: mockk, robolectric, kotlinx-coroutinesTest
Remove the customVenmoEnvironment setting from demo app and SDK debug config. Environment should be determined by the Venmo checkout URL prefix instead.
…bCheckoutClient - Use APIClientError.unknownError() helper for consistency - Provide more descriptive error messages when required parameters are missing - Use DATA_PARSING_ERROR for malformed results - Remove unused error message constants - Update tests to verify error codes and messages
…umentation * Add VenmoEligibilityCallback and VenmoStartCallback interfaces * Implement callback-based methods alongside suspend functions for Java compatibility * Update CHANGELOG with CorePayments breaking change (merchantId required)
kgangineni
marked this pull request as ready for review
July 15, 2026 21:49
sshropshire
approved these changes
Jul 17, 2026
kgangineni
commented
Jul 17, 2026
| Log.d("venmo", "CCO Update Success") | ||
| return try { | ||
| val cctOptions = ChromeCustomTabOptions(launchUri = appSwitchUri) | ||
| when (chromeCustomTabsClient.launch(activity, cctOptions)) { |
Collaborator
Author
There was a problem hiding this comment.
future improvement: abstract java exceptions logic to within ChromeCustomTabsClient and communicate using sealed classes for different results
* remove unnecessary entries in network_security_config.xml
kgangineni
force-pushed
the
venmoFunctionality
branch
from
July 20, 2026 15:21
f0c7e70 to
d041b35
Compare
…allback-based API - Add VENMO to FundingSource enum in CorePayments - Update Demo app to use callback-based isEligible() and start() methods
kgangineni
force-pushed
the
venmoFunctionality
branch
from
July 20, 2026 15:22
d041b35 to
fc49988
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VenmoClient.isEligible()suspend and callback methodsCoreConfigconstructor now requiresmerchantIdparameterAPI / Contract Changes
New
VenmoClient.isEligible(buyerCountry: String): VenmoEligibilityResult(suspend)VenmoClient.isEligible(buyerCountry: String, callback: VenmoEligibilityCallback)(callback)VenmoClient.start(activity: Activity, orderId: String): VenmoStartResult(suspend)VenmoClient.start(activity: Activity, orderId: String, callback: VenmoStartCallback)(callback)CoreConfig.merchantIdpropertyModified
CoreConfigconstructor — now requiresmerchantIdparameterBreaking Changes
Migration:
CoreConfig Constructor Change
Before:
After:
Checklist