Skip to content

Conversation

@6c6z7ymqmk-sudo
Copy link

@6c6z7ymqmk-sudo 6c6z7ymqmk-sudo commented Oct 21, 2025

Thank you for your contribution to Braintree.

Before submitting this PR, note that we cannot accept language translation PRs. We support the same languages that are supported by PayPal, and have a dedicated localization team to provide the translations. If there is an error in a specific translation, you may open an issue and we will escalate it to the localization team.

Summary of changes

  • Add a paylater button on Demo
  • Add background color for Buttons

Checklist

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

Screenshot

Screen_recording_20251021_143806.webm

Authors

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

@6c6z7ymqmk-sudo 6c6z7ymqmk-sudo requested a review from a team as a code owner October 21, 2025 18:25
@6c6z7ymqmk-sudo 6c6z7ymqmk-sudo changed the title DTXONXO-201 Add Pay Later Button Add Pay Later Button Oct 21, 2025
Comment on lines 58 to 63
<Switch
android:id="@+id/offer_pay_later_switch"
android:layout_width="match_parent"
android:layout_height="@dimen/margin_40"
android:visibility="gone"
android:text="@string/paypal_offer_pay_later" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to remove this Switch entirely? It doesn't look like it's ever set to visible.

Copy link
Author

Choose a reason for hiding this comment

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

Good point. I suggest keeping this feature, as it’s still used in other places. We can add a feature switch to control the visibility of the second button I implemented, as well as this switch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think with your current changes we're not able to test all of the combinations of one time checkout, billing agreement, pay later enabled, pay later disabled.

Since we're adding a dedicated button for pay later, can we add one for one time checkout and separate one for launching the billing agreement flow?

Copy link
Author

Choose a reason for hiding this comment

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

After reviewing the codebase, Billing Agreements don’t currently support Pay Later. The first two buttons handle (1) single payments and (2) billing agreements, both with payLater = false. The newly added button handles single payments with payLater = true. This setup fulfills our current business needs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. So it sounds like the this Switch is still not used. Can we remove it as a part of this PR?

Copy link
Author

Choose a reason for hiding this comment

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

Removed

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