Skip to content

Commit 05880ac

Browse files
authored
Merge pull request #1007 from OpenSourceFellows/email_feature_part_1
Email feature part 1
2 parents 0a41148 + d22d96d commit 05880ac

30 files changed

+1368
-705
lines changed

.env

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ TWILIO_AUTH_TOKEN=TWILIO_SECRET_KEY
3434
VUE_APP_CAMPAIGN_MODE=single
3535
VUE_APP_FEATURED_CAMPAIGN=1
3636

37+
VUE_APP_EMPTY_TRANSACTIONS=on
38+
VUE_APP_SHOW_EXT_DONATION=false
39+
VUE_APP_EXT_DONATION_URL=
40+
VUE_APP_NO_COST_MAIL=true
41+
3742
POSTGRES_USER=postgres
3843
POSTGRES_PASSWORD=postgres
3944
POSTGRES_PORT=5432
40-
POSTGRES_HOST=amplify_db
45+
POSTGRES_HOST=amplify_db

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package-lock.json
88
.env.test
99
.env.local
1010
.env.*.local
11+
.env.test
1112

1213
# Log files
1314
npm-debug.log*

package-lock.json

Lines changed: 143 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
"@fortawesome/free-regular-svg-icons": "^6.2.0",
5050
"@fortawesome/free-solid-svg-icons": "^6.2.0",
5151
"@fortawesome/vue-fontawesome": "^2.0.8",
52+
"@sendgrid/client": "^8.1.3",
53+
"@sendgrid/mail": "^8.1.3",
5254
"@stripe/stripe-js": "^1.35.0",
5355
"@vue-stripe/vue-stripe": "^4.4.4",
5456
"axios": "^0.27.2",
@@ -60,6 +62,7 @@
6062
"express": "^4.18.1",
6163
"express-jwt": "^8.4.0",
6264
"express-rate-limit": "^6.6.0",
65+
"handlebars": "^4.7.8",
6366
"jwks-rsa": "^2.1.4",
6467
"knex": "^2.4.2",
6568
"lob": "^6.6.3",

script/send-letters.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const axios = require('axios')
2+
const letterData = require('./catchup.js')
3+
4+
;(async () => {
5+
const data = JSON.parse(letterData)
6+
7+
for (const transaction of data) {
8+
try {
9+
const response = await axios.post(
10+
'https://amplify-hooks-0194518485a8.herokuapp.com/api/checkout/process-transaction',
11+
{
12+
data: {
13+
object: {
14+
id: transaction.stripe_id
15+
}
16+
},
17+
type: 'payment_intent.succeeded'
18+
}
19+
)
20+
21+
if (response.statusCode == 201) console.log(transaction.stripe_id)
22+
} catch (error) {
23+
console.error(error)
24+
}
25+
}
26+
})()

0 commit comments

Comments
 (0)