elixir_authorizenet v0.4.0 AuthorizeNet.Transaction

Transaction.

Copyright 2015 Marcelo Gornstein marcelog@gmail.com

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Summary

Functions

“AUTH AND CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Authorization code. This may have been obtained from a verbal authorization or through another channel

“AUTH ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Adds billing information

“CAPTURE ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Adds customer information for a business

Adds customer information for an individual

IP address of customer initiating the transaction. If this value is not passed, it will default to 255.255.255.255. Required only when the merchant is using customer IP based AFDS filters

Sets device type: 6 - AirPay. This is part of the “retail” field, that needs device type and also market type

Sets device type: 9 - Dial Terminal. This is part of the “retail” field, that needs device type and also market type

Sets device type: 4 - Electronic Cash Register. This is part of the “retail” field, that needs device type and also market type

Sets device type: 5 - Personal Computer- Based Terminal. This is part of the “retail” field, that needs device type and also market type

Sets device type: 3 - Self Service Terminal. This is part of the “retail” field, that needs device type and also market type

Sets device type: 2 - Unattended Terminal. This is part of the “retail” field, that needs device type and also market type

Sets device type: 1 - Unknown. This is part of the “retail” field, that needs device type and also market type

Sets device type: 10 - Virtual Terminal. This is part of the “retail” field, that needs device type and also market type

Sets device type: 8 - Website. This is part of the “retail” field, that needs device type and also market type

Sets device type: 7 - Wireless POS. This is part of the “retail” field, that needs device type and also market type

Disable transaction setting “duplicateWindow”

Disable transaction setting “emailCustomer”

Disable transaction setting “allowPartialAuth”

Disable transaction setting “recurringBilling”

Disable transaction setting “testRequest”

Set employeeId. Merchant-assigned employee ID. Required only if your payment processor is EVO

Enable transaction setting “duplicateWindow”

Enable transaction setting “emailCustomer”

Enable transaction setting “allowPartialAuth”

Enable transaction setting “recurringBilling”

Enable transaction setting “testRequest”

Sets market type: 0 - ecommerce. This is part of the “retail” field, that needs device type and also market type

Sets market type: 1 - motto. This is part of the “retail” field, that needs device type and also market type

Sets market type: 2 - retail. This is part of the “retail” field, that needs device type and also market type

Creates a new transaction

Indicates NOT exempted from tax

128 characters. Meta data used to specify how the request should be processed. The value of dataDescriptor is based on the source of the opaqueData dataValue

8192 characters Base-64 encoded data that contains encrypted payment data. The payment gateway expects the encrypted payment data and meta data for the encryption keys

Pays this transaction with Apple Pay

Pays this transaction with a bank account

Pays this transaction with credit card

The merchant-assigned purchase order number. Purchase order number must be created dynamically on the merchant’s server or provided on a per-transaction basis. The payment gateway does not perform this function

“PRIOR AUTH CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Transaction ID of the original partial authorization transaction. Required only for refundTransaction, priorAuthCaptureTransaction, and voidTransaction. Do not include this field if you are providing splitTenderId

“REFUND” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Runs the transaction

Adds shipping information

Indicates exempted from tax

Renders the given transaction structure as a structure suitable to be rendered as xml

Set arbitrary user fields

“VOID” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Types

t()
t() :: Map

Functions

add_item(transaction, id, name, description, qty, unit_price)

Add items to the order.

auth_capture(transaction)

“AUTH AND CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

auth_code(transaction, code)

Authorization code. This may have been obtained from a verbal authorization or through another channel.

auth_only(transaction)

“AUTH ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

Adds billing information.

capture_only(transaction)

“CAPTURE ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

customer_business(transaction, id, email)

Adds customer information for a business.

customer_individual(transaction, id, email)

Adds customer information for an individual.

customer_ip(transaction, ip)

IP address of customer initiating the transaction. If this value is not passed, it will default to 255.255.255.255. Required only when the merchant is using customer IP based AFDS filters.

device_air_pay(transaction)

Sets device type: 6 - AirPay. This is part of the “retail” field, that needs device type and also market type.

device_dial_terminal(transaction)

Sets device type: 9 - Dial Terminal. This is part of the “retail” field, that needs device type and also market type.

device_electronic_cash_register(transaction)
device_electronic_cash_register(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t

Sets device type: 4 - Electronic Cash Register. This is part of the “retail” field, that needs device type and also market type.

device_personal_computer(transaction)

Sets device type: 5 - Personal Computer- Based Terminal. This is part of the “retail” field, that needs device type and also market type.

device_self_service_terminal(transaction)
device_self_service_terminal(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t

Sets device type: 3 - Self Service Terminal. This is part of the “retail” field, that needs device type and also market type.

device_unattended_terminal(transaction)

Sets device type: 2 - Unattended Terminal. This is part of the “retail” field, that needs device type and also market type.

device_unknown(transaction)

Sets device type: 1 - Unknown. This is part of the “retail” field, that needs device type and also market type.

device_virtual_terminal(transaction)

Sets device type: 10 - Virtual Terminal. This is part of the “retail” field, that needs device type and also market type.

device_website(transaction)

Sets device type: 8 - Website. This is part of the “retail” field, that needs device type and also market type.

device_wireless_pos(transaction)

Sets device type: 7 - Wireless POS. This is part of the “retail” field, that needs device type and also market type.

disable_duplicate_window(transaction)

Disable transaction setting “duplicateWindow”.

disable_email_customer(transaction)

Disable transaction setting “emailCustomer”.

disable_partial_auth(transaction)

Disable transaction setting “allowPartialAuth”.

disable_recurring_billing(transaction)

Disable transaction setting “recurringBilling”.

disable_test_request(transaction)

Disable transaction setting “testRequest”.

duty(transaction, name, description, amount)

Set duty information.

employee_id(transaction, employee_id)

Set employeeId. Merchant-assigned employee ID. Required only if your payment processor is EVO.

enable_duplicate_window(transaction)

Enable transaction setting “duplicateWindow”.

enable_email_customer(transaction)

Enable transaction setting “emailCustomer”.

enable_partial_auth(transaction)

Enable transaction setting “allowPartialAuth”.

enable_recurring_billing(transaction)

Enable transaction setting “recurringBilling”.

enable_test_request(transaction)

Enable transaction setting “testRequest”.

market_ecommerce(transaction)

Sets market type: 0 - ecommerce. This is part of the “retail” field, that needs device type and also market type.

market_moto(transaction)

Sets market type: 1 - motto. This is part of the “retail” field, that needs device type and also market type.

market_retail(transaction)

Sets market type: 2 - retail. This is part of the “retail” field, that needs device type and also market type.

new(amount \\ nil)
new(Float | nil) :: AuthorizeNet.Transaction.t

Creates a new transaction.

not_tax_exempt(transaction)

Indicates NOT exempted from tax.

opaque_data_descriptor(transaction, descriptor)

128 characters. Meta data used to specify how the request should be processed. The value of dataDescriptor is based on the source of the opaqueData dataValue.

opaque_data_value(transaction, value)

8192 characters Base-64 encoded data that contains encrypted payment data. The payment gateway expects the encrypted payment data and meta data for the encryption keys.

order(transaction, invoice_number, description)

Set order information.

pay_with_apple_pay(transaction, data)

Pays this transaction with Apple Pay.

pay_with_bank_account(transaction, account)
pay_with_bank_account(AuthorizeNet.Transaction.t, AuthorizeNet.BankAccount) :: AuthorizeNet.Transaction.t

Pays this transaction with a bank account.

pay_with_card(transaction, card)

Pays this transaction with credit card.

pay_with_customer_profile(transaction, customer_profile_id, payment_profile_id, shipping_address_id \\ nil, card_code \\ nil)
pay_with_customer_profile(AuthorizeNet.Card.t, Integer, Integer, Integer | nil, String.t | nil) :: AuthorizeNet.Card.t

Pay with a customer profile ID.

po_number(transaction, po_number)

The merchant-assigned purchase order number. Purchase order number must be created dynamically on the merchant’s server or provided on a per-transaction basis. The payment gateway does not perform this function.

prior_auth_capture(transaction)

“PRIOR AUTH CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

ref_transaction_id(transaction, id)

Transaction ID of the original partial authorization transaction. Required only for refundTransaction, priorAuthCaptureTransaction, and voidTransaction. Do not include this field if you are providing splitTenderId

refund(transaction, transaction_id)

“REFUND” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510

run(transaction)

Runs the transaction.

Adds shipping information.

shipping_cost(transaction, name, description, amount)

Set shipping cost information.

tax(transaction, name, description, amount)

Set tax information.

tax_exempt(transaction)

Indicates exempted from tax.

to_xml(transaction)

Renders the given transaction structure as a structure suitable to be rendered as xml.

user_fields(transaction, fields)

Set arbitrary user fields.

void(transaction, transaction_id)

“VOID” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510