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.

Source

Summary

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

bill_to(transaction, address)

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)

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)

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)

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)

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 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

ship_to(transaction, address)

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

Types

t :: Map

Functions

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

Specs:

Add items to the order.

Source
auth_capture(transaction)

Specs:

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

Source
auth_code(transaction, code)

Specs:

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

Source
auth_only(transaction)

Specs:

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

Source
bill_to(transaction, address)

Specs:

Adds billing information.

Source
capture_only(transaction)

Specs:

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

Source
customer_business(transaction, id, email)

Specs:

Adds customer information for a business.

Source
customer_individual(transaction, id, email)

Specs:

Adds customer information for an individual.

Source
customer_ip(transaction, ip)

Specs:

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.

Source
device_air_pay(transaction)

Specs:

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

Source
device_dial_terminal(transaction)

Specs:

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

Source
device_electronic_cash_register(transaction)

Specs:

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

Source
device_personal_computer(transaction)

Specs:

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

Source
device_self_service_terminal(transaction)

Specs:

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

Source
device_unattended_terminal(transaction)

Specs:

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

Source
device_unknown(transaction)

Specs:

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

Source
device_virtual_terminal(transaction)

Specs:

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

Source
device_website(transaction)

Specs:

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

Source
device_wireless_pos(transaction)

Specs:

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

Source
disable_duplicate_window(transaction)

Specs:

Disable transaction setting “duplicateWindow”.

Source
disable_email_customer(transaction)

Specs:

Disable transaction setting “emailCustomer”.

Source
disable_partial_auth(transaction)

Specs:

Disable transaction setting “allowPartialAuth”.

Source
disable_recurring_billing(transaction)

Specs:

Disable transaction setting “recurringBilling”.

Source
disable_test_request(transaction)

Specs:

Disable transaction setting “testRequest”.

Source
duty(transaction, name, description, amount)

Specs:

Set duty information.

Source
employee_id(transaction, employee_id)

Specs:

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

Source
enable_duplicate_window(transaction)

Specs:

Enable transaction setting “duplicateWindow”.

Source
enable_email_customer(transaction)

Specs:

Enable transaction setting “emailCustomer”.

Source
enable_partial_auth(transaction)

Specs:

Enable transaction setting “allowPartialAuth”.

Source
enable_recurring_billing(transaction)

Specs:

Enable transaction setting “recurringBilling”.

Source
enable_test_request(transaction)

Specs:

Enable transaction setting “testRequest”.

Source
market_ecommerce(transaction)

Specs:

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

Source
market_moto(transaction)

Specs:

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

Source
market_retail(transaction)

Specs:

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

Source
new(amount \\ nil)

Specs:

Creates a new transaction.

Source
not_tax_exempt(transaction)

Specs:

Indicates NOT exempted from tax.

Source
opaque_data_descriptor(transaction, descriptor)

Specs:

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.

Source
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.

Source
order(transaction, invoice_number, description)

Specs:

Set order information.

Source
pay_with_apple_pay(transaction, data)

Specs:

Pays this transaction with Apple Pay.

Source
pay_with_bank_account(transaction, account)

Specs:

Pays this transaction with a bank account.

Source
pay_with_card(transaction, card)

Specs:

Pays this transaction with credit card.

Source
pay_with_customer_profile(transaction, customer_profile_id, payment_profile_id, shipping_address_id \\ nil, card_code \\ nil)

Specs:

Pay with a customer profile ID.

Source
po_number(transaction, po_number)

Specs:

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.

Source
prior_auth_capture(transaction)

Specs:

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

Source
ref_transaction_id(transaction, id)

Specs:

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

Source
refund(transaction, transaction_id)

Specs:

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

Source
run(transaction)

Runs the transaction.

Source
ship_to(transaction, address)

Specs:

Adds shipping information.

Source
shipping_cost(transaction, name, description, amount)

Specs:

Set shipping cost information.

Source
tax(transaction, name, description, amount)

Specs:

Set tax information.

Source
tax_exempt(transaction)

Specs:

Indicates exempted from tax.

Source
to_xml(transaction)

Specs:

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

Source
user_fields(transaction, fields)

Specs:

Set arbitrary user fields.

Source
void(transaction, transaction_id)

Specs:

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

Source