### Home Classes Methods

### In Files

- lib/active_merchant/billing/gateways/usa_epay_advanced.rb

### Parent

ActiveMerchant::Billing::Gateway

### Methods

- ::new
- #add_customer
- #add_customer_payment_method
- #authorize
- #capture
- #capture_transaction
- #credit
- #delete_customer
- #delete_customer_payment_method
- #disable_customer
- #enable_customer
- #get_account_details
- #get_check_trace
- #get_customer_payment_method
- #get_customer_payment_methods
- #get_transaction
- #get_transaction_custom
- #get_transaction_status
- #override_transaction
- #post_auth
- #purchase
- #refund_transaction
- #run_customer_transaction
- #run_quick_credit
- #run_quick_sale
- #run_transaction
- #update_customer
- #update_customer_payment_method
- #void
- #void_transaction

### Class/Module Index

Quicksearch

- ActiveMerchant
- ActiveMerchant::Billing
- ActiveMerchant::Billing::AVSResult
- ActiveMerchant::Billing::BarclaysEpdqGateway
- ActiveMerchant::Billing::BarclaysEpdqGateway::Document
- ActiveMerchant::Billing::BarclaysEpdqGateway::Parser
- ActiveMerchant::Billing::Base
- ActiveMerchant::Billing::BeanstreamGateway
- ActiveMerchant::Billing::BeanstreamInteracGateway
- ActiveMerchant::Billing::BeanstreamInteracResponse
- ActiveMerchant::Billing::BluePayGateway
- ActiveMerchant::Billing::BogusGateway
- ActiveMerchant::Billing::BraintreeBlueGateway
- ActiveMerchant::Billing::BraintreeGateway
- ActiveMerchant::Billing::BraintreeOrangeGateway
- ActiveMerchant::Billing::CVVResult
- ActiveMerchant::Billing::CardSaveGateway
- ActiveMerchant::Billing::CardStreamGateway
- ActiveMerchant::Billing::Check
- ActiveMerchant::Billing::CreditCard
- ActiveMerchant::Billing::CreditCardFormatting
- ActiveMerchant::Billing::CreditCardMethods
- ActiveMerchant::Billing::CreditCardMethods::ClassMethods
- ActiveMerchant::Billing::CyberSourceGateway
- ActiveMerchant::Billing::DataCashGateway
- ActiveMerchant::Billing::EfsnetGateway
- ActiveMerchant::Billing::ElavonGateway
- ActiveMerchant::Billing::EpayGateway
- ActiveMerchant::Billing::EwayGateway
- ActiveMerchant::Billing::EwayManagedGateway
- ActiveMerchant::Billing::EwayManagedGateway::EwayResponse
- ActiveMerchant::Billing::ExactGateway
- ActiveMerchant::Billing::FederatedCanadaGateway
- ActiveMerchant::Billing::FirstPayGateway
- ActiveMerchant::Billing::FirstPayGateway::FirstPayPostData
- ActiveMerchant::Billing::GarantiGateway
- ActiveMerchant::Billing::Gateway
- ActiveMerchant::Billing::IdealBaseGateway
- ActiveMerchant::Billing::IdealRabobankGateway
- ActiveMerchant::Billing::IdealResponse
- ActiveMerchant::Billing::InspireGateway
- ActiveMerchant::Billing::InstapayGateway
- ActiveMerchant::Billing::Integrations
- ActiveMerchant::Billing::Integrations::ActionViewHelper
- ActiveMerchant::Billing::Integrations::Bogus
- ActiveMerchant::Billing::Integrations::Bogus::Helper
- ActiveMerchant::Billing::Integrations::Bogus::Notification
- ActiveMerchant::Billing::Integrations::Bogus::Return
- ActiveMerchant::Billing::Integrations::Chronopay
- ActiveMerchant::Billing::Integrations::Chronopay::Helper
- ActiveMerchant::Billing::Integrations::Chronopay::Return
- ActiveMerchant::Billing::Integrations::DirecPay
- ActiveMerchant::Billing::Integrations::DirecPay::Helper
- ActiveMerchant::Billing::Integrations::DirecPay::Notification
- ActiveMerchant::Billing::Integrations::DirecPay::Return
- ActiveMerchant::Billing::Integrations::DirecPay::Status
- ActiveMerchant::Billing::Integrations::Directebanking
- ActiveMerchant::Billing::Integrations::Directebanking::Helper
- ActiveMerchant::Billing::Integrations::Directebanking::Notification
- ActiveMerchant::Billing::Integrations::Directebanking::Return
- ActiveMerchant::Billing::Integrations::Dwolla
- ActiveMerchant::Billing::Integrations::Dwolla::Helper
- ActiveMerchant::Billing::Integrations::Dwolla::Notification
- ActiveMerchant::Billing::Integrations::Dwolla::Return
- ActiveMerchant::Billing::Integrations::EPaymentPlans
- ActiveMerchant::Billing::Integrations::EPaymentPlans::Helper
- ActiveMerchant::Billing::Integrations::EPaymentPlans::Notification
- ActiveMerchant::Billing::Integrations::Gestpay
- ActiveMerchant::Billing::Integrations::Gestpay::Common
- ActiveMerchant::Billing::Integrations::Gestpay::Helper
- ActiveMerchant::Billing::Integrations::Gestpay::Notification
- ActiveMerchant::Billing::Integrations::Gestpay::Return
- ActiveMerchant::Billing::Integrations::HiTrust
- ActiveMerchant::Billing::Integrations::HiTrust::Notification
- ActiveMerchant::Billing::Integrations::HiTrust::Return
- ActiveMerchant::Billing::Integrations::Moneybookers
- ActiveMerchant::Billing::Integrations::Moneybookers::Helper
- ActiveMerchant::Billing::Integrations::Nochex
- ActiveMerchant::Billing::Integrations::Nochex::Helper
- ActiveMerchant::Billing::Integrations::Nochex::Notification
- ActiveMerchant::Billing::Integrations::Nochex::Return
- ActiveMerchant::Billing::Integrations::Notification
- ActiveMerchant::Billing::Integrations::PayflowLink
- ActiveMerchant::Billing::Integrations::PayflowLink::Helper
- ActiveMerchant::Billing::Integrations::PayflowLink::Notification
- ActiveMerchant::Billing::Integrations::Paypal
- ActiveMerchant::Billing::Integrations::Paypal::Helper
- ActiveMerchant::Billing::Integrations::Paypal::Notification
- ActiveMerchant::Billing::Integrations::Paypal::Return
- ActiveMerchant::Billing::Integrations::Quickpay
- ActiveMerchant::Billing::Integrations::Quickpay::Helper
- ActiveMerchant::Billing::Integrations::Quickpay::Notification
- ActiveMerchant::Billing::Integrations::Return
- ActiveMerchant::Billing::Integrations::SagePayForm
- ActiveMerchant::Billing::Integrations::SagePayForm::Encryption
- ActiveMerchant::Billing::Integrations::SagePayForm::Helper
- ActiveMerchant::Billing::Integrations::SagePayForm::Notification
- ActiveMerchant::Billing::Integrations::SagePayForm::Notification::CryptError
- ActiveMerchant::Billing::Integrations::SagePayForm::Notification::InvalidCryptData
- ActiveMerchant::Billing::Integrations::SagePayForm::Notification::MissingCryptData
- ActiveMerchant::Billing::Integrations::SagePayForm::Notification::MissingCryptKey
- ActiveMerchant::Billing::Integrations::SagePayForm::Return
- ActiveMerchant::Billing::Integrations::TwoCheckout
- ActiveMerchant::Billing::Integrations::TwoCheckout::Helper
- ActiveMerchant::Billing::Integrations::TwoCheckout::Notification
- ActiveMerchant::Billing::Integrations::TwoCheckout::Return
- ActiveMerchant::Billing::Integrations::Valitor
- ActiveMerchant::Billing::Integrations::Valitor::Helper
- ActiveMerchant::Billing::Integrations::Valitor::Notification
- ActiveMerchant::Billing::Integrations::Valitor::ResponseFields
- ActiveMerchant::Billing::Integrations::Valitor::Return
- ActiveMerchant::Billing::Integrations::WorldPay
- ActiveMerchant::Billing::Integrations::WorldPay::Helper
- ActiveMerchant::Billing::Integrations::WorldPay::Notification
- ActiveMerchant::Billing::IridiumGateway
- ActiveMerchant::Billing::JetpayGateway
- ActiveMerchant::Billing::LinkpointGateway
- ActiveMerchant::Billing::MerchantESolutionsGateway
- ActiveMerchant::Billing::MerchantWareGateway
- ActiveMerchant::Billing::ModernPaymentsGateway
- ActiveMerchant::Billing::MonerisGateway
- ActiveMerchant::Billing::NetRegistryGateway
- ActiveMerchant::Billing::NetaxeptGateway
- ActiveMerchant::Billing::NetaxeptGateway::Response
- ActiveMerchant::Billing::NetbillingGateway
- ActiveMerchant::Billing::NmiGateway
- ActiveMerchant::Billing::OptimalPaymentGateway
- ActiveMerchant::Billing::OrbitalSoftDescriptors
- ActiveMerchant::Billing::PayJunctionGateway
- ActiveMerchant::Billing::PaySecureGateway
- ActiveMerchant::Billing::PayboxDirectGateway
- ActiveMerchant::Billing::PayflowCommonAPI
- ActiveMerchant::Billing::PayflowExpressResponse
- ActiveMerchant::Billing::PayflowExpressUkGateway
- ActiveMerchant::Billing::PayflowGateway
- ActiveMerchant::Billing::PayflowResponse
- ActiveMerchant::Billing::PayflowUkGateway
- ActiveMerchant::Billing::PaymentExpressGateway
- ActiveMerchant::Billing::PaymentExpressResponse
- ActiveMerchant::Billing::PaypalCaGateway
- ActiveMerchant::Billing::PaypalCommonAPI
- ActiveMerchant::Billing::PaypalExpressCommon
- ActiveMerchant::Billing::PaypalExpressGateway
- ActiveMerchant::Billing::PaypalExpressResponse
- ActiveMerchant::Billing::PaypalGateway
- ActiveMerchant::Billing::PlugnpayGateway
- ActiveMerchant::Billing::PlugnpayGateway::PlugnpayPostData
- ActiveMerchant::Billing::PsigateGateway
- ActiveMerchant::Billing::QbmsGateway
- ActiveMerchant::Billing::QuantumGateway
- ActiveMerchant::Billing::QuickpayGateway
- ActiveMerchant::Billing::RealexGateway
- ActiveMerchant::Billing::Response
- ActiveMerchant::Billing::SageGateway
- ActiveMerchant::Billing::SagePayGateway
- ActiveMerchant::Billing::SallieMaeGateway
- ActiveMerchant::Billing::SamuraiGateway
- ActiveMerchant::Billing::SecureNetGateway
- ActiveMerchant::Billing::SecurePayAuGateway
- ActiveMerchant::Billing::SecurePayGateway
- ActiveMerchant::Billing::SecurePayTechGateway
- ActiveMerchant::Billing::SecurePayTechGateway::SecurePayTechPostData
- ActiveMerchant::Billing::SkipJackGateway
- ActiveMerchant::Billing::StripeGateway
- ActiveMerchant::Billing::TransFirstGateway
- ActiveMerchant::Billing::TransaxGateway
- ActiveMerchant::Billing::TrustCommerceGateway
- ActiveMerchant::Billing::UsaEpayAdvancedGateway
- ActiveMerchant::Billing::UsaEpayGateway
- ActiveMerchant::Billing::UsaEpayTransactionGateway
- ActiveMerchant::Billing::VerifiGateway
- ActiveMerchant::Billing::VerifiGateway::VerifiPostData
- ActiveMerchant::Billing::ViaklixGateway
- ActiveMerchant::Billing::WirecardGateway
- ActiveMerchant::Billing::WorldpayGateway
- ActiveMerchant::Billing::WorldpayGateway::MultiResponse
- BraintreeCommon
- OutboundHosts

No matching classes.

# ActiveMerchant::Billing::UsaEpayAdvancedGateway

#### USA ePay Advanced SOAP Interface

This class encapuslates USA ePay's Advanced SOAP Interface. The Advanced Soap Interface allows standard transactions, storing customer information, and recurring billing. Storing sensitive information on USA ePay's servers can help with PCI DSS compliance, since customer and card data do not need to be stored locally.

Make sure you have enabled this functionality for your account with USA ePay.

Information about the Advanced SOAP interface is available on the USA ePay wiki.

#### Login, Password, and Software ID

Please follow all of USA ePay's directions for acquiring all accounts and settings.

The value used for `:login` is the Key value found in the Merchant Console under Settings > Source Key. You will have to add this key in the USA ePay Merchant Console.

The value used for `:password` is the pin value also found and assigned in the Merchant Console under Settings > Source Key. The pin is required to use all but basic transactions in the SOAP interface. You will have to add the pin to your source key, as it defaults to none.

The value used for the `:software_id` is found in the Developer's Login under the Developers Center in your WSDL. It is the 8 character value in <soap:address> tag. A masked example: <soap:address location="www.usaepay.com/soap/gate/XXXXXXXX"/> It is also found in the link to your WSDL. This is required as every account has a different path SOAP requests are submitted to. Optionally, you can provide the entire urls via `:live_url` and `:test_url`, if your prefer.

#### Responses

- `#success?` -- `true` if transmitted and returned correctly

- `#message` -- response or fault message

- `#authorization` -- reference_number or nil

- `#params` -- hash of entire soap response contents

#### Address Options

- `:billing_address/:shipping_address` -- contains some extra options

  - `:name` -- virtual attribute; will split to first and last name

  - `:first_name`

  - `:last_name`

  - `:address1`

  - `:address2`

  - `:city`

  - `:state`

  - `:zip`

  - `:country`

  - `:phone`

  - `:email`

  - `:fax`

  - `:company`

#### Support:

- Questions: post to active_merchant google group

- Feedback/fixes: matt (at) nearapogee (dot) com

#### Links:

- USA ePay Merchant Console

- USA ePay Developer Login

### Constants

API_VERSION

### Public Class Methods

new(options = {}) click to toggle source

Create a new gateway.

#### Required

- At least the live_url OR the software_id must be present.

  - `:software_id` -- 8 character software id

  OR

  - `:test_url` -- full url for testing

  - `:live_url` -- full url for live/production

#### Optional

- `:soap_response` -- set to `true` to add :soap_response to the params hash containing the entire soap xml message

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 236
    def initialize(options = {})
      requires! options, :login, :password
      @options = options

      if @options[:software_id]
        self.live_url = "#{LIVE_URL_BASE}#{@options[:software_id].to_s}"
        self.test_url = "#{TEST_URL_BASE}#{@options[:software_id].to_s}"
      else
        self.live_url = @options[:live_url].to_s
        self.test_url = @options[:test_url].to_s if @options[:test_url]
      end

      super
    end

### Public Instance Methods

add_customer(options={}) click to toggle source

Add a customer.

#### Options

- `:id` -- merchant assigned id

- `:notes` -- notes about customer

- `:data` -- base64 data about customer

- `:url` -- customer website

- `:billing_address` -- usual options

- `:payment_methods` -- array of payment method hashes.

  - `:method` -- credit_card or check

  - `:name` -- optional name/label for the method

  - `:sort` -- optional integer value specifying the backup sort order, 0 is default

#### Recurring Options

- `:enabled` -- `true` enables recurring

- `:schedule` -- daily, weekly, bi-weekly (every two weeks), monthly, bi-monthly (every two months), quarterly, bi-annually (every six months), annually, first of month, last day of month

- `:number_left` -- number of payments left; -1 for unlimited

- `:next` -- date of next payment (Date/Time)

- `:amount` -- amount of recurring payment

- `:tax` -- tax portion of amount

- `:currency` -- numeric currency code

- `:description` -- description of transaction

- `:order_id` -- transaction order id

- `:user` -- merchant username assigned to transaction

- `:source` -- name of source key assigned to billing

- `:send_receipt` -- `true` to send client a receipt

- `:receipt_note` -- leave a note on the receipt

#### Point of Sale Options

- `:price_tier` -- name of customer price tier

- `:tax_class` -- tax class

- `:lookup_code` -- lookup code from customer/member id card; barcode or magnetic stripe; can be assigned by merchant; defaults to system assigned if blank

#### Response

- `#message` -- customer number assigned by gateway

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 332
    def add_customer(options={})
      request = build_request(__method__, options)
      commit(__method__, request)
    end

add_customer_payment_method(options={}) click to toggle source

Add a payment method to a customer.

#### Required

- `:customer_number` -- number returned by add_customer response.message

- `:payment_method`

  - `:method` -- credit_card or check

  - `:name` -- optional name/label for the method

  - `:sort` -- an integer value specifying the backup sort order, 0 is default

#### Optional

- `:make_default` -- set `true` to make default

- `:verify` -- set `true` to run auth_only verification; throws fault if cannot verify

#### Response

- `#message` -- method_id of new customer payment method

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 393
    def add_customer_payment_method(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

authorize(money, creditcard, options={}) click to toggle source

Authorize an amount on a credit card or account.

Note: See run_transaction for additional options.

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 266
    def authorize(money, creditcard, options={})
      run_auth_only(options.merge!(:amount => money, :payment_method => creditcard))
    end

capture(money, identification, options={}) click to toggle source

Capture an authorized transaction.

Note: See run_transaction for additional options.

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 274
    def capture(money, identification, options={})
      capture_transaction(options.merge!(:amount => money, :reference_number => identification))
    end

capture_transaction(options={}) click to toggle source

Capture an authorized transaction and move it into the current batch for settlement.

Note: Check with merchant bank for details/restrictions on differing amounts than the original authorization.

#### Required

- `:reference_number`

#### Options

- `:amount` -- may be different than original amount; 0 will void authorization

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 635
    def capture_transaction(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

credit(money, identification, options={}) click to toggle source

Credit a previous transaction.

Note: See run_transaction for additional options.

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 290
    def credit(money, identification, options={})
      refund_transaction(options.merge!(:amount => money, :reference_number => identification))
    end

delete_customer(options={}) click to toggle source

Delete a customer.

#### Required

- `:customer_number`

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 470
    def delete_customer(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

delete_customer_payment_method(options={}) click to toggle source

Delete one the payment methods beloning to a customer

#### Required

- `:customer_number`

- `:method_id`

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 458
    def delete_customer_payment_method(options={})
      requires! options, :customer_number, :method_id

      request = build_request(__method__, options)
      commit(__method__, request)
    end

disable_customer(options={}) click to toggle source

Disable a customer for recurring billing.

#### Required

- `:customer_number`

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 370
    def disable_customer(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

enable_customer(options={}) click to toggle source

Enable a customer for recurring billing.

Note: Customer does not need to have all recurring paramerters to succeed.

#### Required

- `:customer_number`

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 358
    def enable_customer(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_account_details() click to toggle source

Retrieve merchant account details

#### Response

- `#message` -- account hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 933
    def get_account_details
      request = build_request(__method__)
      commit(__method__, request)
    end

get_check_trace(options={}) click to toggle source

Check status of a check transaction.

#### Required

- `:reference_number`

#### Response

- `#message` -- check trace hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 919
    def get_check_trace(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_customer_payment_method(options={}) click to toggle source

Retrive one of the payment methods belonging to a customer

#### Required

- `:customer_number`

- `:method_id`

#### Response

- `#message` -- hash of payment method

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 424
    def get_customer_payment_method(options={})
      requires! options, :customer_number, :method_id

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_customer_payment_methods(options={}) click to toggle source

Retrive all of the payment methods belonging to a customer

#### Required

- `:customer_number`

#### Response

- `#message` -- either a single hash or an array of hashes of payment methods

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 408
    def get_customer_payment_methods(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_transaction(options={}) click to toggle source

Retrieve details of a specified transaction.

#### Required

- `:reference_number`

#### Response

- `#message` -- transaction hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 789
    def get_transaction(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_transaction_custom(options={}) click to toggle source

Check status of a transaction (custom).

#### Required

- `:reference_number`

- `:fields` -- string array of fields to retrieve

  - `Response.AuthCode`

  - `Response.AvsResult`

  - `Response.AvsResultCode`

  - `Response.BatchNum`

  - `Response.CardCodeResult`

  - `Response.CardCodeResultCode`

  - `Response.ConversionRate`

  - `Response.ConvertedAmount`

  - `Response.ConvertedAmountCurrency`

  - `Response.Error`

  - `Response.ErrorCode`

  - `Response.RefNum`

  - `Response.Result`

  - `Response.ResultCode`

  - `Response.Status`

  - `Response.StatusCode`

  - `CheckTrace.TrackingNum`

  - `CheckTrace.Effective`

  - `CheckTrace.Processed`

  - `CheckTrace.Settled`

  - `CheckTrace.Returned`

  - `CheckTrace.BankNote`

  - `DateTime`

  - `AccountHolder`

  - `Details.Invoice`

  - `Details.PoNum`

  - `Details.OrderID`

  - `Details.Clerk`

  - `Details.Terminal`

  - `Details.Table`

  - `Details.Description`

  - `Details.Amount`

  - `Details.Currency`

  - `Details.Tax`

  - `Details.Tip`

  - `Details.NonTax`

  - `Details.Shipping`

  - `Details.Discount`

  - `Details.Subtotal`

  - `CreditCardData.CardType`

  - `CreditCardData.CardNumber`

  - `CreditCardData.CardExpiration`

  - `CreditCardData.CardCode`

  - `CreditCardData.AvsStreet`

  - `CreditCardData.AvsZip`

  - `CreditCardData.CardPresent`

  - `CheckData.CheckNumber`

  - `CheckData.Routing`

  - `CheckData.Account`

  - `CheckData.SSN`

  - `CheckData.DriversLicense`

  - `CheckData.DriversLicenseState`

  - `CheckData.RecordType`

  - `User`

  - `Source`

  - `ServerIP`

  - `ClientIP`

  - `CustomerID`

  - `BillingAddress.FirstName`

  - `BillingAddress.LastName`

  - `BillingAddress.Company`

  - `BillingAddress.Street`

  - `BillingAddress.Street2`

  - `BillingAddress.City`

  - `BillingAddress.State`

  - `BillingAddress.Zip`

  - `BillingAddress.Country`

  - `BillingAddress.Phone`

  - `BillingAddress.Fax`

  - `BillingAddress.Email`

  - `ShippingAddress.FirstName`

  - `ShippingAddress.LastName`

  - `ShippingAddress.Company`

  - `ShippingAddress.Street`

  - `ShippingAddress.Street2`

  - `ShippingAddress.City`

  - `ShippingAddress.State`

  - `ShippingAddress.Zip`

  - `ShippingAddress.Country`

  - `ShippingAddress.Phone`

  - `ShippingAddress.Fax`

  - `ShippingAddress.Email`

#### Response

- `#message` -- hash; keys are the field values

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 904
    def get_transaction_custom(options={})
      requires! options, :reference_number, :fields

      request = build_request(__method__, options)
      commit(__method__, request)
    end

get_transaction_status(options={}) click to toggle source

Check status of a transaction.

#### Required

- `:reference_number`

#### Response

- `response.success` -- success of the referenced transaction

- `response.message` -- message of the referenced transaction

- `response.authorization` -- same as :reference_number in options

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 806
    def get_transaction_status(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

override_transaction(options={}) click to toggle source

Override transaction flagged for mananager approval.

Note: Checks only!

#### Required

- `:reference_number`

#### Options

- `:reason`

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 691
    def override_transaction(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

post_auth(options={}) click to toggle source

Post an authorization code obtained offline.

#### Required

- `:authorization_code` -- obtained offline

#### Options

- Same as run_transaction

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 613
    def post_auth(options={})
      requires! options, :authorization_code

      request = build_request(__method__, options)
      commit(__method__, request)
    end

purchase(money, creditcard, options={}) click to toggle source

Make a purchase with a credit card. (Authorize and capture for settlement.)

Note: See run_transaction for additional options.

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 258
    def purchase(money, creditcard, options={})
      run_sale(options.merge!(:amount => money, :payment_method => creditcard))
    end

refund_transaction(options={}) click to toggle source

Refund transaction.

Note: Required after a transaction has been settled. Refunds both credit card and check transactions.

#### Required

- `:reference_number`

- `:amount` -- amount to refund; 0 will refund original amount

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 671
    def refund_transaction(options={})
      requires! options, :reference_number, :amount

      request = build_request(__method__, options)
      commit(__method__, request)
    end

run_customer_transaction(options={}) click to toggle source

Run a transaction for an existing customer in the database.

#### Required Options

- `:customer_number` -- gateway assigned identifier

- `:command` -- Sale, AuthOnly, Credit, Check, CheckCredit

- `:amount` -- total amount

#### Options

- `:method_id` -- which payment method to use, 0/nil/omitted for default method

- `:ignore_duplicate` -- `true` overrides duplicate transaction

- `:client_ip` -- client ip address

- `:customer_receipt` -- `true`, sends receipt to customer. active_merchant defaults to `false`

- `:customer_email` -- specify if different than customer record

- `:customer_template` -- name of template

- `:merchant_receipt` -- `true`, sends receipt to merchant. active_merchant defaults to `false`

- `:merchant_email` -- required if :merchant_receipt set to `true`

- `:merchant_template` -- name of template

- `:recurring` -- defaults to `false` *see documentation*

- `:verification_value` -- pci forbids storage of this value, only required for CVV2 validation

- `:software` -- active_merchant sets to required gateway option value

- `:line_items` -- XXX not implemented yet

- `:custom_fields` -- XXX not implemented yet

#### Transaction Options

- `:invoice` -- transaction invoice number; truncated to 10 characters; defaults to reference_number

- `:po_number` -- commercial purchase order number; upto 25 characters

- `:order_id` -- should be used to assign a unique id; upto 64 characters

- `:clerk` -- sales clerk

- `:terminal` -- terminal name

- `:table` -- table name/number

- `:description` -- description

- `:comments` -- comments

- `:allow_partial_auth` -- allow partial authorization if full amount is not available; defaults `false`

- `:currency` -- numeric currency code

- `:tax` -- tax portion of amount

- `:tip` -- tip portion of amount

- `:non_tax` -- `true` if transaction is non-taxable

- `:shipping` -- shipping portion of amount

- `:discount` -- amount of discount

- `:subtotal` -- amount of transaction before tax, tip, shipping, and discount are applied

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 521
    def run_customer_transaction(options={})
      requires! options, :customer_number, :command, :amount

      request = build_request(__method__, options)
      commit(__method__, request)
    end

run_quick_credit(options={}) click to toggle source

Run a credit based off of a past transaction.

Transfers referenced transaction's payment method to this transaction. As of 6/2011, USA ePay blocks credit card numbers at 3 years.

#### Required

- `:reference_number` -- transaction to reference payment from

#### Transaction Options

- `:amount` -- total amount

- `:invoice` -- transaction invoice number; truncated to 10 characters; defaults to reference_number

- `:po_number` -- commercial purchase order number; upto 25 characters

- `:order_id` -- should be used to assign a unique id; upto 64 characters

- `:clerk` -- sales clerk

- `:terminal` -- terminal name

- `:table` -- table name/number

- `:description` -- description

- `:comments` -- comments

- `:allow_partial_auth` -- allow partial authorization if full amount is not available; defaults `false`

- `:currency` -- numeric currency code

- `:tax` -- tax portion of amount

- `:tip` -- tip portion of amount

- `:non_tax` -- `true` if transaction is non-taxable

- `:shipping` -- shipping portion of amount

- `:discount` -- amount of discount

- `:subtotal` -- amount of transaction before tax, tip, shipping, and discount are applied

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 772
    def run_quick_credit(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

run_quick_sale(options={}) click to toggle source

Run a sale transaction based off of a past transaction.

Transfers referenced transaction's payment method to this transaction. As of 6/2011, USA ePay blocks credit card numbers at 3 years.

#### Required

- `:reference_number` -- transaction to reference payment from

- `:amount` -- total amount

#### Options

- `:authorize_only` -- set `true` if you just want to authorize

#### Transaction Options

- `:invoice` -- transaction invoice number; truncated to 10 characters; defaults to reference_number

- `:po_number` -- commercial purchase order number; upto 25 characters

- `:order_id` -- should be used to assign a unique id; upto 64 characters

- `:clerk` -- sales clerk

- `:terminal` -- terminal name

- `:table` -- table name/number

- `:description` -- description

- `:comments` -- comments

- `:allow_partial_auth` -- allow partial authorization if full amount is not available; defaults `false`

- `:currency` -- numeric currency code

- `:tax` -- tax portion of amount

- `:tip` -- tip portion of amount

- `:non_tax` -- `true` if transaction is non-taxable

- `:shipping` -- shipping portion of amount

- `:discount` -- amount of discount

- `:subtotal` -- amount of transaction before tax, tip, shipping, and discount are applied

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 734
    def run_quick_sale(options={})
      requires! options, :reference_number, :amount

      request = build_request(__method__, options)
      commit(__method__, request)
    end

run_transaction(options={}) click to toggle source

Run a transaction.

Note: run_sale, run_auth_only, run_credit, run_check_sale, run_check_credit methods are also available. Each takes the same options as run_transaction, but the :command option is not required.

Recurring Note: If recurring options are included USA ePay will create a new customer record with the supplied information. The customer number will be returned in the response.

#### Options

- `:method` -- credit_card or check

- `:command` -- sale, credit, void, creditvoid, authonly, capture, postauth, check, checkcredit; defaults to sale; only required for run_transaction when other than sale

- `:reference_number` -- for the original transaction; obtained by sale or authonly

- `:authorization_code` -- required for postauth; obtained offline

- `:ignore_duplicate` -- set `true` if you want to override the duplicate tranaction handling

- `:account_holder` -- name of account holder

- `:customer_id` -- merchant assigned id

- `:customer_receipt` -- set `true` to email receipt to billing email address

- `:customer_template` -- name of template

- `:software` -- stamp merchant software version for tracking

- `:billing_address` -- see UsaEpayCimGateway documentation for all address fields

- `:shipping_address` -- see UsaEpayCimGateway documentation for all address fields

- `:recurring` -- used for recurring billing transactions

  - `:schedule` -- disabled, daily, weekly, bi-weekly (every two weeks), monthly, bi-monthly (every two months), quarterly, bi-annually (every six months), annually

  - `:next` -- date customer billed next (Date/Time)

  - `:expire` -- date the recurring transactions end (Date/Time)

  - `:number_left` -- transactions remaining in billing cycle

  - `:amount` -- amount to be billed each recurring transaction

  - `:enabled` -- states if currently active

- `:line_items` -- XXX not implemented yet

- `:custom_fields` -- XXX not implemented yet

#### Transaction Options

- `:amount` -- total amount

- `:invoice` -- transaction invoice number; truncated to 10 characters; defaults to reference_number

- `:po_number` -- commercial purchase order number; upto 25 characters

- `:order_id` -- should be used to assign a unique id; upto 64 characters

- `:clerk` -- sales clerk

- `:terminal` -- terminal name

- `:table` -- table name/number

- `:description` -- description

- `:comments` -- comments

- `:allow_partial_auth` -- allow partial authorization if full amount is not available; defaults `false`

- `:currency` -- numeric currency code

- `:tax` -- tax portion of amount

- `:tip` -- tip portion of amount

- `:non_tax` -- `true` if transaction is non-taxable

- `:shipping` -- shipping portion of amount

- `:discount` -- amount of discount

- `:subtotal` -- amount of transaction before tax, tip, shipping, and discount are applied

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 585
    def run_transaction(options={})
      request = build_request(__method__, options)
      commit(__method__, request)
    end

update_customer(options={}) click to toggle source

Update a customer by replacing all of the customer details..

Use quickUpdateCustomer to just update a few attributes.

#### Options

    * Same as add_customer

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 344
    def update_customer(options={})
      requires! options, :customer_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

update_customer_payment_method(options={}) click to toggle source

Update a customer payment method.

#### Required

- `:method_id` -- method_id to update

#### Options

- `:method` -- credit_card or check

- `:name` -- optional name/label for the method

- `:sort` -- an integer value specifying the backup sort order, 0 is default

- `:verify` -- set `true` to run auth_only verification; throws fault if cannot verify

#### Response

- `#message` -- hash of payment method

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 445
    def update_customer_payment_method(options={})
      requires! options, :method_id

      request = build_request(__method__, options)
      commit(__method__, request)
    end

void(identification, options={}) click to toggle source

Void a previous transaction that has not been settled.

Note: See run_transaction for additional options.

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 282
    def void(identification, options={})
      void_transaction(options.merge!(:reference_number => identification))
    end

void_transaction(options={}) click to toggle source

Void a transaction.

Note: Can only be voided before being settled.

#### Required

- `:reference_number`

#### Response

- `#message` -- transaction response hash

    # File lib/active_merchant/billing/gateways/usa_epay_advanced.rb, line 652
    def void_transaction(options={})
      requires! options, :reference_number

      request = build_request(__method__, options)
      commit(__method__, request)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.