Skip to content

Commit 8341875

Browse files
authored
Merge pull request #193 from topcoder-platform/hotfix_PM-5564_business-verification
[HOTFIX] Handle business verification event
2 parents d414d19 + 5f38ee6 commit 8341875

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/api/webhooks/trolley/handlers/recipient-verification.handler.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ export class RecipientVerificationHandler {
2727
where: { trolley_id: payload.recipientId },
2828
});
2929

30-
if (payload.type !== RecipientVerificationType.individual) {
30+
if (
31+
![
32+
RecipientVerificationType.individual,
33+
RecipientVerificationType.business,
34+
].includes(payload.type)
35+
) {
3136
this.logger.log(
32-
`Handling only individual status updates, ignoring phone verification for recipient ${payload.recipientId}. Verification type: ${payload.type}.`,
37+
`Handling only individual/business status updates, ignoring phone verification for recipient ${payload.recipientId}. Verification type: ${payload.type}.`,
3338
);
3439
return;
3540
}

src/api/webhooks/trolley/handlers/recipient-verification.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export enum RecipientVerificationWebhookEvent {
55
export enum RecipientVerificationType {
66
phone = 'phone',
77
individual = 'individual',
8+
business = 'business',
89
}
910

1011
interface VerifiedIdentityData {

0 commit comments

Comments
 (0)