google-pay / flutter-plugin

Apache License 2.0
145 stars 129 forks source link

Fix Issue #235 #236

Closed dickermoshe closed 10 months ago

dickermoshe commented 11 months ago

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:

Before:

Changing quantity didn't change the price

https://github.com/google-pay/flutter-plugin/assets/75931499/760d4083-f28f-4cff-975b-53a66b3dfb8b

After:

Price changes due to quantity

https://github.com/google-pay/flutter-plugin/assets/75931499/051e8ba2-23da-4086-bab0-a389266e3daf

google-cla[bot] commented 11 months ago

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 commented 11 months ago

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

JlUgia commented 10 months ago

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

dickermoshe commented 10 months ago

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

JlUgia commented 10 months ago

Thank you @dickermoshe. Merging.