packages feed

paypal-adaptive-hoops 0.6.0.0 → 0.7.0.0

raw patch · 2 files changed

+8/−9 lines, 2 filesdep −http-typesPVP ok

version bump matches the API change (PVP)

Dependencies removed: http-types

API changes (from Hackage documentation)

- Web.PayPal.Adaptive: AeNoResponse :: AdaptiveErr

Files

paypal-adaptive-hoops.cabal view
@@ -1,5 +1,5 @@ name:                 paypal-adaptive-hoops-version:              0.6.0.0+version:              0.7.0.0 author:               Ian Grant Jeffries maintainer:           ian@housejeffries.com category:             Web@@ -30,7 +30,6 @@                     , data-default >= 0.5   && < 0.6                     , errors       >= 1.4   && < 1.5                     , http-client  >= 0.4.2 && < 0.5-                    , http-types   >= 0.8   && < 0.9                     , lens         >= 4.6   && < 4.8                     , lens-aeson   >= 1.0   && < 1.1                     , text         >= 1.1   && < 1.3
src/Web/PayPal/Adaptive/Core.hs view
@@ -24,7 +24,6 @@ import           Data.Text.Read import           Data.Traversable import qualified Data.Vector          as V-import           Network.HTTP.Client  (HttpException (NoResponseDataReceived)) import           Network.Wreq  --------------------------------------------------@@ -61,8 +60,7 @@         PpSandbox    -> "https://svcs.sandbox.paypal.com/AdaptivePayments/"         PpProduction -> "https://svcs.paypal.com/AdaptivePayments/" -    handler :: HttpException -> IO (Either AdaptiveErr (Response ByteString))-    handler NoResponseDataReceived = return (Left AeNoResponse)+    handler :: SomeException -> IO (Either AdaptiveErr (Response ByteString))     handler e = return . Left . AeConnectionErr . T.pack . show $ e      opts :: Options@@ -102,13 +100,15 @@ -- that this library doesn't support sending in the first place. -- TODO: is this actually how we're using it? ----- AeNoSuchEmail is raised when the CreatePayment sender--- email doesn't exist.+-- Both AeInvalidCredentials and AeNoSuchEmail are just+-- a convenient wrapper around certain AeErrCodes. data AdaptiveErr-  = AeNoResponse-  | AeConnectionErr   Text+  = AeConnectionErr   Text   | AeDecodeFailed    ByteString Text+  -- | AeInvalidCredentials just a wrapper around an AeErrCodes Int.   | AeInvalidCredentials+  -- | AeNoSuchEmail is just a wrapper around an AeErrCodes Int.+  -- It's raised when the CreatePayment sender email doesn't exist.   | AeNoSuchEmail   | AeErrCodes        [Int]   | AePending         PayResp