Skip to content

Commit eb344d9

Browse files
committed
CC the treasurer on successful payments
1 parent 85735e0 commit eb344d9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/api/routes/stripe.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ import {
1717
StripeLinkCreateParams,
1818
} from "api/functions/stripe.js";
1919
import { getSecretValue } from "api/plugins/auth.js";
20-
import { environmentConfig, genericConfig } from "common/config.js";
20+
import {
21+
environmentConfig,
22+
genericConfig,
23+
notificationRecipients,
24+
} from "common/config.js";
2125
import {
2226
BaseError,
2327
DatabaseFetchError,
@@ -570,6 +574,10 @@ Please contact Officer Board with any questions.
570574
},
571575
payload: {
572576
to: [unmarshalledEntry.userId],
577+
cc: [
578+
notificationRecipients[fastify.runEnvironment]
579+
.Treasurer,
580+
],
573581
subject: `Payment Recieved for Invoice ${unmarshalledEntry.invoiceId}`,
574582
content: `
575583
ACM @ UIUC has received ${paidInFull ? "full" : "partial"} payment for Invoice ${unmarshalledEntry.invoiceId} (${withCurrency} paid by ${name}, ${email}).

src/common/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,20 @@ type NotificationRecipientsType = {
176176
[env in RunEnvironment]: {
177177
OfficerBoard: string;
178178
InfraChairs: string;
179+
Treasurer: string;
179180
};
180181
};
181182

182183
const notificationRecipients: NotificationRecipientsType = {
183184
dev: {
184185
OfficerBoard: '[email protected]',
185186
InfraChairs: '[email protected]',
187+
Treasurer: '[email protected]'
186188
},
187189
prod: {
188190
OfficerBoard: '[email protected]',
189191
InfraChairs: '[email protected]',
192+
Treasurer: '[email protected]'
190193
}
191194
}
192195

0 commit comments

Comments
 (0)