diff --git a/src/PaymentServer/Processors/Stripe.hs b/src/PaymentServer/Processors/Stripe.hs index 377408037ad9d893decce68504fe03c1b9f4441d..26bd10de5d9a568010f5519c43ed4c2cb5e9ade9 100644 --- a/src/PaymentServer/Processors/Stripe.hs +++ b/src/PaymentServer/Processors/Stripe.hs @@ -101,8 +101,8 @@ getVoucher (MetaData []) = Nothing getVoucher (MetaData (("Voucher", value):xs)) = Just value getVoucher (MetaData (x:xs)) = getVoucher (MetaData xs) -stripeServer :: VoucherDatabase d => d -> StripeSecretKey -> Server StripeAPI -stripeServer d key = webhook d +stripeServer :: VoucherDatabase d => StripeSecretKey -> d -> Server StripeAPI +stripeServer key d = webhook d :<|> charge d key -- | Process charge succeeded events diff --git a/src/PaymentServer/Server.hs b/src/PaymentServer/Server.hs index bfef18bb7a6a3b9104d7e589395146a8c126b4a1..615814743e63f90181919413fb32f73383849774 100644 --- a/src/PaymentServer/Server.hs +++ b/src/PaymentServer/Server.hs @@ -42,7 +42,7 @@ type PaymentServerAPI -- | Create a server which uses the given database. paymentServer :: VoucherDatabase d => ByteString -> Issuer -> d -> Server PaymentServerAPI paymentServer key issuer database = - stripeServer database key + stripeServer key database :<|> redemptionServer issuer database paymentServerAPI :: Proxy PaymentServerAPI