yesod-mangopay 1.9.2 → 1.10
raw patch · 7 files changed
+33/−31 lines, 7 filesdep ~mangopay
Dependency ranges changed: mangopay
Files
- app/Foundation.hs +5/−5
- app/Handler/Account.hs +6/−6
- app/Handler/Card.hs +2/−1
- app/Handler/Home.hs +2/−2
- app/Handler/Transaction.hs +15/−14
- app/Handler/Wallet.hs +1/−1
- yesod-mangopay.cabal +2/−2
app/Foundation.hs view
@@ -27,12 +27,12 @@ -- starts running, such as database connections. Every handler will have -- access to the data present here. data App = App- { settings :: AppConfig DefaultEnv Extra- , getStatic :: Static -- ^ Settings for static file serving.+ { settings :: AppConfig DefaultEnv Extra+ , getStatic :: Static -- ^ Settings for static file serving. , httpManager :: Manager- , appLogger :: Logger- , appToken :: IORef (Maybe MangoPayToken) -- ^ the currently valid access token, if any- , appEvents :: IORef [Event] -- ^ the received events, for the moment stored into a list+ , appLogger :: Logger+ , appToken :: IORef (Maybe MangoPayToken) -- ^ the currently valid access token, if any+ , appEvents :: IORef [Event] -- ^ the received events, for the moment stored into a list } -- Set up i18n messages. See the message folder.
app/Handler/Account.hs view
@@ -10,7 +10,7 @@ getAccountsR :: AnyUserId -> Handler Html getAccountsR uid=do -- no paging, should be reasonable- accounts<-runYesodMPTToken $ getAll $ listAccounts uid+ accounts<-runYesodMPTToken $ getAll $ listAccounts uid (ByCreationDate ASC) defaultLayout $ do setTitleI MsgTitleAccounts $(widgetFile "accounts")@@ -48,10 +48,10 @@ -- | partial data for account data BankAccountPartial=BankAccountPartial {- bapTag :: Maybe Text- ,bapIBAN :: Text- ,bapBIC :: Text- ,bapOwnerName :: Text+ bapTag :: Maybe Text+ ,bapIBAN :: Text+ ,bapBIC :: Maybe Text+ ,bapOwnerName :: Text ,bapOwnerAddress :: Maybe Text } @@ -65,6 +65,6 @@ accountForm = renderDivs $ BankAccountPartial <$> aopt textField (localizedFS MsgAccountCustomData) Nothing <*> areq textField (localizedFS MsgAccountIBAN) Nothing- <*> areq textField (localizedFS MsgAccountBIC) Nothing+ <*> aopt textField (localizedFS MsgAccountBIC) Nothing <*> areq textField (localizedFS MsgAccountOwnerName) Nothing <*> aopt textField (localizedFS MsgAccountOwnerAddress) Nothing
app/Handler/Card.hs view
@@ -15,11 +15,12 @@ import Data.Text (pack) import Control.Arrow ((&&&)) + -- | get card list getCardsR :: AnyUserId -> Handler Html getCardsR uid=do -- no paging, should be reasonable- cards<-runYesodMPTToken $ getAll $ listCards uid+ cards<-runYesodMPTToken $ getAll $ listCards uid (ByCreationDate ASC) ((_,widget), enctype) <- generateFormGet currencyForm defaultLayout $ do setTitleI MsgTitleCards
app/Handler/Home.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE TupleSections, OverloadedStrings #-}+{-# LANGUAGE OverloadedStrings, TupleSections #-} -- | home and events pages module Handler.Home where @@ -13,7 +13,7 @@ getHomeR :: Handler Html getHomeR = do pg<-getPagination- usersL<-runYesodMPTToken $ listUsers pg+ usersL<-runYesodMPTToken $ listUsers (ByCreationDate DESC) pg -- pagination links let (previous,next)=getPaginationNav pg usersL let users=plData usersL
app/Handler/Transaction.hs view
@@ -8,12 +8,13 @@ import Data.Maybe (fromJust) import Control.Arrow ((&&&)) import Data.Text (pack)+import Data.Default -- | transaction list getTransactionsR :: AnyUserId -> Handler Html getTransactionsR uid= do pg<-getPagination- txsL<-runYesodMPTToken $ listTransactionsForUser uid pg+ txsL<-runYesodMPTToken $ listTransactionsForUser uid def (TxByCreationDate ASC) pg -- pagination links let (previous,next)=getPaginationNav pg txsL let txs=plData txsL@@ -25,8 +26,8 @@ -- | get payin form getPayinR :: AnyUserId -> Handler Html getPayinR uid=do- cards<-runYesodMPTToken $ getAll $ listCards uid- wallets<-runYesodMPTToken $ getAll $ listWallets uid+ cards<-runYesodMPTToken $ getAll $ listCards uid def+ wallets<-runYesodMPTToken $ getAll $ listWallets uid def (widget, enctype) <- generateFormPost $ payinInForm cards wallets defaultLayout $ do setTitleI MsgTitlePayIn@@ -35,8 +36,8 @@ -- | payin postPayinR :: AnyUserId -> Handler Html postPayinR uid=do- cards<-runYesodMPTToken $ getAll $ listCards uid- wallets<-runYesodMPTToken $ getAll $ listWallets uid+ cards<-runYesodMPTToken $ getAll $ listCards uid def+ wallets<-runYesodMPTToken $ getAll $ listWallets uid def ((result, widget), enctype) <- runFormPost $ payinInForm cards wallets case result of@@ -62,7 +63,7 @@ -- | get first transfer page: choose the target user getTransfer1R :: AnyUserId -> Handler Html getTransfer1R uid=do- users<-runYesodMPTToken $ getAll listUsers+ users<-runYesodMPTToken $ getAll $ listUsers def defaultLayout $ do setTitleI MsgTitleTransfer $(widgetFile "transfer1")@@ -70,8 +71,8 @@ -- | get second transfer page: choose between wallets getTransfer2R :: AnyUserId -> AnyUserId -> Handler Html getTransfer2R uid touid=do- fromWallets<-runYesodMPTToken $ getAll $ listWallets uid- toWallets<-runYesodMPTToken $ getAll $ listWallets touid+ fromWallets<-runYesodMPTToken $ getAll $ listWallets uid def+ toWallets<-runYesodMPTToken $ getAll $ listWallets touid def (widget, enctype) <- generateFormPost $ transferForm fromWallets toWallets defaultLayout $ do setTitleI MsgTitleTransfer@@ -80,8 +81,8 @@ -- | perfrm transfer postTransfer2R :: AnyUserId -> AnyUserId -> Handler Html postTransfer2R uid touid=do- fromWallets<-runYesodMPTToken $ getAll $ listWallets uid- toWallets<-runYesodMPTToken $ getAll $ listWallets touid+ fromWallets<-runYesodMPTToken $ getAll $ listWallets uid def+ toWallets<-runYesodMPTToken $ getAll $ listWallets touid def ((result, widget), enctype) <- runFormPost $ transferForm fromWallets toWallets case result of@@ -108,8 +109,8 @@ -- | get payout form getPayoutR :: AnyUserId -> Handler Html getPayoutR uid=do- wallets<-runYesodMPTToken $ getAll $ listWallets uid- accounts<-runYesodMPTToken $ getAll $ listAccounts uid+ wallets<-runYesodMPTToken $ getAll $ listWallets uid def+ accounts<-runYesodMPTToken $ getAll $ listAccounts uid def (widget, enctype) <- generateFormPost $ payoutForm wallets accounts defaultLayout $ do@@ -119,8 +120,8 @@ -- | payout postPayoutR :: AnyUserId -> Handler Html postPayoutR uid=do- wallets<-runYesodMPTToken $ getAll $ listWallets uid- accounts<-runYesodMPTToken $ getAll $ listAccounts uid+ wallets<-runYesodMPTToken $ getAll $ listWallets uid def+ accounts<-runYesodMPTToken $ getAll $ listAccounts uid def ((result, widget), enctype) <- runFormPost $ payoutForm wallets accounts case result of
app/Handler/Wallet.hs view
@@ -12,7 +12,7 @@ getWalletsR :: AnyUserId -> Handler Html getWalletsR uid=do -- no paging, should be reasonable- wallets<-runYesodMPTToken $ getAll $ listWallets uid+ wallets<-runYesodMPTToken $ getAll $ listWallets uid (ByCreationDate ASC) defaultLayout $ do setTitleI MsgTitleWallets $(widgetFile "wallets")
yesod-mangopay.cabal view
@@ -1,5 +1,5 @@ name: yesod-mangopay-version: 1.9.2+version: 1.10 cabal-version: >= 1.8 build-type: Simple author: JP Moresmau <jpmoresmau@gmail.com>@@ -37,7 +37,7 @@ hs-source-dirs: src build-depends: base >= 4 && < 5- , mangopay == 1.9.*+ , mangopay == 1.10.* , containers >= 0.5 && < 0.6 , http-conduit >= 2.0 && < 2.2 , http-types >= 0.8.2 && < 0.9