Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement payments via Express Checkout Element on the Cart and Checkout pages #8914

Merged
merged 71 commits into from
Jun 21, 2024

Conversation

asumaran
Copy link
Contributor

@asumaran asumaran commented Jun 6, 2024

Fixes #8870

Changes proposed in this Pull Request

  • Renders ECE elements on Shortcode Cart and Checkout pages when the _wcpay_feature_stripe_ece option is set to 1.
  • Renders ECE elements on the Product pages when the _wcpay_feature_stripe_ece option is set to 1.

Testing instructions

Important

This has been tested using Google Pay since it is currently difficult to test Apple Pay due to Apple Pay's requirements for test cards.

Important

You must test these changes on a public facing URL using HTTPS. Use something like Jurassic Tube or ngrok to create a tunnel to your local environment.

Enable the ECE elements

  • (Docker) Open your local WCPay repository and run ./bin/cli.sh wp option update _wcpay_feature_stripe_ece 1.
  • (Valet) cd to your local merchant store site directory (not the WCPay repo) and run wp option update _wcpay_feature_stripe_ece 1.
    • Note: This requires WP CLI to be installed on your computer, you can install it with brew install wp-cli.
  • (Everything) Open your database and add/update the _wcpay_feature_stripe_ece field in the wp_options table to be 1.

Make sure you have a Google Pay account set up with a real card

  1. Create an account on Google Pay if you don't already have one.
  2. Make sure you have a real card added to your GPay account (it will not be charged while in test mode).
  3. Make sure you're logged into GPay.
  4. **Do all the tests in a Chromium based browser, such as Google Chrome, Arc, Vivaldi, etc.

Testing procedure for cart and checkout pages

  1. Add a product to your cart.
  2. Go to the Cart page.
  3. Make sure the Google Pay button is rendered.
  4. Click the GPay button to initiate the GPay process.
  5. Change the shipping address and make sure the total amount and shipping options are updated accordingly.
  6. Change the shipping method and make sure the total amount is updated accordingly.
  7. Click Pay and make sure the payment is processed successfully.
  • Repeat these steps on both the shortcode and blocks based Cart and Checkout pages.
  • Repeat once more with a product that does not require shipping.

Test a failure message

Important

I don't know how to fake this because I don't know how/if we can use any GPay test cards, so there are some local code changes required here to fake an issue.

  1. Set phoneNumberRequired to false here:

phoneNumberRequired: options.requestPhone,

  1. Follow steps (1) - (7) in the "Testing procedure for cart and checkout pages" above.
  2. Make sure the payment fails.
  3. Make sure there's an error notice displayed at the top of the page.
  • Repeat these steps on both the shortcode and blocks based Cart and Checkout pages.

Regression tests

  1. Disable Apple Pay and Google Pay.
  2. Test the payment critical flows with a credit card and make sure they work as intended.
  3. Test WooPay and make sure it works as intended.

  • Run npm run changelog to add a changelog file, choose patch to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Post merge

@ricardo
Copy link
Member

ricardo commented Jun 19, 2024

I wonder if it's a Storefront bug? Can you see which CSS rules are affecting the button sizes?

Yes it seems like it's related to Storefront. If I use TT4 both buttons have the same width.

I wasn't able to easily identify what is the difference, only found this CSS width: calc(100% + 8px); in the upper ECE iframe which appears to be related. On Storefront it's not calculating the +8px apparently.

Dev tools Elements on Stripe ECE

@ricardo
Copy link
Member

ricardo commented Jun 19, 2024

@reykjalin I was able to see the button on the checkout block now, but I'm having the same problem from the cart block. When I click the button it throws an error:

Uncaught (in promise) IntegrationError: Missing value for click event resolve callback: lineItems.0.amount should be an amount in the currency's subunit.
test.mov

The difference in the blocks vs. the shortcode checkout for me is that this prop is different: blocks / shortcode.

In blocks:

[
    {
        "key": "total_items",
        "label": "Subtotal:",
        "value": 1000,
        "valueWithTax": 1100
    },
    {
        "key": "total_fees",
        "label": "Fees:",
        "value": 0,
        "valueWithTax": 0
    },
    {
        "key": "total_discount",
        "label": "Discount:",
        "value": 0,
        "valueWithTax": 0
    },
    {
        "key": "total_tax",
        "label": "Taxes:",
        "value": 100,
        "valueWithTax": 100
    }
]

In shortcode:

[{
    "label": "Tax",
    "amount": 100,
    "name": "Tax"
}]

I'm using WooCommerce 9.1.0-dev on a WP 6.5 Valet installation, no blocks nor Gutenberg plugin installed. And I'm testing with a simple product with shipping enabled.

System Status Report

`

WordPress Environment

WordPress address (URL): http://wcpay.test
Site address (URL): http://wcpay.test
WC Version: 9.1.0-dev
Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.
Action Scheduler Version: ✔ 3.7.4
Log Directory Writable: ✔
WP Version: 6.5.4
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_CA
External object cache: –

Server Environment

Server Info: nginx/1.25.1
PHP Version: 8.1.26
PHP Post Max Size: 512 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 8.5.0
(SecureTransport) OpenSSL/3.2.0

SUHOSIN Installed: –
MySQL Version: 10.4.28-MariaDB
Max Upload Size: 512 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 8.3.1
WC Database Prefix: wp_
Total Database Size: 16.16MB
Database Data Size: 10.27MB
Database Index Size: 5.89MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.08MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.45MB + Index: 0.41MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.19MB + Index: 0.14MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.11MB + Index: 0.09MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.44MB + Index: 0.38MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_mail_catcher_logs: Data: 1.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 4.03MB + Index: 0.09MB + Engine InnoDB
wp_postmeta: Data: 2.52MB + Index: 2.89MB + Engine InnoDB
wp_posts: Data: 0.17MB + Index: 0.09MB + Engine InnoDB
wp_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_mnm_child_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gc_activity: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_gc_cards: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_gc_cardsmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB

Post Type Counts

attachment: 13
page: 10
post: 2
product: 18
product_variation: 6
revision: 4
shop_coupon: 6
shop_order: 311
shop_order_refund: 6
shop_subscription: 7
wp_navigation: 1
wp_template: 2

Security

Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔

Active Plugins (8)

Query Monitor: by John Blackbourn – 3.16.2
Batcache Manager: by Andy Skelton – 1.5
Code Snippets: by Code Snippets Pro – 3.6.4
Jetpack: by Automattic – 13.4.2
WooCommerce Payments Dev Tools: by Automattic –
WooPayments: by Automattic – 7.7.0 (update to version 7.8.0 is available)
Woo Subscriptions: by WooCommerce – 6.1.0 (update to version 6.4.0 is available)
WooCommerce: by Automattic – 9.1.0-dev

Inactive Plugins (7)

Disable All WordPress Updates: by Oliver Schlöbe – 1.7.1
Mail logging - WP Mail Catcher: by James Ward – 2.1.7
PHP Compatibility Checker: by WP Engine – 1.6.3
WooCommerce Gift Cards: by WooCommerce – 1.16.5 (update to version 1.16.15 is available)
WooCommerce Mix and Match Products: by Kathy Darling – 2.5.0 (update to version 2.7.1 is available)
WooCommerce Points and Rewards: by WooCommerce – 1.7.43 (update to version 1.8.5 is available)
WooCommerce Product Bundles: by WooCommerce – 6.22.4 (update to version 7.1.2 is available)

Dropin Plugins ()

db.php: Query Monitor Database Class (Drop-in)

Must Use Plugins (1)

default.php: by –

Settings

API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: bundle (bundle)
external (external)
grouped (grouped)
mix and match (mix-and-match)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: ✔
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: –

Logging

Enabled: ✔
Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
Retention period: 30 days
Level threshold: –
Log directory size: 1 MB

WC Pages

Shop base: #6 - /shop/
Cart: #7 - /cart/
Checkout: #69 - /checkout-block/
My account: #9 - /my-account/
Terms and conditions: ❌ Page not set

Theme

Name: Twenty Twenty-Four
Version: 1.1
Author URL: https://en-ca.wordpress.org
Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ❌ Not declared

Templates

Overrides: /Users/ricardometring/a8c/valet/wcpay/wp-content/plugins/woocommerce/templates/block-notices/error.php
/Users/ricardometring/a8c/valet/wcpay/wp-content/plugins/woocommerce/templates/block-notices/notice.php
/Users/ricardometring/a8c/valet/wcpay/wp-content/plugins/woocommerce/templates/block-notices/success.php

WooPayments

Version: 7.7.0
Connected to WPCOM: Yes
WPCOM Blog ID: 232823555
Account ID: acct_1N5aa8QtOes6AirY
Payment Gateway: Enabled
Test Mode: Enabled
Enabled APMs: card,bancontact,eps,giropay,ideal,sofort,p24,afterpay_clearpay,klarna,affirm
WooPay: Enabled (product,cart,checkout)
WooPay Incompatible Extensions: No
Apple Pay / Google Pay: Enabled (product,cart,checkout)
Fraud Protection Level: basic
Multi-currency: Disabled
Auth and Capture: Enabled
Documents: Disabled
Logging: Enabled

Subscriptions

WCS_DEBUG: ✔ No
Subscriptions Mode: ✔ Live
Subscriptions Live URL: http://wcpay.test
Subscriptions-core Library Version: 6.9.0
Subscription Statuses: trash: 6
wc-pending: 1

WooCommerce Account Connected: ❌ No
Report Cache Enabled: ✔ Yes
Cache Update Failures: ✔ 0 failure

Store Setup

Country / State: United States (US) — California

Subscriptions by Payment Gateway

WooPayments: trash: 6
wc-pending: 1

Payment Gateway Support

WooPayments: products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Bancontact): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (giropay): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Sofort): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Przelewy24 (P24)): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (iDEAL): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (EPS): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Affirm): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Afterpay): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

WooPayments (Klarna): products
refunds
multiple_subscriptions
subscription_cancellation
subscription_payment_method_change_admin
subscription_payment_method_change_customer
subscription_payment_method_change
subscription_reactivation
subscription_suspension
subscriptions
subscription_amount_changes
subscription_date_changes
tokenization
add_payment_method

Admin

Enabled Features: activity-panels
analytics
product-block-editor
coupons
core-profiler
customize-store
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
product-custom-fields
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
launch-your-store

Disabled Features: experimental-blocks
minified-js
pattern-toolkit-full-composability
product-pre-publish-modal
settings
async-product-editor-category-field
product-editor-template-system

Daily Cron: ✔ Next scheduled: 2024-06-20 00:16:43 -04:00
Options: ✔
Notes: 139
Onboarding: completed

Action Scheduler

Cancelled: 17
Oldest: 2024-05-22 16:01:18 -0400
Newest: 2024-06-12 12:16:37 -0400

Complete: 389
Oldest: 2024-05-22 15:58:39 -0400
Newest: 2024-06-19 13:02:59 -0400

Failed: 8
Oldest: 2023-06-20 01:42:23 -0400
Newest: 2024-05-01 16:14:59 -0400

Pending: 1
Oldest: 2024-06-19 17:14:38 -0400
Newest: 2024-06-19 17:14:38 -0400

Status report information

Generated at: 2024-06-19 13:04:15 -04:00
`

@reykjalin reykjalin requested a review from ricardo June 20, 2024 04:30
@reykjalin
Copy link
Contributor

@ricardo I've addressed the issue you discovered, thank you! Not sure why I wasn't running into it before.

I also added some JS tests, so if you could give a quick re-review that'd be great 🙏

Copy link
Member

@ricardo ricardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reykjalin I'm now experiencing a different error from cart and checkout blocks pages:

IntegrationError: The amount 2750 is less than the total amount of the line items provided.

To reproduce: Navigate to WooCommerce > Settings > Enable tax rates.

This is how the `lineItems` property looks.

Blocks checkout:

[
    {
        "key": "total_items",
        "label": "Subtotal:",
        "value": 2500,
        "valueWithTax": 2750,
        "name": "Subtotal:",
        "amount": 2750
    },
    {
        "key": "total_fees",
        "label": "Fees:",
        "value": 0,
        "valueWithTax": 0,
        "name": "Fees:",
        "amount": 0
    },
    {
        "key": "total_discount",
        "label": "Discount:",
        "value": 0,
        "valueWithTax": 0,
        "name": "Discount:",
        "amount": 0
    },
    {
        "key": "total_tax",
        "label": "Taxes:",
        "value": 250,
        "valueWithTax": 250,
        "name": "Taxes:",
        "amount": 250
    },
    {
        "key": "total_shipping",
        "label": "Shipping:",
        "value": 0,
        "valueWithTax": 0,
        "name": "Shipping:",
        "amount": 0
    }
]

Shortcode checkout (for comparison):

[
    {
        "label": "Tax",
        "amount": 250,
        "name": "Tax"
    },
    {
        "label": "Shipping",
        "amount": 0,
        "name": "Shipping"
    }
]

@reykjalin Should we aim to make those line items consistent across shortcode and blocks?

Also, I'm having the following error when I disable tax calculation and try to place an order from blocks pages:

IntegrationError: Invalid value for confirm event paymentFailed callback: value should be an object. You specified: fail.

Placing an order in shortcode pages work just fine.

@ricardo
Copy link
Member

ricardo commented Jun 20, 2024

@reykjalin Do you plan to take a look into the button sizing issue as part of this PR or should I create a separate issue?

There are currently two display problems:

  • On the Storefront theme, the button looks slightly shorter and taller.
  • On TT4 the button has the right width, but it's still slightly taller than it should:
ECE GPay button size inconsistency on blocks WooCommerce checkout

@reykjalin
Copy link
Contributor

I'm now experiencing a different error from cart and checkout blocks pages

Oh, nice catch! Looks like I'm supposed to be using .value and not .valueWithTax for the line items 🤔 . Didn't expect that tbh!

Should we aim to make those line items consistent across shortcode and blocks?

I'm leaning no. I think the line items in the blocks come from the Cart/Checkout block (or rather, the props passed to our component) while the line items in the shortcode come from the cart API response, so they're a bit different. I don't think it makes sense to try to make them the same 🤔

Do you plan to take a look into the button sizing issue as part of this PR or should I create a separate issue?

Let's make it a part of #8951. The height thing is already fixed in #8988, that was just because the default height from Stripe doesn't match our default height.

The width is odd. I'm not sure what could be causing it, but I'll add a comment to #8951 to make sure I remember to look into it.

@reykjalin
Copy link
Contributor

Ok, incorrect line item total fixed in 8d5d8b4 🎉

@reykjalin reykjalin requested a review from ricardo June 20, 2024 19:14
@ricardo
Copy link
Member

ricardo commented Jun 20, 2024

@reykjalin The tax rates issue was fixed 👍.

But I'm still facing the second problem I mentioned in the review, when I try to place the order. Can you reproduce this one as well?

IntegrationError: Invalid value for confirm event paymentFailed callback: value should be an object. You specified: fail.

This is only happening when checking out from blocks cart for me (Not blocks checkout).

@reykjalin
Copy link
Contributor

Sorry @ricardo , missed that issue! I've fixed that in f135c9b, thanks for catching that!

It's coming up because the payment is failing though, so I'm curious as to what might be causing the payment failure 🤔

@ricardo
Copy link
Member

ricardo commented Jun 20, 2024

@reykjalin It was failing due to this issue: #8981. I didn't know it was failing as I was seeing only the console error, but after a workaround, it works now 👍.

Copy link
Member

@ricardo ricardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests well after the fixes ✅. Nice work 👍.

@reykjalin reykjalin added this pull request to the merge queue Jun 21, 2024
Merged via the queue into develop with commit 544f297 Jun 21, 2024
23 checks passed
@reykjalin reykjalin deleted the as-8868-ece-product-page branch June 21, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate ECE for Payment Processing in the Shortcode Cart/Checkout
6 participants