woocommerce/plugins/woocommerce-blocks/assets/js/base/components/payment-methods
Darren Ethier 4ad741329b Fix saved payment method selection not working for purchases. (https://github.com/woocommerce/woocommerce-blocks/pull/2425)
* fix arguments

* only set payment status to pristine if it isn’t already successful

* add server side handling for saved tokens

* ensure correct gateway is selected when using saved card:
- reset the active payment method when user selects saved payment method
(card); this ensures that the correct gateway is used when switching
from another gateway to a saved card

* enhance radiocontrol to receive option specific change events.

* implement specific option change events

This commit:

- ensures selecting a saved payment option updates active payment method for the selected option.
- Sets the saved token key for the selected option correctly.

* remove unnecessary php side code

* fix bug with default saved payment option not applying:

When the payment options are initialised, we now call the onChange
handler for the default (`is_default`) option. This triggers payment
success() so checkout succeeds with default payment method, even if user
doesn't touch payment options.

* fix effect dependencies

Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2020-05-11 09:29:57 -04:00
..
no-payment-methods SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00
express-checkout.js Update stripe payment methods to work with new event emitters (https://github.com/woocommerce/woocommerce-blocks/pull/2115) 2020-04-06 08:18:35 -04:00
express-payment-methods.js Refactor logic for handling active payment method with express payment methods via checkout (https://github.com/woocommerce/woocommerce-blocks/pull/2170) 2020-04-09 11:22:34 -04:00
index.js Fix build issues for production builds (https://github.com/woocommerce/woocommerce-blocks/pull/2042) 2020-03-27 16:56:48 -04:00
payment-method-error-boundary.js Handle errors when loading payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/2228) 2020-04-15 17:15:56 +02:00
payment-methods.js Fixes regression with payment method validation (https://github.com/woocommerce/woocommerce-blocks/pull/2450) 2020-05-10 19:41:10 -04:00
saved-payment-method-options.js Fix saved payment method selection not working for purchases. (https://github.com/woocommerce/woocommerce-blocks/pull/2425) 2020-05-11 09:29:57 -04:00
style.scss SCSS mixins cleanup (https://github.com/woocommerce/woocommerce-blocks/pull/2405) 2020-05-07 10:48:38 +02:00