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

Fix Issue #235 #236

Merged
merged 1 commit into from Jan 21, 2024
Merged

Fix Issue #235 #236

merged 1 commit into from Jan 21, 2024

Conversation

dickermoshe
Copy link
Contributor

@dickermoshe dickermoshe commented Dec 26, 2023

Bug:

Fixes issue #235
The current implementation of the ApplePayButton only sets the payment items on create.
Changing the payment items after the button is created doesn't change the callback from onPressed.

Changes:

  • _UiKitApplePayButton sets the callback on each build.
  • The example has been updated with quantity, this will show why this PR is needed.

Before:

Changing quantity didn't change the price

Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-12-26.at.14.04.54.mp4

After:

Price changes due to quantity

Simulator.Screen.Recording.-.iPhone.SE.3rd.generation.-.2023-12-26.at.14.03.55.mp4

Copy link

google-cla bot commented Dec 26, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@dickermoshe dickermoshe changed the title Fix https://github.com/google-pay/flutter-plugin/issues/235 Fix #235 Dec 26, 2023
@dickermoshe dickermoshe changed the title Fix #235 Fix Issue #235 Dec 26, 2023
@dickermoshe
Copy link
Contributor Author

dickermoshe commented Dec 26, 2023

@JlUgia
Could you please take a look at this when you get a chance, it's a pretty significant bug

Copy link
Member

@JlUgia JlUgia left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @dickermoshe.
I left a couple of comments for you to take a look.

pay/example/lib/main.dart Outdated Show resolved Hide resolved
pay_ios/lib/src/widgets/apple_pay_button.dart Show resolved Hide resolved
@JlUgia
Copy link
Member

JlUgia commented Jan 20, 2024

We'll also need to merge the conflicts before submitting this.
Let me know if you need any help with that.

@dickermoshe
Copy link
Contributor Author

Rebased on main, and removed changes from the example app.
Also changed the fix to just use a stateful widget.
Thanks

@JlUgia
Copy link
Member

JlUgia commented Jan 21, 2024

Thank you @dickermoshe.
Merging.

@JlUgia JlUgia merged commit 42479dd into google-pay:main Jan 21, 2024
1 check passed
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.

None yet

2 participants