diff --git a/changelog/fix-7301-descriptive-error-message-on-invalid-pm b/changelog/fix-7301-descriptive-error-message-on-invalid-pm new file mode 100644 index 00000000000..798235980af --- /dev/null +++ b/changelog/fix-7301-descriptive-error-message-on-invalid-pm @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Improved error message for invalid payment method diff --git a/changelog/fix-7748-capture-notification-styles-are-broken b/changelog/fix-7748-capture-notification-styles-are-broken new file mode 100644 index 00000000000..348106f98f8 --- /dev/null +++ b/changelog/fix-7748-capture-notification-styles-are-broken @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fixed broken styles in authorization capture notifications diff --git a/changelog/remove-flag-usage b/changelog/remove-flag-usage new file mode 100644 index 00000000000..cab11239829 --- /dev/null +++ b/changelog/remove-flag-usage @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Avoid using the removed deferred UPE flag diff --git a/changelog/update-4163-compatibility-service b/changelog/update-4163-compatibility-service new file mode 100644 index 00000000000..3a524da05ae --- /dev/null +++ b/changelog/update-4163-compatibility-service @@ -0,0 +1,4 @@ +Significance: minor +Type: add + +Adding Compatibility Service to assist with flagging possible compatibility issues in the future. diff --git a/client/payment-details/summary/index.tsx b/client/payment-details/summary/index.tsx index 6112a27e86f..34887da95db 100644 --- a/client/payment-details/summary/index.tsx +++ b/client/payment-details/summary/index.tsx @@ -5,13 +5,7 @@ */ import { __ } from '@wordpress/i18n'; import { dateI18n } from '@wordpress/date'; -import { - Card, - CardBody, - CardFooter, - CardDivider, - Flex, -} from '@wordpress/components'; +import { Card, CardBody, CardDivider, Flex } from '@wordpress/components'; import moment from 'moment'; import React, { useContext } from 'react'; import { createInterpolateElement } from '@wordpress/element'; @@ -55,6 +49,7 @@ import MissingOrderNotice from 'wcpay/payment-details/summary/missing-order-noti import DisputeAwaitingResponseDetails from '../dispute-details/dispute-awaiting-response-details'; import DisputeResolutionFooter from '../dispute-details/dispute-resolution-footer'; import ErrorBoundary from 'components/error-boundary'; +import CardNotice from 'wcpay/components/card-notice'; declare const window: any; @@ -508,73 +503,69 @@ const PaymentDetailsSummary: React.FC< PaymentDetailsSummaryProps > = ( { authorization && ! authorization.captured && ( - -
-
- { createInterpolateElement( - __( - 'You must capture this charge within the next', - 'woocommerce-payments' - ), - { - a: ( - // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-no-target-blank - - ), + - - { moment - .utc( authorization.created ) - .add( 7, 'days' ) - .fromNow( true ) } - - - { isFraudOutcomeReview && - `. ${ __( - 'Approving this transaction will capture the charge.', - 'woocommerce-payments' - ) }` } -
- - { ! isFraudOutcomeReview && ( -
- { - wcpayTracks.recordEvent( - 'payments_transactions_details_capture_charge_button_click', - { - payment_intent_id: - charge.payment_intent, - } - ); - } } + buttonIsPrimary={ true } + buttonIsSmall={ false } + onClick={ () => { + wcpayTracks.recordEvent( + 'payments_transactions_details_capture_charge_button_click', + { + payment_intent_id: + charge.payment_intent, + } + ); + } } + /> + ) : ( + <> + ) + } + > + { createInterpolateElement( + __( + 'You must capture this charge within the next', + 'woocommerce-payments' + ), + { + a: ( + // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-no-target-blank + -
+ ), + } + ) }{ ' ' } + - + > + + { moment + .utc( authorization.created ) + .add( 7, 'days' ) + .fromNow( true ) } + + + { isFraudOutcomeReview && + `. ${ __( + 'Approving this transaction will capture the charge.', + 'woocommerce-payments' + ) }` } + ) } diff --git a/client/payment-details/summary/test/__snapshots__/index.test.tsx.snap b/client/payment-details/summary/test/__snapshots__/index.test.tsx.snap index 02f35f6c1db..30c5c237e49 100644 --- a/client/payment-details/summary/test/__snapshots__/index.test.tsx.snap +++ b/client/payment-details/summary/test/__snapshots__/index.test.tsx.snap @@ -244,15 +244,15 @@ exports[`PaymentDetailsSummary capture notification and fraud buttons renders ca