Skip to content

Commit

Permalink
changed to config
Browse files Browse the repository at this point in the history
  • Loading branch information
arjun289 committed Dec 14, 2017
1 parent 8b8820d commit 7a9c41e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/kuber_hex/gateways/authorize_net.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ defmodule Kuber.Hex.Gateways.AuthorizeNet do
and transactionKey
"""
def authenticate(opts) do
case Keyword.fetch(opts, :required_config) do
case Keyword.fetch(opts, :config) do
{:ok, config} ->
data = add_auth_request(config)
response_data = commit(:post, data)
Expand Down Expand Up @@ -130,7 +130,7 @@ defmodule Kuber.Hex.Gateways.AuthorizeNet do
# function for formatting the request as an xml for purchase and authorize method
defp add_auth_purchase(amount, payment, opts, transaction_type) do
element(:createTransactionRequest, %{xmlns: @aut_net_namespace}, [
add_merchant_auth(opts[:required_config]),
add_merchant_auth(opts[:config]),
add_order_id(opts),
add_purchase_transaction_request(amount, transaction_type, payment, opts),
])
Expand All @@ -140,7 +140,7 @@ defmodule Kuber.Hex.Gateways.AuthorizeNet do
# function for formatting the request for normal capture
defp normal_capture(amount, id, opts, transaction_type) do
element(:createTransactionRequest, %{xmlns: @aut_net_namespace}, [
add_merchant_auth(opts[:required_config]),
add_merchant_auth(opts[:config]),
add_order_id(opts),
add_capture_transaction_request(amount, id, transaction_type, opts),
])
Expand Down

0 comments on commit 7a9c41e

Please sign in to comment.