# `Worldpay.WPG.Parser`
[🔗](https://github.com/iamkanishka/worldpay/blob/v1.0.0/lib/worldpay/wpg/wpg.ex#L290)

Parses WPG XML responses into string-keyed maps.

# `last_event`

```elixir
@spec last_event(%{required(String.t()) =&gt; term()}) :: String.t() | nil
```

Extract the last event from a parsed WPG response map.

# `order_code`

```elixir
@spec order_code(%{required(String.t()) =&gt; term()}) :: String.t() | nil
```

Extract the order code from a parsed WPG response map.

# `parse`

```elixir
@spec parse(String.t()) ::
  {:ok, %{required(String.t()) =&gt; term()}}
  | {:error, {:xml_parse_error, Exception.t()}}
```

Parse a WPG XML response.

# `risk_score`

```elixir
@spec risk_score(%{required(String.t()) =&gt; term()}) :: String.t() | nil
```

Extract the FraudSight message from a WPG response map.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
