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

v5 - Add userPhoneNumber property to PayPalRequest #1119

Merged
merged 4 commits into from
Oct 14, 2024
Merged

Conversation

tdchow
Copy link
Collaborator

@tdchow tdchow commented Aug 20, 2024

Summary of changes

  • Add userPhoneNumber property to PayPalRequest
  • Update demo app to accept country code and national number fields
  • Update PayPalCheckoutRequest and PayPalVaultRequest to send phone number in the request body
  • Add PayPalPhoneNumber class that contains national number and country code

Screenshot_20240820_110936

I tested both checkout and vault flows. The phone number info is sent successfully.

Screenshot 2024-08-20 at 10 38 50 AM

Screenshot 2024-08-20 at 10 38 33 AM

Checklist

  • Added a changelog entry
  • Relevant test coverage

Authors

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

@tdchow tdchow requested a review from a team as a code owner August 20, 2024 16:15
@tdchow
Copy link
Collaborator Author

tdchow commented Aug 20, 2024

Closing PR until the release plan is set.

@tdchow tdchow closed this Aug 20, 2024
* main: (54 commits)
  Firebase App Distribution Branch (#1182)
  Fix lint warnings - replace kapt with ksp, remove unused properties and resources, added Intent extension functions for handling deprecated functions (#1181)
  [open dev] Cleanup integration tests (#1180)
  Update README and CHANGELOG (#1176)
  App link setup docs (#1171)
  Revert to Braintree Merchant Server (#1173)
  Prepare for development
  Release 5.0.0
  Remove BA toast from PatPal Fragment (#1172)
  [App Switch] Update CHANGELOG (#1166)
  Make pending request constructors public (#1169)
  [App Switch] Add analytic events (#1111)
  Fix 3DS Cancel (#1161)
  Fix `os_version` and `enablePayPalAppSwitch` (#1162)
  Fix analytic event timestamps (#1160)
  Rename handleReturnToAppFromBrowser to handleReturnToApp (#1158)
  Parse error messages from multiple possible fields in the error response (#1156)
  External Interface Access Control (#1155)
  Update Google Pay Integration (#1153)
  Batch Analytics Events by Session ID (#1152)
  ...

# Conflicts:
#	CHANGELOG.md
#	Demo/src/main/java/com/braintreepayments/demo/PayPalFragment.java
#	Demo/src/main/java/com/braintreepayments/demo/PayPalRequestFactory.java
#	Demo/src/main/res/layout/fragment_paypal.xml
#	PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalRequest.kt
#	PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalVaultRequest.kt
#	PayPal/src/test/java/com/braintreepayments/api/paypal/PayPalVaultRequestUnitTest.java
@tdchow tdchow reopened this Oct 11, 2024
@tdchow
Copy link
Collaborator Author

tdchow commented Oct 11, 2024

I retested passing buyer phone number for both vault and checkout flows. The params are getting sent in the order create APIs.

  "phone_number": {
    "country_code": "312",
    "national_number": "1231234"
  }

@tdchow tdchow changed the title Add userPhoneNumber property to PayPalRequest v5 - Add userPhoneNumber property to PayPalRequest Oct 11, 2024
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/buyer_phone_country_code_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Copy link
Contributor

Choose a reason for hiding this comment

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

What if we set the input type to phone?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great suggestion! I just pushed the change.

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/buyer_phone_national_number_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, what do you think?

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!

@tdchow tdchow merged commit d21dc59 into main Oct 14, 2024
3 checks passed
@tdchow tdchow deleted the user-phone-number branch October 14, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants