git.iko.soy/typeable/connexpay
on master help sign in
Better documentation.
commit9a555e853d48429c9be0d0da7add42fab0c0ecbe authorNick <nick@typeable.io> dateFri 9 Aug 2024, 14:28 (2 years ago) parent3a34828
2 files changed+24−1
README.org+23 connexpay/src/Tool.hs+1−1
README.org+23
@@ -28,6 +28,29 @@ NOTE:
2828'PaymentError' type isn't used yet, but it will after more testing.
2929Connexpay test environment doesn't seem to report errors adequately.
3030
31+* The tool
32+
33+This repo provides a command line tool to quickly test the API. You can run it with ~stack run~.
34+Examples:
35+
36+ - ~stack run -- -c ./config.yaml auth CARDNUMBER "NAME" MMYY CVV SUM~
37+ - ~stack run -- -c ./config.yaml capture SALEGUID~
38+ - ~stack run -- -c ./config.yaml void SALEGUID~
39+ - ~stack run -- -c ./config.yaml cancel SALEGUID~
40+
41+Configuration file must include the values provided to you by Connexpay:
42+
43+#+begin_src
44+login: <login>
45+password: <password>
46+device_guid: <device guid>
47+host: <hostname>
48+
49+use_tls: true # Whether or not to use TLS connection
50+proxy_host: 127.0.0.1 # Optional, if you want to proxy your requests for debugging purposes
51+proxy_port: 8080
52+#+end_src
53+
3154* Links
3255
3356Credit card sales API: https://docs.connexpay.com/reference/credit-card-sales
connexpay/src/Tool.hs+1−1
@@ -64,7 +64,7 @@ writeLog :: Text -> IO ()
6464writeLog msg = Text.putStrLn ("Connexpay log: " <> msg)
6565
6666main :: IO ()
67−main = do cmdLine <- execParser (info cmdParser mempty)
67+main = do cmdLine <- execParser (info (cmdParser <**> helper) mempty)
6868 cnf :: Config <- decodeFileThrow cmdLine.configPath
6969 mgr <- fromMaybe newTlsManager
7070 $ do host <- cnf.proxy_host