Repository navigation
Feature/saved payment method client - #1719
Draft
balamaninayard wants to merge 3 commits into
Draft
balamaninayard wants to merge 3 commits into
balamaninayard wants to merge 3 commits into
Conversation
…L body and fetch type - PayPalFundingInstrumentFetchType maps BUYER_DEFAULT_BILLING_AGREEMENT / BUYER_UPDATED_BILLING_AGREEMENT to the STICKY_FI / FI_FROM_APPROVED_CHECKOUT GraphQL enum values - PayPalFundingInstrumentDetailsGraphQLBody builds the PaypalFundingInstrumentDetails query, sending only the identity field for the fetch type and omitting null values Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- PayPalSavedPaymentMethodException covers invalid authorization, missing payment method ID JWT, missing order ID, empty body, unparseable summary and missing preferred message Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- fetchPaymentMethod resolves the buyer's funding instrument over GraphQL; GraphQL errors surface as BraintreeException - fetchCreditPresentmentMessages fetches the Pay Later message from v2/credit/fetch-presentment-messages - both require a client token and validate it before sending a request Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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 of changes
PayPalSavedPaymentMethodClient, which fetches what to display for a buyer's vaulted PayPal payment method: the saved funding instrument and the accompanying Pay Later message.PayPalFundingInstrumentDetailsGraphQLBodyandPayPalFundingInstrumentFetchTypeto build thePaypalFundingInstrumentDetailsGraphQL query, supporting both the buyer's default billing agreement (resolved via the client token's payment method ID JWT) and a buyer-updated billing agreement (resolved via an approved checkout's order ID).PayPalSavedPaymentMethodException, a sealed exception type covering invalid authorization, missing identity fields (payment method ID JWT / order ID), empty responses, failed parsing, and a missing Pay Later message.fetchPaymentMethodrequires a client token (a tokenization key has nopaymentMethodIdJwt) and surfaces GraphQL errors returned in a 200 response.fetchCreditPresentmentMessagescalls the credit presentment messages REST endpoint (production/sandbox based on configuration) and is treated as additive — callers should hide the message row on failure rather than fail checkout.TODOs in code) pending catalog approval.AI Usage
Which AI Agent Was Used?
How was AI used?
Code generation and unit test authoring for the new GraphQL body, fetch type enum, exception hierarchy, and client class, following the module's existing conventions (constructor DI, sealed exceptions, suspend-based client).
Estimated AI Code Contribution
Checklist
Authors
Inner Source Process
Internal to PayPal contributors should fill out this section. All others can delete.
...
Inner Source Checklist