Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement PE with deferred intent for the card payment method in the …
…classic checkout (#2753) * Separate adding hooks from the constructor for WC_Stripe_Intent_Controller * Make wc-stripe-upe-element a class instead of an id * Render the Payment element in the classic checkout page without creating an intention * Process payments with deferred intent in the classic checkout * Fix expected dom element in unit tests * Update process_payment_with_deferred_intent * Add base uni test for PE with deferred intent processing * Move some logic out of create_and_confirm_payment_intent * Add validation for the payment information array * Update unit tests for processing payments with a deferred intent * Improve the error messaging on processing failures * Remove unneeded test * Fix typo in doc block Co-authored-by: Matt Allan <matttallan@gmail.com> * Remove resolved TODO comment * Use the order currency instead of the store currency when creating an intent Co-authored-by: Matt Allan <matttallan@gmail.com> * Remove inline TODO comments that already have issues to address them * Remove unnecesary order status assignment * Remove TODO that will be addressed in a separate issue * Set the selected payment method type as the order's payment method title * Include shipping information for the payment intent when shipping is needed * Pass the appearance and fonts parameters to the Elements initialization object * Validate whether the provided payment method type is valid and allowed in the selected country * Check whether the dom elements exist before changing their attributes * Fix console error when checking out as a guest * Adjust unit tests --------- Co-authored-by: Matt Allan <matttallan@gmail.com>
- Loading branch information