mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +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:
@@ -30,4 +30,7 @@ export enum NotificationType {
|
||||
NotificationStatus = 21,
|
||||
|
||||
RefreshSecurityTasks = 22,
|
||||
|
||||
OrganizationBankAccountVerified = 23,
|
||||
ProviderBankAccountVerified = 24,
|
||||
}
|
||||
|
||||
@@ -63,6 +63,12 @@ export class NotificationResponse extends BaseResponse {
|
||||
case NotificationType.NotificationStatus:
|
||||
this.payload = new EndUserNotificationResponse(payload);
|
||||
break;
|
||||
case NotificationType.OrganizationBankAccountVerified:
|
||||
this.payload = new OrganizationBankAccountVerifiedPushNotification(payload);
|
||||
break;
|
||||
case NotificationType.ProviderBankAccountVerified:
|
||||
this.payload = new ProviderBankAccountVerifiedPushNotification(payload);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -158,3 +164,23 @@ export class OrganizationCollectionSettingChangedPushNotification extends BaseRe
|
||||
this.limitCollectionDeletion = this.getResponseProperty("LimitCollectionDeletion");
|
||||
}
|
||||
}
|
||||
|
||||
export class OrganizationBankAccountVerifiedPushNotification extends BaseResponse {
|
||||
organizationId: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.organizationId = this.getResponseProperty("OrganizationId");
|
||||
}
|
||||
}
|
||||
|
||||
export class ProviderBankAccountVerifiedPushNotification extends BaseResponse {
|
||||
providerId: string;
|
||||
adminId: string;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
this.providerId = this.getResponseProperty("ProviderId");
|
||||
this.adminId = this.getResponseProperty("AdminId");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,6 +298,17 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer
|
||||
case NotificationType.SyncOrganizationCollectionSettingChanged:
|
||||
await this.syncService.fullSync(true);
|
||||
break;
|
||||
case NotificationType.OrganizationBankAccountVerified:
|
||||
this.messagingService.send("organizationBankAccountVerified", {
|
||||
organizationId: notification.payload.organizationId,
|
||||
});
|
||||
break;
|
||||
case NotificationType.ProviderBankAccountVerified:
|
||||
this.messagingService.send("providerBankAccountVerified", {
|
||||
providerId: notification.payload.providerId,
|
||||
adminId: notification.payload.adminId,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user