Skip to content

Commit

Permalink
Merge branch 'develop' into add/2648-adapted-extensions-compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcosta99 authored May 31, 2024
2 parents eb72230 + 1bd1b1d commit 5ca33b9
Show file tree
Hide file tree
Showing 71 changed files with 305 additions and 265 deletions.
30 changes: 30 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
*** WooPayments Changelog ***

= 7.7.0 - 2024-05-29 =
* Add - Add share key query param when sending data to Stripe KYC.
* Add - Add the WooPay Direct Checkout flow to the blocks mini cart widget.
* Add - feat: add multi-currency support to Store API.
* Add - feat: error message on 1M+ amount.
* Add - feat: tokenized cart PRBs on PDPs via feature flag.
* Add - Render ECE buttons behind a feature flag.
* Fix - Charm pricing and rounding options corrected for all currencies that aren't presented with decimal points.
* Fix - Fix "Pay for order" infinite loading when submitting form without payment details.
* Fix - fix: remove WooPay checkout pages scripts from non-checkout pages.
* Fix - fix: settings notices consistency.
* Fix - fix: Store API tokenized cart nonce verification.
* Fix - Fix a bug in Tracks where shopper events are not fired properly.
* Fix - Fix ECE error in the blocks checkout when PRBs are disabled.
* Fix - Fix Payment block render error while editing the block checkout page.
* Fix - Fix shortcode orders when using WooPay Direct Checkout.
* Fix - Improve visibility of WooPay button on light and outline button themes.
* Fix - Updating saved payment method billing address before processing the payment.
* Update - Do not auto-redirect to WooPay on page load.
* Update - Pass previous exception with exception.
* Update - Removed deprecated deposit_status key from account status.
* Update - Remove public key encryption setting from WooPayments settings.
* Update - Update XPF currency formatting.
* Dev - Add command to run QIT PHPStan tests.
* Dev - Add local release package support for PHPStan.
* Dev - Bump tested up to version for WP to 6.5 and WC to 8.9.1.
* Dev - Fix Klarna E2E tests.
* Dev - Guarantee REST intialization on REST request context (avoiding rest_preload_api_request context).
* Dev - Upgrade jetpack sync package version.

= 7.6.0 - 2024-05-08 =
* Add - Add additional data to Compatibility service
* Add - Add User Satisfaction Survey for Payments Overview Widget
Expand Down

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/add-8779-unit-test-get-reporting-payment-activity

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/add-8797-conditional-rest-apis-init

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/add-new-process-payment-exception
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Add New_Process_Payment_Exception
4 changes: 4 additions & 0 deletions changelog/add-order-id-mismatch-exception
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Add Order_ID_Mismatch_Exception
4 changes: 0 additions & 4 deletions changelog/add-phpstan-qit-tests-command

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/add-phpstan-support-for-local-zip

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/add-woopay-direct-checkout-to-minicart

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/as-remove-auto-redirect

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/chore-incompatibility-notice-wrapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: update

chore: update incompatibility notice wrapping
5 changes: 0 additions & 5 deletions changelog/chore-remove-unused-upe-js-methods

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/delete-4710-remove-deposit_status

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/dev-finish-setup-cta
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Fixes some cases where redirects to the onboarding will open in a new tab.
4 changes: 0 additions & 4 deletions changelog/feat-8772-render-ece-buttons

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/feat-add-multi-currency-support-to-store-api

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/feat-error-notice-on-1m-amount

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-5150-xpf-currency

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-5223-payment-activity-adjustment

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-8611-3DS-subscription-pm

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-8704-fix-disputes-view-report-link

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-8716-duplicate-query-checkout

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-8742-merchant-timezone-payment-activity

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-8775-direct-checkout-shortcode-orders

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/fix-8883-pay-for-order-blocked-ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Fix "Pay for order" infinite loading when submitting form without payment details.
5 changes: 0 additions & 5 deletions changelog/fix-afterpay-virtual-produts

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-blocks-checkout-ece-error-when-prb-disabled

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-blocks-page-detection-for-woopay

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-escaping-from-8650

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-link-setup-intent-pm-title

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-rule-exclusion

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-settings-notices-consistency

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-shopper-bump-stats-conditions

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-store-api-tokenized-cart-nonce-verification

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-stripe-pmme-editor-error

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-update-jetpack-sync-package

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/fix-update-request-classes-docs

This file was deleted.

4 changes: 4 additions & 0 deletions changelog/fix-woopay-button-submit-when-enter-pressed
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Make it so that the WooPay button is not triggered on Checkout pages when the "Enter" key is pressed on a keyboard.
4 changes: 0 additions & 4 deletions changelog/fix-woopay-save-user-on-non-checkout-pages

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/refactor-pdp-payment-request-tokenized-cart

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/remove-8839-public-key-encryption

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/update-8733-move-payment-activity-data-fetching

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/update-billing-address-saved-card

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/update-parameterize-xdebug-host-dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/update-pass-previous-exception-with-exception

This file was deleted.

5 changes: 0 additions & 5 deletions changelog/update-sandbox-mode-notice-tooltip-copy

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/update-woopay-button-color

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/upgrade-jetpack-packages

This file was deleted.

35 changes: 23 additions & 12 deletions client/checkout/classic/payment-processing.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
Expand Down Expand Up @@ -63,8 +68,8 @@ async function initializeAppearance( api ) {
*
* @param {Object} $form The jQuery object for the form.
*/
export function blockUI( $form ) {
$form.addClass( 'processing' ).block( {
export async function blockUI( $form ) {
await $form.addClass( 'processing' ).block( {
message: null,
overlayCSS: {
background: '#fff',
Expand Down Expand Up @@ -515,18 +520,24 @@ export const processPayment = (
return;
}

const { elements, isPaymentInformationComplete } = gatewayUPEComponents[
paymentMethodType
];
if ( ! isPaymentInformationComplete ) {
showErrorCheckout( 'Your payment information is incomplete.' );
return false;
}

blockUI( $form );

( async () => {
try {
await blockUI( $form );

const {
elements,
isPaymentInformationComplete,
} = gatewayUPEComponents[ paymentMethodType ];

if ( ! isPaymentInformationComplete ) {
throw new Error(
__(
'Your payment information is incomplete.',
'woocommerce-payments'
)
);
}

await validateElements( elements );
const paymentMethodObject = await createStripePaymentMethod(
api,
Expand Down
10 changes: 10 additions & 0 deletions client/checkout/classic/test/payment-processing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ describe( 'Payment processing', () => {
};

await processPayment( apiMock, checkoutForm, 'card' );
// Wait for promises to resolve.
await new Promise( ( resolve ) => setImmediate( resolve ) );

expect( mockCreatePaymentMethod ).toHaveBeenCalledWith( {
elements: expect.any( Object ),
Expand Down Expand Up @@ -499,6 +501,8 @@ describe( 'Payment processing', () => {
};

await processPayment( apiMock, checkoutForm, 'card' );
// Wait for promises to resolve.
await new Promise( ( resolve ) => setImmediate( resolve ) );

expect( mockCreatePaymentMethod ).toHaveBeenCalledWith( {
elements: expect.any( Object ),
Expand Down Expand Up @@ -537,6 +541,8 @@ describe( 'Payment processing', () => {
};

await processPayment( apiMock, checkoutForm, 'card' );
// Wait for promises to resolve.
await new Promise( ( resolve ) => setImmediate( resolve ) );

expect( mockCreatePaymentMethod ).toHaveBeenCalledWith( {
elements: expect.any( Object ),
Expand Down Expand Up @@ -572,6 +578,8 @@ describe( 'Payment processing', () => {
};

await processPayment( apiMock, checkoutForm, 'card' );
// Wait for promises to resolve.
await new Promise( ( resolve ) => setImmediate( resolve ) );

expect( mockCreatePaymentMethod ).toHaveBeenCalledWith( {
elements: expect.any( Object ),
Expand Down Expand Up @@ -605,6 +613,8 @@ describe( 'Payment processing', () => {
};

await processPayment( apiMock, addPaymentMethodForm, 'card' );
// Wait for promises to resolve.
await new Promise( ( resolve ) => setImmediate( resolve ) );

expect( mockCreatePaymentMethod ).toHaveBeenCalledWith( {
elements: expect.any( Object ),
Expand Down
Loading

0 comments on commit 5ca33b9

Please sign in to comment.