* initial mapping out of stripe payment intents
* rename checkout processing statuses to be clearer
* Add new status and refactor checkout complete behaviour.
* Make sure payment result data is included in checkout processing response
* add payment intent handling
Still testing
* make sure promise is returned
* include site url with endpoint
* modify setComplete status to optionally receive redirectUrl for changing in state at the same time as setting status
* fix typo in property retrieval
* add error handling for after checkout processing event
* add notices area for payment methods
* implement error handling for stripe intents
* hook into stripe error processing and include error in payment response
* clear notices so they don’t show in block and merge payment details
* add notice handling to payment context
* modify error processing in checkout processor
* handle errors with fallback in checkout state context
* hook into after processing for stripe cc error handling
* set checkout to idle status if before processing emitters result in error
* Add emit response type-defs and normalize expectations for observer responses
* improve doc block
* switch checkoutIsComplete check to checkoutAfterProcessing for payment complete status change
* remove unneeded event emitters and consolidate some logic
* fix idle status set logic
* Prevent select label/value breaking in two lines
* Make sure frontend and base styles are loaded in the same order
* Use link-button mixin for address button
* Refactor shipping rates control CSS to decrease specificity and overwrites
* Refactor sidebar panel CSS to decrease specificity and overwrites
* Fix link-button vertical-align
* remove logic server side for getting payment method from paymentdata
* ensure stripe accounts for payment request type payment methods
* make sure legacy payment method handling always runs last
* add processedPaymentMethodId to payment method data context state
* switch checkout processor to use new processedPaymentMethod id for submission
* implement returning paymentMethodId from payment-request-express
* include paymentMethodId in stripe cc success return value
* include paymentMethodId in cheque success return value
* add active payment method setting and handling via checkout
express payment methods still need to implement:
- onClick when their button is clicked
- onClose when the express payment interface is closed (cancelled etc).
* don’t expose setActivePaymentMethod on the payment method interface
* remove/fix artifacts from earlier iterations of the pull
* rename `id` property to `name` property for payment method registration
* Revert "include paymentMethodId in cheque success return value"
This reverts commit fe4ee8aced6d67bbd9033263ce61844349d18250.
* Revert "include paymentMethodId in stripe cc success return value"
This reverts commit 359a1f0089866110ec204182f8ffa14ab099c425.
* Revert "implement returning paymentMethodId from payment-request-express"
This reverts commit 117c68980b0876dee0acc78cec7754ccfe2a9bb1.
* Revert "switch checkout processor to use new processedPaymentMethod id for submission"
This reverts commit c38a05b63626dfc1336c7bb0e86417b798a803d6.
* Revert "add processedPaymentMethodId to payment method data context state"
This reverts commit 3d7923e7297f3c76efde536d26eaf68464ba9583.
* improve isSuccess response check and variable name
* implement paymentMethodId config option
* doh php ain’t javascript
* add missing dependency from rebase
* Return updated cart if there is a conflict (409 response) e.g. item no longer exists
* Receive updated carts
* Update tests and coupon handling
* Further rewording
* use cart data to provide country and currency_code
* remove files that likely got added back in from a bad rebase.
* modify canMakePayment config property so it must be a function
* Feed cart data to registered payment methods `canMakePayment` function.
This can then be used by payment methods for determining whether to show the payment method or not.
* implement new canMakePayment signature for cheque
Now canMakePayment doesn’t need to be a promise (payment method registry will handle wrapping all values in a promise to treat them as promises.
* implement canMakePayment as a function
* add logic allowing payment method to be overridden via payment data in request
* hook in to trigger server side processing of stripe payment request
* improvements to shipping data context
- memoize event emitters
- split up emitted events (reduces how often events trigger)
- Include whether rate is being selected in exported data.
* expose `isSelectingRate` value to payment method interface
* fix typo in shipping emitters for emitter type
* include setting of shipping data in payment method success status call
- this also requires changing the nested order of providers in checkout provider
* fix priority logic for event emitters.
- lower priority is supposed to fire before higher priority.
* normalize postal code for comparisons
* move normalize functions into stripe-utils folder
* refactor stripePromise so that it provides a specific instance to each payment method.
This also provides it as a prop to the pm components.
* renadme apple pay express to payment request express
This adds full support for the stripe payment request api instead of just applePay (so GooglePay, MicrosoftPay and ApplePay are now supported).
Also adds numerous fixes to internal logic.
* add handling to skip core checkout validation logic if express payment method is handling payment
Express payment methods have their own internal validation so this removes the need for checkout validating fields. This is also necessary because checkout validation breaks the flow when making a payment using express payment methods because of the order of the flow for these methods.
* splitting out emmitter effects for checkout and improving logic
Splitting up effects limits the potential for firing off emitters more than needed.
* remove unnecessary ref definitions
* fix on cancel action erroring for payment request modal
* ensure unique stripe object for component and canPay
* set default total label if one isn’t configured on the server
* fix order of state changes
* simplify condition
* remove unnecessary dependency
* normalize to uppercase too
* simplify can make payment conditional
* update comment blocks
* remove calculating as a checkout status (making it separate)
* include checkout is calculating for determining whether to flip payment status to process
* only change payment method state for status changes if needed
* fix reducer for shipping state
* include checkoutIsCalculating for determining whether to show validation errors in checkout block
* change where currentStatus is defined
* fix bug with saved payment method option
* Counting helpers for shipping rates and packages
* Use new helpers
* Make shipping calculator use shipping context directly
* Totals should use current address
* Avoid useShippingRates
* Return rates and other items from useShippingRatse in useStoreCart instead
* Update tests
* Merge conflict
* Merge conflict
* Rest API - Ensure totals are up to date on init
* Update cart controller to bail if the cart does not need shipping
* Update todos and wc supported version to match status of core
* Add todos
* Fix customer address population
* exit early
* Only show descriptions if shipping/payment methods > 1
* Hide descriptions if no description text is set
* Fix object length
* methods->options
* Counting helpers for shipping rates and packages
* Use new helpers
* move preview to editor data and alias it no nothing in frontend builds
* seperate context and provider
* pass previewData as a prop to provider
* address comments
* Add customer ID to checkout API response
* Add customer ID to checkout context
* Show/hide remember payment checkbox based on checkout context
* Pass via payment interface instead
* Missing commas
* disable continue to checkout if item is being removed
* rename isPending and selectors/actions to isPendingDelete
* switch itemPendingDelete params order
* change to watching quantity changes not removal
* yield RECEIVE_REMOVED_ITEM
* update types and add return to select
* update tests
* switch params back
* only delete item after response from server
* update tests
* handle errors and unrelated unmounts
* disable row if is loading
* Make validation errors appear
* Make validation errors appear all at once
* Simplify diff
* Expose shippingErrorStatus from shipping context
* Memoize currentErrorStatus
* Pass currentErrorStatus to observers
* Add missing type-def property
* Fix typo in constant name
* Refactor emitEvent so false responses don't return true
* Make onCheckoutProcessing observers return errorMessage and validationErrors properties
* Move no-shipping-placeholder to block - allow pointer events
* Allow payments placeholder to have pointer events
* Enable pointer events for children
* Wrap checkout with disabled
* remove usage of paymentstatus dispatcher from apple pay
* add type-def for payment data response objects
* make sure shape of payment data for stripe cc is as server expects
* include payment data in checkout processor request
* fix bug that got reintroduced in rebase
* rename typedef
* Add interface for setting an express payment error notice.
* fix typedefs
* remove usage of paymentstatus dispatcher from stripe cc
* remove usage of paymentstatus dispatcher from apple pay
* remove any existing express payment notice on click
* revert buggy change with abort payment call
- also ensure that completePayment sets applePayProcessing to false
* Switch add to cart events to useStoreCart hook
* Add to cart endpoint
* Inject dependenct schemas
* Feedback, cart items are based on product schema
* Variable typo
* Move hook to base
* Update totals correcrly
* Update tests to use schema/routes class
* Update tests to correctly use schema
* Remove type hint to prevent strict standards error