diff --git a/.gitignore b/.gitignore index d68b7c107c3..8a1b9da0119 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,6 @@ tests/e2e-pw/playwright/.cache/ tests/e2e-pw/tests/e2e-pw/.auth/* # Slate docs docs/rest-api/build/* + +# Jurassic Tube files +bin/jurassictube/ diff --git a/bin/jurassic-tube-setup.sh b/bin/jurassic-tube-setup.sh index 2859938e43e..aa7b2ec6fd3 100755 --- a/bin/jurassic-tube-setup.sh +++ b/bin/jurassic-tube-setup.sh @@ -3,29 +3,32 @@ # Exit if any command fails. set -e -echo "Checking if ${PWD}/docker/bin/jt directory exists..." +# Define Jurassic Tube directory using bin directory +JT_DIR="${PWD}/bin/jurassictube" -if [ -d "${PWD}/docker/bin/jt" ]; then - echo "${PWD}/docker/bin/jt already exists." +echo "Checking if ${JT_DIR} directory exists..." + +if [ -d "${JT_DIR}" ]; then + echo "${JT_DIR} already exists." else - echo "Creating ${PWD}/docker/bin/jt directory..." - mkdir -p "${PWD}/docker/bin/jt" + echo "Creating ${JT_DIR} directory..." + mkdir -p "${JT_DIR}" fi -echo "Downloading the latest version of the installer script..." +echo "Checking if the installer is present and downloading it if not..." echo # Download the installer (if it's not already present): -if [ ! -f "${PWD}/docker/bin/jt/installer.sh" ]; then - # Download the installer script: - curl "https://jurassic.tube/get-installer.php?env=wcpay" -o ${PWD}/docker/bin/jt/installer.sh && chmod +x ${PWD}/docker/bin/jt/installer.sh +if [ ! -f "${JT_DIR}/installer.sh" ]; then + echo "Downloading the standalone installer..." + curl "https://jurassic.tube/installer-standalone.sh" -o "${JT_DIR}/installer.sh" && chmod +x "${JT_DIR}/installer.sh" fi echo "Running the installation script..." echo # Run the installer script -source $PWD/docker/bin/jt/installer.sh +"${JT_DIR}/installer.sh" echo read -p "Go to https://jurassic.tube/ in a browser, paste your public key which was printed above into the box, and click 'Add Public Key'. Press enter to continue" @@ -40,8 +43,24 @@ echo read -p "Please enter your Automattic/WordPress.com username: " username echo -${PWD}/docker/bin/jt/config.sh username ${username} -${PWD}/docker/bin/jt/config.sh subdomain ${subdomain} +if [ ! -f "${JT_DIR}/config.env" ]; then + touch "${JT_DIR}/config.env" +else + > "${JT_DIR}/config.env" +fi + +# Find the WordPress container section and get its port +PORT=$(docker ps | grep woocommerce_payments_wordpress | sed -En "s/.*0:([0-9]+).*/\1/p") + +# Use default if extraction failed +if [ -z "$PORT" ]; then + PORT=8082 # Default fallback + echo "Could not extract WordPress container port, using default: ${PORT}" +fi + +echo "username=${username}" >> "${JT_DIR}/config.env" +echo "subdomain=${subdomain}" >> "${JT_DIR}/config.env" +echo "localhost=localhost:${PORT}" >> "${JT_DIR}/config.env" echo "Setup complete!" echo "Use the command: npm run tube:start from the root directory of your WC Payments project to start running Jurassic Tube." diff --git a/changelog/chore-remove-ece-error-assignment-on-loaderror b/changelog/chore-remove-ece-error-assignment-on-loaderror new file mode 100644 index 00000000000..cce991d09ba --- /dev/null +++ b/changelog/chore-remove-ece-error-assignment-on-loaderror @@ -0,0 +1,5 @@ +Significance: patch +Type: update +Comment: chore: remove ECE error assignment on loaderror + + diff --git a/changelog/update-9916-go-live-modal-and-notice b/changelog/update-9916-go-live-modal-and-notice new file mode 100644 index 00000000000..789b36753a9 --- /dev/null +++ b/changelog/update-9916-go-live-modal-and-notice @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Adjust the go-live modal to match the latest design. diff --git a/changelog/update-to-standalone-jt b/changelog/update-to-standalone-jt new file mode 100644 index 00000000000..4df87f235ec --- /dev/null +++ b/changelog/update-to-standalone-jt @@ -0,0 +1,4 @@ +Significance: minor +Type: dev + +Update the tunelling setup. diff --git a/client/components/sandbox-mode-switch-to-live-notice/index.tsx b/client/components/sandbox-mode-switch-to-live-notice/index.tsx index e9ce619d7b1..23f5552cfa5 100644 --- a/client/components/sandbox-mode-switch-to-live-notice/index.tsx +++ b/client/components/sandbox-mode-switch-to-live-notice/index.tsx @@ -16,6 +16,7 @@ import { recordEvent } from 'wcpay/tracks'; import { ClickTooltip } from 'wcpay/components/tooltip'; import ErrorBoundary from 'wcpay/components/error-boundary'; import SetupLivePaymentsModal from './modal'; +import './style.scss'; interface Props { from: string; @@ -41,18 +42,23 @@ const SandboxModeSwitchToLiveNotice: React.FC< Props > = ( { return ( <> - + { interpolateComponents( { mixedString: sprintf( /* translators: %1$s: WooPayments */ __( // eslint-disable-next-line max-len - '{{strong}}%1$s is in sandbox mode.{{/strong}} To accept real transactions, {{switchToLiveLink}}set up a live %1$s account.{{/switchToLiveLink}} {{learnMoreIcon/}}', + "{{div}}{{strong}}You're using a test account.{{/strong}} To accept payments from shoppers, {{switchToLiveLink}}activate your %1$s account.{{/switchToLiveLink}}{{/div}}{{learnMoreIcon/}}", 'woocommerce-payments' ), 'WooPayments' ), components: { + div:
, strong: , learnMoreIcon: ( = ( { return ( -

- { __( - 'Before proceeding, please take note of the following information:', - 'woocommerce-payments' - ) } -

- - { __( - 'Your test account will be deactivated and your transaction records will be preserved for future reference.', - 'woocommerce-payments' - ) } - - { __( - 'The owner, business and contact information will be required.', - 'woocommerce-payments' - ) } - - { __( - 'We will need your banking details in order to process any payouts to you.', - 'woocommerce-payments' - ) } +
+

+ { __( + "Before continuing, please make sure that you're aware of the following:", + 'woocommerce-payments' + ) } +

+
+
+
+ +
+

+ { __( + 'Your test account will be deactivated, but your transactions can be found in your order history.', + 'woocommerce-payments' + ) } +

+
+
+
+ +
+

+ { sprintf( + /* translators: %s: WooPayments */ + __( + 'To use %s, you will need to verify your business details.', + 'woocommerce-payments' + ), + 'WooPayments' + ) } +

+
+
+
+ +
+

+ { __( + 'In order to receive payouts, you will need to provide your bank details.', + 'woocommerce-payments' + ) } +

+
-
diff --git a/client/components/sandbox-mode-switch-to-live-notice/modal/style.scss b/client/components/sandbox-mode-switch-to-live-notice/modal/style.scss index b4067be8ba1..ff2b10db5f0 100644 --- a/client/components/sandbox-mode-switch-to-live-notice/modal/style.scss +++ b/client/components/sandbox-mode-switch-to-live-notice/modal/style.scss @@ -1,21 +1,30 @@ .wcpay-setup-real-payments-modal { - color: $gray-900; - fill: $studio-woocommerce-purple-50; + &.components-modal__frame { + width: 512px; + + @media screen and ( max-width: $break-small ) { + height: fit-content; + margin: auto auto; + max-width: 90vw; + } + } .components-modal__content { box-sizing: border-box; max-width: 600px; - margin: auto; + margin: 0; padding: $gap-smaller $gap-larger $gap-larger; } .components-modal__header { position: initial; - padding: 0; + padding: 24px 0 16px 0; + height: auto; border: 0; h1 { @include wp-title-small; + font-weight: 300; margin-bottom: $gap-smaller; } } @@ -24,20 +33,36 @@ @include wp-title-small; } - &__headline { - font-weight: 600; - } - &__content { - display: grid; - grid-template-columns: auto 1fr; - gap: $gap; - padding: $gap-smallest; - align-items: center; - margin-bottom: $gap-large; + display: flex; + gap: $gap-large; + flex-direction: column; + padding: $gap-small 0 $gap 0; + + &__item { + p { + line-height: 20px; + margin: 0; + } + } + + &__item-flex { + display: flex; + gap: $gap; + padding-right: $gap-large; + + &__description { + color: $gray-700; + } + p { + line-height: 20px; + margin: 0; + } + } } &__footer { @include modal-footer-buttons; + padding-top: $gap-large; } } diff --git a/client/components/sandbox-mode-switch-to-live-notice/modal/test/index.test.tsx b/client/components/sandbox-mode-switch-to-live-notice/modal/test/index.test.tsx index 2f82a5a263b..e2341aaa3a5 100644 --- a/client/components/sandbox-mode-switch-to-live-notice/modal/test/index.test.tsx +++ b/client/components/sandbox-mode-switch-to-live-notice/modal/test/index.test.tsx @@ -36,7 +36,7 @@ describe( 'Setup Live Payments Modal', () => { expect( screen.queryByText( - 'Before proceeding, please take note of the following information:' + "Before continuing, please make sure that you're aware of the following:" ) ).toBeInTheDocument(); } ); @@ -58,7 +58,7 @@ describe( 'Setup Live Payments Modal', () => { user.click( screen.getByRole( 'button', { - name: 'Continue setup', + name: 'Activate payments', } ) ); diff --git a/client/components/sandbox-mode-switch-to-live-notice/style.scss b/client/components/sandbox-mode-switch-to-live-notice/style.scss new file mode 100644 index 00000000000..0171d296b0a --- /dev/null +++ b/client/components/sandbox-mode-switch-to-live-notice/style.scss @@ -0,0 +1,5 @@ +.sandbox-mode-notice { + .wcpay-banner-notice__content { + display: flex; + } +} diff --git a/client/express-checkout/index.js b/client/express-checkout/index.js index 6f36a3e6b59..0e2239946b6 100644 --- a/client/express-checkout/index.js +++ b/client/express-checkout/index.js @@ -256,10 +256,6 @@ jQuery( ( $ ) => { expressCheckoutButtonUi.renderButton( eceButton ); eceButton.on( 'loaderror', () => { - wcPayECEError = __( - 'The cart is incompatible with express checkout.', - 'woocommerce-payments' - ); if ( ! document.getElementById( 'wcpay-woopay-button' ) ) { expressCheckoutButtonUi.getButtonSeparator().hide(); } diff --git a/client/tokenized-express-checkout/index.js b/client/tokenized-express-checkout/index.js index 940aa1462b8..d18cb9f5be5 100644 --- a/client/tokenized-express-checkout/index.js +++ b/client/tokenized-express-checkout/index.js @@ -235,10 +235,6 @@ jQuery( ( $ ) => { expressCheckoutButtonUi.renderButton( eceButton ); eceButton.on( 'loaderror', () => { - wcPayECEError = __( - 'The cart is incompatible with express checkout.', - 'woocommerce-payments' - ); if ( ! document.getElementById( 'wcpay-woopay-button' ) ) { expressCheckoutButtonUi.getButtonSeparator().hide(); } diff --git a/package.json b/package.json index 4fa803a245c..d69725ac2da 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,8 @@ "format:css": "npm run format:provided '**/*.scss' '**/*.css'", "format:provided": "prettier --write", "tube:setup": "./bin/jurassic-tube-setup.sh", - "tube:start": "./docker/bin/jt/tunnel.sh", - "tube:stop": "./docker/bin/jt/tunnel.sh break", + "tube:start": "source ./bin/jurassictube/config.env && jurassictube -u \"$username\" -s \"$subdomain\" -h \"$localhost\"", + "tube:stop": "source ./bin/jurassictube/config.env && jurassictube -b -s \"$subdomain\"", "psalm": "./bin/run-psalm.sh", "xdebug:toggle": "docker compose exec -u root wordpress /var/www/html/wp-content/plugins/woocommerce-payments/bin/xdebug-toggle.sh", "changelog": "./vendor/bin/changelogger add",