Worldpay.WPG.Parser (Worldpay v1.0.0)

Copy Markdown View Source

Parses WPG XML responses into string-keyed maps.

Summary

Functions

Extract the last event from a parsed WPG response map.

Extract the order code from a parsed WPG response map.

Parse a WPG XML response.

Extract the FraudSight message from a WPG response map.

Functions

last_event(parsed)

@spec last_event(%{required(String.t()) => term()}) :: String.t() | nil

Extract the last event from a parsed WPG response map.

order_code(parsed)

@spec order_code(%{required(String.t()) => term()}) :: String.t() | nil

Extract the order code from a parsed WPG response map.

parse(xml)

@spec parse(String.t()) ::
  {:ok, %{required(String.t()) => term()}}
  | {:error, {:xml_parse_error, Exception.t()}}

Parse a WPG XML response.

risk_score(parsed)

@spec risk_score(%{required(String.t()) => term()}) :: String.t() | nil

Extract the FraudSight message from a WPG response map.