woocommerce/plugins/woocommerce-blocks/assets/js/base/context/cart-checkout/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
..
actions.js Lazy load stripe.js and preserve payment method registration order. (https://github.com/woocommerce/woocommerce-blocks/pull/2214) 2020-04-14 18:44:31 -04:00
constants.js Lazy load stripe.js and preserve payment method registration order. (https://github.com/woocommerce/woocommerce-blocks/pull/2214) 2020-04-14 18:44:31 -04:00
event-emit.js Refactor checkout status and event emitters to support stripe intents and more complex payment methods. (https://github.com/woocommerce/woocommerce-blocks/pull/2189) 2020-04-14 12:52:23 -04:00
index.js Add contexts for checkout (https://github.com/woocommerce/woocommerce-blocks/pull/1915) 2020-03-10 09:39:21 -04:00
payment-method-data-context.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
reducer.js Lazy load stripe.js and preserve payment method registration order. (https://github.com/woocommerce/woocommerce-blocks/pull/2214) 2020-04-14 18:44:31 -04:00
use-payment-method-registration.js Handle errors when loading payment methods (https://github.com/woocommerce/woocommerce-blocks/pull/2228) 2020-04-15 17:15:56 +02:00