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↑
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
Specs:
- add_item(AuthorizeNet.Transaction.t, String.t, String.t, String.t, Integer, Float) :: AuthorizeNet.Transaction.t
Add items to the order.
Specs:
- auth_capture(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
“AUTH AND CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510
Specs:
- auth_code(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
Authorization code. This may have been obtained from a verbal authorization or through another channel.
Specs:
- auth_only(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
“AUTH ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510
Specs:
Adds billing information.
Specs:
- capture_only(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
“CAPTURE ONLY” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510
Specs:
- customer_business(AuthorizeNet.Transaction.t, String.t, String.t) :: AuthorizeNet.Transaction.t
Adds customer information for a business.
Specs:
- customer_individual(AuthorizeNet.Transaction.t, String.t, String.t) :: AuthorizeNet.Transaction.t
Adds customer information for an individual.
Specs:
- customer_ip(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
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.
Specs:
- device_air_pay(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 6 - AirPay. This is part of the “retail” field, that needs device type and also market type.
Specs:
- device_dial_terminal(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 9 - Dial Terminal. This is part of the “retail” field, that needs device type and also market type.
Specs:
- 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.
Specs:
- device_personal_computer(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 5 - Personal Computer- Based Terminal. This is part of the “retail” field, that needs device type and also market type.
Specs:
- 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.
Specs:
- device_unattended_terminal(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 2 - Unattended Terminal. This is part of the “retail” field, that needs device type and also market type.
Specs:
- device_unknown(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 1 - Unknown. This is part of the “retail” field, that needs device type and also market type.
Specs:
- device_virtual_terminal(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 10 - Virtual Terminal. This is part of the “retail” field, that needs device type and also market type.
Specs:
- device_website(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 8 - Website. This is part of the “retail” field, that needs device type and also market type.
Specs:
- device_wireless_pos(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets device type: 7 - Wireless POS. This is part of the “retail” field, that needs device type and also market type.
Specs:
- disable_duplicate_window(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Disable transaction setting “duplicateWindow”.
Specs:
- disable_email_customer(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Disable transaction setting “emailCustomer”.
Specs:
- disable_partial_auth(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Disable transaction setting “allowPartialAuth”.
Specs:
- disable_recurring_billing(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Disable transaction setting “recurringBilling”.
Specs:
- disable_test_request(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Disable transaction setting “testRequest”.
Specs:
- duty(AuthorizeNet.Transaction.t, String.t, String.t, Float) :: AuthorizeNet.Transaction.t
Set duty information.
Specs:
- employee_id(AuthorizeNet.Transaction.t, Integer) :: AuthorizeNet.Transaction.t
Set employeeId. Merchant-assigned employee ID. Required only if your payment processor is EVO.
Specs:
- enable_duplicate_window(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Enable transaction setting “duplicateWindow”.
Specs:
- enable_email_customer(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Enable transaction setting “emailCustomer”.
Specs:
- enable_partial_auth(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Enable transaction setting “allowPartialAuth”.
Specs:
- enable_recurring_billing(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Enable transaction setting “recurringBilling”.
Specs:
- enable_test_request(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Enable transaction setting “testRequest”.
Specs:
- market_ecommerce(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets market type: 0 - ecommerce. This is part of the “retail” field, that needs device type and also market type.
Specs:
- market_moto(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets market type: 1 - motto. This is part of the “retail” field, that needs device type and also market type.
Specs:
- market_retail(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Sets market type: 2 - retail. This is part of the “retail” field, that needs device type and also market type.
Specs:
- new(Float | nil) :: AuthorizeNet.Transaction.t
Creates a new transaction.
Specs:
- not_tax_exempt(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Indicates NOT exempted from tax.
Specs:
- opaque_data_descriptor(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
- opaque_data_descriptor(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
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.
Specs:
Set order information.
Specs:
- pay_with_apple_pay(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
Pays this transaction with Apple Pay.
Specs:
- pay_with_bank_account(AuthorizeNet.Transaction.t, AuthorizeNet.BankAccount) :: AuthorizeNet.Transaction.t
Pays this transaction with a bank account.
Specs:
- pay_with_card(AuthorizeNet.Transaction.t, AuthorizeNet.Card.t) :: AuthorizeNet.Transaction.t
Pays this transaction with credit card.
Specs:
- pay_with_customer_profile(AuthorizeNet.Card.t, Integer, Integer, Integer | nil, String.t | nil) :: AuthorizeNet.Card.t
Pay with a customer profile ID.
Specs:
- po_number(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
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.
Specs:
- prior_auth_capture(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
“PRIOR AUTH CAPTURE” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510
Specs:
- ref_transaction_id(AuthorizeNet.Transaction.t, String.t) :: AuthorizeNet.Transaction.t
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
Specs:
“REFUND” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510
Runs the transaction.
Specs:
Adds shipping information.
Specs:
- shipping_cost(AuthorizeNet.Transaction.t, String.t, String.t, Float) :: AuthorizeNet.Transaction.t
Set shipping cost information.
Specs:
- tax(AuthorizeNet.Transaction.t, String.t, String.t, Float) :: AuthorizeNet.Transaction.t
Set tax information.
Specs:
- tax_exempt(AuthorizeNet.Transaction.t) :: AuthorizeNet.Transaction.t
Indicates exempted from tax.
Specs:
- to_xml(AuthorizeNet.Transaction.t) :: Keyword.t
Renders the given transaction structure as a structure suitable to be rendered as xml.
Specs:
- user_fields(AuthorizeNet.Transaction.t, Map) :: AuthorizeNet.Transaction.t
Set arbitrary user fields.
Specs:
“VOID” transaction. See: https://support.authorize.net/authkb/index?page=content&id=A510