1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[PM-24964] Stripe-hosted bank account verification (#16220)

* Implement bank account hosted URL verification with webhook handling notification

* [PM-25491] Create org/provider bank account warning needs to be updated
This commit is contained in:
Alex Morask
2025-09-09 12:22:45 -05:00
committed by GitHub
parent 52642056d8
commit 4907820383
11 changed files with 149 additions and 30 deletions

View File

@@ -8,7 +8,6 @@ import { BitwardenSubscriber } from "../../types";
import { MaskedPaymentMethod } from "../types";
import { ChangePaymentMethodDialogComponent } from "./change-payment-method-dialog.component";
import { VerifyBankAccountComponent } from "./verify-bank-account.component";
@Component({
selector: "app-display-payment-method",
@@ -18,18 +17,23 @@ import { VerifyBankAccountComponent } from "./verify-bank-account.component";
@if (paymentMethod) {
@switch (paymentMethod.type) {
@case ("bankAccount") {
@if (!paymentMethod.verified) {
<app-verify-bank-account
[subscriber]="subscriber"
(verified)="onBankAccountVerified($event)"
>
</app-verify-bank-account>
@if (paymentMethod.hostedVerificationUrl) {
<p>
{{ "verifyBankAccountWithStripe" | i18n }}
<a
bitLink
rel="noreferrer"
target="_blank"
[attr.href]="paymentMethod.hostedVerificationUrl"
>{{ "verifyNow" | i18n }}</a
>
</p>
}
<p>
<i class="bwi bwi-fw bwi-billing"></i>
{{ paymentMethod.bankName }}, *{{ paymentMethod.last4 }}
@if (!paymentMethod.verified) {
@if (paymentMethod.hostedVerificationUrl) {
<span>- {{ "unverified" | i18n }}</span>
}
</p>
@@ -63,7 +67,7 @@ import { VerifyBankAccountComponent } from "./verify-bank-account.component";
</bit-section>
`,
standalone: true,
imports: [SharedModule, VerifyBankAccountComponent],
imports: [SharedModule],
})
export class DisplayPaymentMethodComponent {
@Input({ required: true }) subscriber!: BitwardenSubscriber;
@@ -96,8 +100,6 @@ export class DisplayPaymentMethodComponent {
}
};
onBankAccountVerified = (paymentMethod: MaskedPaymentMethod) => this.updated.emit(paymentMethod);
protected getBrandIconForCard = (): string | null => {
if (this.paymentMethod?.type !== "card") {
return null;