,
fromText,
)
data PaymentRequestConfig
= PaymentRequestConfig
{ _aftokHost :: Text,
Config
= Config
{ _smtpConfig :: AC.SmtpConfig,
readConfig =<< C.load [C.Required $ encodeString cfgFile]
Config
<$> (AC.readSmtpConfig $ C.subconfig "smtp" cfg)
<*> (AC.readBillingConfig $ C.subconfig "billing" cfg)
<*> (AC.readConnectInfo $ C.subconfig "db" cfg)
<*> (readPaymentRequestConfig $ C.subconfig "payment_requests" cfg)
PaymentRequestConfig
<$> C.require cfg "aftok_host"
<*> (fromText <$> C.require cfg "template_path")
<*> (Email <$> C.require cfg "payment_from_email")
( encodeString