Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #419 from beabee-communityrm/chore/stripe-link-ps
Browse files Browse the repository at this point in the history
feat: show info about Stripe Link payment sources
  • Loading branch information
wpf500 authored May 9, 2024
2 parents d35d25b + e6f2801 commit ea3f07e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test": "jest --setupFiles dotenv/config"
},
"dependencies": {
"@beabee/beabee-common": "^0.20.7",
"@beabee/beabee-common": "^0.20.10",
"@captchafox/node": "^1.2.0",
"@inquirer/prompts": "^3.3.0",
"@sendgrid/mail": "^8.1.0",
Expand Down
7 changes: 7 additions & 0 deletions src/core/utils/payment/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export async function manadateToSource(
if (method.type === "card" && method.card) {
return {
method: PaymentMethod.StripeCard,
isLink: false,
last4: method.card.last4,
expiryMonth: method.card.exp_month,
expiryYear: method.card.exp_year
Expand All @@ -255,6 +256,12 @@ export async function manadateToSource(
payerEmail: method.paypal.payer_email || "",
payerId: method.paypal.payer_id || ""
};
} else if (method.type === "link" && method.link) {
return {
method: PaymentMethod.StripeCard,
isLink: true,
email: method.link.email || ""
};
}
}

Expand Down

0 comments on commit ea3f07e

Please sign in to comment.