Skip to content

Commit 15bacc4

Browse files
authored
Merge pull request #33 from topcoder-platform/trolley-widget-fixes
when recipient is found in trolley, update referenceId
2 parents 0bd4e2d + 75de5e4 commit 15bacc4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/api/payment-providers/trolley.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ export class TrolleyService {
4747
// make sure it's same email address
4848
foundRecipient[0].email === user.email
4949
) {
50+
if (foundRecipient[0].referenceId !== user.id) {
51+
await this.trolley.client.recipient.update(foundRecipient[0].id, {
52+
referenceId: user.id,
53+
});
54+
}
55+
5056
return foundRecipient[0];
5157
}
5258

0 commit comments

Comments
 (0)