-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.php
More file actions
167 lines (159 loc) · 6.31 KB
/
settings.php
File metadata and controls
167 lines (159 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
declare(strict_types=1);
use DI\ContainerBuilder;
use Mailer\Application\ConfigModels\Email;
use Monolog\Logger;
return function (ContainerBuilder $containerBuilder) {
// Global Settings Object
$containerBuilder->addDefinitions([
'settings' => [
'appEnv' => getenv('APP_ENV'),
'displayErrorDetails' => (getenv('APP_ENV') === 'local'),
/**
* 'emails' is an array of Email configs. @see Email for properties. Note that you cannot
* directly instantiate objects here without breaking PHP-DI compilation, so we use an array
* and do it at runtime.
*/
'emails' => [
[
'templateKey' => 'donor-donation-success',
'subject' => 'Thanks for your donation, %s!',
'subjectParams' => ['donorGreetingName'],
'requiredParams' => [
'campaignName',
'charityName',
'currencyCode',
'donationAmount',
'paymentMethodType',
'donorGreetingName',
'donorLastName',
'giftAidAmountClaimed',
'matchedAmount',
'tipAmount',
'totalChargedAmount',
'totalCharityValueAmount',
'transactionId',
],
],
[
'templateKey' => 'pledger-success',
'subject' => 'Thank you for your pledge',
'subjectParams' => [],
'requiredParams' => [
'campaignEndDate',
'campaignName',
'campaignPledgeSubmissionDeadline',
'campaignStartDate',
'charityName',
'currencyCode',
'pledgeAmount',
'pledgerFirstName',
'pledgerLastName',
],
],
[
'templateKey' => 'donor-donation-refund-full',
'subject' => 'Full Donation Refund',
'subjectParams' => [],
'requiredParams' => [
'transactionId',
'charityName',
'donationAmount',
'donationTipAmount',
],
],
[
'templateKey' => 'donor-regular-donation-failed-payment',
'subject' => "We couldn't collect your regular donation for %s",
'subjectParams' => ['charityName'],
'requiredParams' => [
'charityName',
],
],
[
'templateKey' => 'donor-donation-refund-tip',
'subject' => 'Tip Refund',
'subjectParams' => [],
'requiredParams' => [
'transactionId',
'charityName',
'donationTipAmount',
],
],
[
'templateKey' => 'donor-funds-thanks',
'subject' => 'Confirmation of Donation Funds Received',
'subjectParams' => [],
'requiredParams' => [
'transferAmount',
],
],
[
'templateKey' => 'donor-mandate-confirmation',
'subject' => 'Thanks for setting up a regular gift to %s',
'subjectParams' => ['charityName'],
'requiredParams' => [
'charityName',
'campaignName',
'signupDate',
'donorName',
'schedule',
'nextPaymentDate',
'amount',
'giftAidValue',
'totalIncGiftAid',
'totalCharged',
'firstDonation',
],
],
[
'templateKey' => 'donor-registered',
'subject' => 'You are registered with Big Give',
'subjectParams' => [],
'requiredParams' => [
'donorEmail'
],
],
[
'templateKey' => 'password-reset-requested',
'subject' => 'Reset your password for Big Give',
'subjectParams' => [],
'requiredParams' => [
'lastName',
'resetLink',
],
],
[
'templateKey' => 'new-account-email-verification',
'subject' => '%s is your Big Give verification code',
'subjectParams' => ['secretCode'],
'requiredParams' => [
'secretCode',
],
],
[
'templateKey' => 'new-account-email-already-registered',
'subject' => 'You are already registered with Big Give',
'subjectParams' => [],
'requiredParams' => [
],
],
],
'logger' => [
'name' => 'mailer',
'path' => 'php://stdout',
'level' => Logger::DEBUG,
],
'mailer' => [
// Used for various transport configuration by Symfony Mailer.
// See https://symfony.com/doc/current/mailer.html#using-built-in-transports
'dsn' => getenv('MAILER_DSN'),
],
'twig' => [
'templatePath' => dirname(__DIR__) . '/templates',
'cachePath' => dirname(__DIR__) . '/var/twig',
'debug' => (getenv('APP_ENV') === 'local'), // Disables caching & enables debug output
],
],
]);
};