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 ACH Direct Debit payment processing for non-saved bank accounts #3761

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

Conversation

rafaelzaleski
Copy link
Contributor

@rafaelzaleski rafaelzaleski commented Jan 22, 2025

Closes #3747

Changes proposed in this Pull Request:

  • Adds ACH Direct Debit as a payment option, available behind a feature flag.
  • Includes necessary changes to integrate ACH Direct Debit functionality without impacting existing payment methods.
  • Ensures the feature is disabled by default unless explicitly enabled via the feature flag.
  • Does not support saved bank accounts yet.

Testing instructions

Prerequisites:

  1. Activate ACH Direct Debit:
npm run wp option update _wcstripe_feature_lpm_ach 'yes'
  1. Webhook Configuration: Ensure that webhook events from Stripe are correctly received by your WooCommerce setup.

Test Case 1: Checkout Using ACH Direct Debit with a Simple Product

  1. Add a simple product to the cart.
  2. Navigate to the Checkout page.
  3. Enter a US billing address.
  4. Select “ACH Direct Debit” from the payment methods.
  5. Enter the following bank details:
  • Routing Number: 110000000
  • Account Number: 000123456789
  1. Check the consent box: “I understand that Stripe will be collecting…”.
  2. Click “Place Order”.

Expected Results:

  • Redirected to the Order Received page.
  • After running the scheduled action:
  1. Go to Tools > Scheduled Actions.
  2. Find and run the wc_stripe_deferred_webhook hook.
  • The order status updates to Processing.

Test Case 2: Checkout Using ACH Direct Debit with a Virtual Product

  1. Add a virtual product to the cart.
  2. Navigate to the Checkout page.
  3. Enter a US billing address.
  4. Select “ACH Direct Debit” from the payment methods.
  5. Enter the following bank details:
  • Routing Number: 110000000
  • Account Number: 000123456789
  1. Check the consent box: “I understand that Stripe will be collecting…”.
  2. Click “Place Order”.

Expected Results:

  • Redirected to the Order Received page.
  • After running the scheduled action:
  1. Go to Tools > Scheduled Actions.
  2. Find and run the wc_stripe_deferred_webhook hook.
  • The order status updates to Processing.

Test Case 3: Disable ACH Direct Debit and Verify Removal

npm run wp option delete _wcstripe_feature_lpm_ach
  1. Add a simple product to the cart.
  2. Navigate to the Checkout page.

Expected Results:

  • ACH Direct Debit is not available as a payment option.
  • Stripe Settings Page:
  • Visit the Stripe settings.
  • Confirm that ACH Direct Debit is not listed among available payment methods.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@rafaelzaleski rafaelzaleski self-assigned this Jan 22, 2025
@rafaelzaleski rafaelzaleski marked this pull request as ready for review January 28, 2025 16:01
@rafaelzaleski rafaelzaleski requested review from a team and ricardo and removed request for a team January 28, 2025 21:49
@bborman22 bborman22 requested review from a team and bborman22 and removed request for ricardo and a team January 29, 2025 15: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.

ACH: Process Payment with a Non-saved Payment Method
1 participant