woocommerce/plugins/woocommerce-blocks/assets/js/payment-method-extensions/payment-methods/stripe/payment-request
Rua Haszard 1df11f5461 allow payment methods to disable based on shipping (API change) (https://github.com/woocommerce/woocommerce-blocks/pull/2840)
* allow payment methods to disable based on shipping or other factors:
- renamed 'initialized' array 'available' to match primary purpose of
  `canMakePayment` api - whether payment method should be available
- trigger refresh of available payment methods when shopper chooses
  different shipping method
- rename resolveCanMakePayments => refreshCanMakePayments
- tweaked some variable names and scope for clarity
- added comments to clarify things

Note this should not affect behaviour yet - no existing payment methods
use this new feature. COD payment method will need this - woocommerce/woocommerce-blocks#2831

* optimise refreshCanMakePayments:
- useShallowEqual to avoid unnecessary call when shipping methods have
not actually changed (but object value has)

* replace ("set") payment methods in store, was appending:
- payment methods may come and go depending on cart/checkout state
- the previous SET action appended provided payment methods to the
  collection
- this prevents dynamic payment methods e.g. COD from being able to hide
  i.e. disable

* cache test payment request to avoid unnecessary stripe API calls:
- in the canMakePayment callback there's a test payment to determine if
  chrome pay/apple pay is set up and available
- canMakePayment is now called multiple times as checkout state changes
- now the results of the test payment are stored in variable, and
  returned on subsequent calls

* set init flag to avoid additional attempts to init stripe API:
+ tweak naming of init flag
2020-07-14 10:52:13 +12:00
..
apple-pay-preview.js Convert apple pay integration to payment request integration and finish implementation (https://github.com/woocommerce/woocommerce-blocks/pull/2127) 2020-04-08 12:36:04 -04:00
constants.js Convert apple pay integration to payment request integration and finish implementation (https://github.com/woocommerce/woocommerce-blocks/pull/2127) 2020-04-08 12:36:04 -04:00
index.js allow payment methods to disable based on shipping (API change) (https://github.com/woocommerce/woocommerce-blocks/pull/2840) 2020-07-14 10:52:13 +12:00
payment-request-express.js Reorder dependencies (https://github.com/woocommerce/woocommerce-blocks/pull/2774) 2020-06-26 13:01:35 +01:00
use-checkout-subscriptions.js Fix shipping rate and address handling in Stripe payment request payment method. (https://github.com/woocommerce/woocommerce-blocks/pull/2484) 2020-05-14 19:55:22 -04:00
use-event-handlers.js Fix shipping rate and address handling in Stripe payment request payment method. (https://github.com/woocommerce/woocommerce-blocks/pull/2484) 2020-05-14 19:55:22 -04:00
use-initialization.js Fix shipping rate and address handling in Stripe payment request payment method. (https://github.com/woocommerce/woocommerce-blocks/pull/2484) 2020-05-14 19:55:22 -04:00