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

PAD: add acss_debit to the list of payment method types #117

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,10 @@ public PaymentIntent execute(final Account account, final StripePaymentMethodsRe
// See https://groups.google.com/forum/?#!msg/killbilling-users/li3RNs-YmIA/oaUrBElMFQAJ
paymentMethodTypesBuilder.add("ach_debit");
}
if (transactionType == TransactionType.PURCHASE && currency == Currency.CAD) {
// See https://groups.google.com/g/killbilling-users/c/7nlIxYZd828/m/r82Tbnl7AAAJ
paymentMethodTypesBuilder.add("acss_debit");
}
paymentIntentParams.put("payment_method_types", paymentMethodTypesBuilder.build());

final StripeConfigProperties stripeConfigProperties = stripeConfigPropertiesConfigurationHandler.getConfigurable(context.getTenantId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ public static Map<String, Object> toAdditionalDataMap(final PaymentSource stripe
additionalDataMap.put("sepa_debit_mandate_reference", sepaDebit.getMandateReference());
additionalDataMap.put("sepa_debit_mandate_url", sepaDebit.getMandateUrl());
}
final Source.AcssDebit acssDebit = stripeSource.getAcssDebit();
if (acssDebit != null) {
additionalDataMap.put("acss_debit_bank_address_city", acssDebit.getBankAddressCity());
additionalDataMap.put("acss_debit_bank_address_line_1", acssDebit.getBankAddressLine1());
additionalDataMap.put("acss_debit_bank_address_line_2", acssDebit.getBankAddressLine2());
additionalDataMap.put("acss_debit_bank_address_postal_code", acssDebit.getBankAddressPostalCode());
additionalDataMap.put("acss_debit_bank_name", acssDebit.getBankName());
additionalDataMap.put("acss_debit_category", acssDebit.getCategory());
additionalDataMap.put("acss_debit_country", acssDebit.getCountry());
additionalDataMap.put("acss_debit_fingerprint", acssDebit.getFingerprint());
additionalDataMap.put("acss_debit_last4", acssDebit.getLast4());
additionalDataMap.put("acss_debit_routing_number", acssDebit.getRoutingNumber());
}
additionalDataMap.put("created", stripeSource.getCreated());
additionalDataMap.put("customer_id", stripeSource.getCustomer());
additionalDataMap.put("id", stripeSource.getId());
Expand Down