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

Add ACSS payment tokenization #4013

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

ricardo
Copy link
Member

@ricardo ricardo commented Mar 5, 2025

Fixes #3813

Changes proposed in this Pull Request:

  • Introduce tokenization support for ACSS.
  • Adapt intent controller to handle setup intents and add mandate options for ACSS.
  • Change DOM elements position for APMs/LPMs (p1741710704021659-slack-CHG7MTCAF).

Testing instructions

Setup

  1. Enable the ACSS feature flag:
    • Use the Stripe Dev Tools plugin to enable the ACSS feature flag.
  2. Enable ACSS in Stripe:
    • Navigate to the Stripe Dashboard.
    • Enable "Canadian Pre-Authorized Debits" in the payment methods settings.
  3. Enable ACSS in WC Stripe:
    • Go to WooCommerce > Settings > Payments > Stripe.
    • Enable "Pre-Authorized Debit (ACSS)".
  4. Listen to webhooks:
npm run listen
  1. Change the store currency to CAD.

Pre-test: Change your cart address to Canada

Known Issue: Payment methods are hidden or displayed based on the checkout billing address (src) (Issue to be created).

  1. Go to the checkout page and set the address as follows:
    • Country: Canada
    • Province: British Columbia
    • City: Vancouver
    • Postcode: K1A 0B1
  2. Navigate to My Account > Payment Methods.
  3. Check if Pre-Authorized Debit appears in the list of available payment methods.

Test 1: Save and use an ACSS token at checkout

  1. Add a product to the cart and proceed to checkout.
  2. Select Pre-Authorized Debit (ACSS) as the payment method.
  3. Ensure there is an option to save the payment method, and select it.
  4. Proceed with simulating a successful verification.
  5. Click Place order and complete the ACSS authorization.
  6. Verify the order confirmation page is displayed.
  7. Navigate to My Account > Payment Methods and confirm that the ACSS payment method is saved.
  8. Check the Stripe dashboard > Customers and verify that the payment method is attached to the customer.
  9. Add another product to the cart and proceed to checkout.
  10. From the payment methods section, select the saved ACSS token (Stripe Bank ending in ...).
  11. Click Place order and complete checkout.
  12. Verify that the purchase is successful and the saved ACSS token was used.
  13. Navigate to My Account > Payment Methods and ensure the ACSS token remains available.
  14. Perform the same steps using Shortcode Checkout and Blocks Checkout.
  15. Confirm that the ACSS token is saved and reusable in both cases.

Test 2: Add, remove, and mark the token as default in "My Account"

  1. Log in as a customer.
  2. Navigate to My Account > Payment Methods.
  3. Add a new payment method and select Pre-Authorized Debit.
  4. Fill in the required information and click Add payment method.
  5. Complete the ACSS setup and verify it shows up under payment methods.
  6. Navigate to the Stripe dashboard > Customers and select the customer belonging to the logged-in user. Ensure it has the payment method you just added.
  7. Add another payment method (e.g card) and mark the ACSS payment method as default. Ensure it is set as the default payment method, in "My Account > Payment Methods" and Stripe.
  8. Delete the ACSS payment method and ensure it is removed from the list of payment methods. Verify that the PM gets removed from Stripe as well.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@ricardo ricardo marked this pull request as ready for review March 12, 2025 03:54
@ricardo ricardo requested review from a team and lovo-h and removed request for a team March 12, 2025 13:24
@lovo-h lovo-h requested review from a team and rafaelzaleski and removed request for lovo-h and a team March 12, 2025 14:59
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.

ACSS: Process payments with saved payment method
1 participant