OpenNodex v0.1.1 OpenNodex.Event View Source

Documentation for OpenNodex.Event.

Link to this section Summary

Functions

Checks the validity of the order hash for the charge and api_key

Computes the order hash (in base 16) for the charge and api_key

Link to this section Functions

Link to this function

check_validity(charge, api_key) View Source

Checks the validity of the order hash for the charge and api_key.

## Examples

  iex> charge = %OpenNodex.Charge{
  ...>   id: "abbacadabba-d123-456a-baba-99bfdcfb16a1",
  ...>   hashed_order: "df873d17dd8b6335db232ed1c242d4df91b0dbe3b3f2baba67e7d38c43b8370c"
  ...> }
  iex> OpenNodex.Charge.check_validity(charge, "abbacadabba")
  true
Link to this function

order_hash(charge, api_key) View Source

Computes the order hash (in base 16) for the charge and api_key.

Examples

iex> charge = %OpenNodex.Charge{id: "abbacadabba-d123-456a-baba-99bfdcfb16a1"}
iex> OpenNodex.Charge.order_hash(charge, "abbacadabba")
"df873d17dd8b6335db232ed1c242d4df91b0dbe3b3f2baba67e7d38c43b8370c"