Payeezy v0.1.3 Payeezy.TestHelpers

Link to this section Summary

Link to this section Functions

Link to this function build_bypass()
build_bypass() :: any

Creates a Bypass listener to act as a double for the actual Payeezy GiftCard API endpoint

Link to this function purchase_failure_insufficient_funds(purchase_amount)
Link to this function purchase_failure_missing_cc_response_string()
purchase_failure_missing_cc_response_string() :: String.t
Link to this function simulate_balance_inquiry_and_purchase_insufficient_funds(bypass, balance)
simulate_balance_inquiry_and_purchase_insufficient_funds(any, String.t) :: no_return
Link to this function simulate_balance_inquiry_and_purchase_success(bypass, balance)
simulate_balance_inquiry_and_purchase_success(any, String.t) :: no_return
Link to this function simulate_service_down(bypass)
simulate_service_down(any) :: nil

Simulates that the provided Bypass listener is not accepting connections

Link to this function simulate_service_response(bypass, status, body, fun)
simulate_service_response(any, Plug.Conn.status, String.t, (Plug.Conn.t -> boolean)) :: no_return
Link to this function successful_balance_inquiry_response_string(current_balance)
successful_balance_inquiry_response_string(String.t) :: String.t
Link to this function successful_purchase_response_string(purchase_amount, current_balance, previous_balance)
successful_purchase_response_string(String.t, String.t, String.t) :: String.t
Link to this function successful_refund_response_string(refund_amount)
successful_refund_response_string(String.t) :: String.t
Link to this function successful_void_response_string(void_amount)