Elixir wrapper for Saferpay JSON API.
This library is in development and not yet ready!
The package can be installed by adding ex_saferpay to your list of dependencies in mix.exs:
def deps do
  [
    {:ex_saferpay, "~> 0.2"}
  ]
endThe docs can be found at https://hexdocs.pm/ex_saferpay.
config :ex_saferpay,
  environment: :test, # :test or :prod, default = :test
  authentication_method: :credentials, # :credentials or :client_ssl, default = :credentials
  client_key: {:file, path}, # Path to pem formatted key. Only required with auth method client_ssl
  client_certificate: {:file, path}, # Path to pem formatted certificate. Only required with auth method client_ssl
  username: "username", # Username for JSON API. Only required with auth method credentials
  password: "password", # Password for JSON API. Only required with auth method credentials
  customer_id: 7, # Customer ID
  terminal_id: 7 # Terminal IDTo test the library, a test account has to be acquired from Saferpay. https://test.saferpay.com/BO/SignUp?lang=de
Those values can be obtained from the registration email form the test account creation.
SAFERPAY_USERNAME- API usernameSAFERPAY_PASSWORD- API passwordSAFERPAY_CUSTOMER_ID- Customer IDSAFERPAY_TERMINAL_ID- Terminal ID
The library has included response mocking capability. To see how to use it, look at existing tests.
There are mix commands to manage the mock responses.