-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add BECS Debit support for tokenization #4144
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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, nice work!
I left 2 questions about the payment method display being inconsistent between My account and checkout, but otherwise everything is looking good.
- ✅ Test 1: Add, Remove and Mark the token as default in the my account page.
- ✅ Test 2: Save the token at checkout, and use the saved token in a subsequent purchase.
- Note: Tested on blocks and checkout.
public function get_display_name( $deprecated = '' ) { | ||
$display = sprintf( | ||
/* translators: last 4 digits of account. */ | ||
__( 'Bank account ending in %s', 'woocommerce-gateway-stripe' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be "BECS Direct Debit ending in %s" ?
@@ -425,6 +426,10 @@ public function get_account_saved_payment_methods_list_item( $item, $payment_tok | |||
$item['method']['brand'] = $payment_token->get_bank_name(); | |||
$item['method']['last4'] = $payment_token->get_last4(); | |||
break; | |||
case WC_Stripe_Payment_Methods::BECS_DEBIT: | |||
$item['method']['brand'] = esc_html__( 'BECS Direct Debit', 'woocommerce-gateway-stripe' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the payment methods listing it appears like this for me:
Becs Direct Debit ending in 3456
Is it possible to enforce the capitalization for the method brand?
Closes #3965
Changes proposed in this Pull Request:
Testing instructions
Use the following bank account for testing:
Test 1: Add, Remove and Mark the token as default in the
my account
page.Test 2: Save the token at checkout, and use the saved token in a subsequent purchase.
Changelog entry
Changelog Entry Comment
Comment
Post merge