Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contactPreference to PayPalCheckoutRequest #1280

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tdchow
Copy link
Collaborator

@tdchow tdchow commented Mar 13, 2025

Summary of changes

  • Add contactPreference param to PayPalCheckoutRequest
  • Rename SHOPPER_SESSION_ID to SHOPPER_SESSION_ID_KEY to match naming convention

Checklist

  • Added a changelog entry
  • Relevant test coverage
  • Tested and confirmed payment flows affected by this change are functioning as expected

Authors

List GitHub usernames for everyone who contributed to this pull request.

@tdchow tdchow requested a review from a team as a code owner March 13, 2025 18:50
@tdchow
Copy link
Collaborator Author

tdchow commented Mar 13, 2025

DO NOT MERGE until end to end testing is completed.

@@ -63,6 +63,8 @@ import org.json.JSONObject
* at this URL.
*
* @property contactInformation Contact information of the recipient for the order
*
* @property contactPreference Preference for the contact information section within the payment flow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include something like "if not set, the contact information section will be disabled in the payment flow"? That's the behavior we see if we don't pass this param at all right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, on the API side the enum will default to NO_CONTACT_INFO if no value is passed in. I've updated the doc string.

CHANGELOG.md Outdated
## unreleased

* PayPal
* Add `contactPreference` property to `PayPalCheckoutRequest`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think it's worth calling this out as a bug fix as well? Merchants will need to be on this version to use contact module or will the GW be defaulting a value. cc: @sarahkoop my brain is fuzzy with this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'm not sure how we'd want to spin it. I guess the contact section would never show up without this new param. Do we know how it was communicated to merchants trying to integrate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to Add contactPreferenceproperty toPayPalCheckoutRequest - This property is required to enable the contact information section in the payment flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants