### Home Classes Methods

### In Files

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

### Parent

ActiveMerchant::Billing::Gateway

### Methods

- ::new
- #authorize
- #capture
- #credit
- #purchase
- #recurring
- #refund
- #test?
- #void

### 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::LinkpointGateway

Initialization Options :login Your store number :pem The text of your linkpoint PEM file. Note

    this is not the path to file, but its
    contents. If you are only using one PEM
    file on your site you can declare it
    globally and then you won't need to
    include this option

A valid store number is required. Unfortunately, with LinkPoint YOU CAN'T JUST USE ANY OLD STORE NUMBER. Also, you can't just generate your own PEM file. You'll need to use a special PEM file provided by LinkPoint.

Go to www.linkpoint.com/support/sup_teststore.asp to set up a test account and obtain your PEM file.

Declaring PEM file Globally ActiveMerchant::Billing::LinkpointGateway.pem_file = File.read( File.dirname(__FILE__) + '/../mycert.pem' )

Valid Order Options :result =>

    LIVE                  Production mode
    GOOD                  Approved response in test mode
    DECLINE               Declined response in test mode
    DUPLICATE             Duplicate response in test mode

:ponumber Order number

:transactionorigin => Source of the transaction

    ECI                  Email or Internet
    MAIL                 Mail order
    MOTO                 Mail order/Telephone
    TELEPHONE            Telephone
    RETAIL               Face-to-face

:ordertype =>

    SALE                 Real live sale
    PREAUTH              Authorize only
    POSTAUTH             Forced Ticket or Ticket Only transaction
    VOID
    CREDIT
    CALCSHIPPING         For shipping charges calculations
    CALCTAX              For sales tax calculations

Recurring Options :action =>

    SUBMIT
    MODIFY
    CANCEL

:installments Identifies how many recurring payments to charge the customer :startdate Date to begin charging the recurring payments. Format: YYYYMMDD or "immediate" :periodicity =>

    MONTHLY
    BIMONTHLY
    WEEKLY
    BIWEEKLY
    YEARLY
    DAILY

:threshold Tells how many times to retry the transaction (if it fails) before contacting the merchant. :comments Uh... comments

For reference:

www.linkpointcentral.com/lpc/docs/Help/APIHelp/lpintguide.htm

    Entities = {
      :payment => [:subtotal, :tax, :vattax, :shipping, :chargetotal],
      :billing => [:name, :address1, :address2, :city, :state, :zip, :country, :email, :phone, :fax, :addrnum],
      :shipping => [:name, :address1, :address2, :city, :state, :zip, :country, :weight, :items, :carrier, :total],
      :creditcard => [:cardnumber, :cardexpmonth, :cardexpyear, :cvmvalue, :track],
      :telecheck => [:routing, :account, :checknumber, :bankname, :bankstate, :dl, :dlstate, :void, :accounttype, :ssn],
      :transactiondetails => [:transactionorigin, :oid, :ponumber, :taxexempt, :terminaltype, :ip, :reference_number, :recurring, :tdate],
      :periodic => [:action, :installments, :threshold, :startdate, :periodicity, :comments],
      :notes => [:comments, :referred]
      :items => [:item => [:price, :quantity, :description, :id, :options => [:option => [:name, :value]]]]
    }

LinkPoint's Items entity is an optional entity that can be attached to orders. It is entered as :line_items to be consistent with the CyberSource implementation

The line_item hash goes in the options hash and should look like

    :line_items => [
      {
        :id => '123456',
        :description => 'Logo T-Shirt',
        :price => '12.00',
        :quantity => '1',
        :options => [
          {
            :name => 'Color',
            :value => 'Red'
          },
          {
            :name => 'Size',
            :value => 'XL'
          }
        ]
      },
      {
        :id => '111',
        :description => 'keychain',
        :price => '3.00',
        :quantity => '1'
      }
    ]

This functionality is only supported by this particular gateway may be changed at any time

### Constants

LIVE_URL
TEST_URL

### Public Class Methods

new(options = {}) click to toggle source

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 141
    def initialize(options = {})
      requires!(options, :login)

      @options = {
        :result => 'LIVE',
        :pem => LinkpointGateway.pem_file
      }.update(options)

      raise ArgumentError, "You need to pass in your pem file using the :pem parameter or set it globally using ActiveMerchant::Billing::LinkpointGateway.pem_file = File.read( File.dirname(__FILE__) + '/../mycert.pem' ) or similar" if @options[:pem].blank?
    end

### Public Instance Methods

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

Authorize the transaction

Reserves the funds on the customer's credit card, but does not charge the card.

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 200
    def authorize(money, creditcard, options = {})
      requires!(options, :order_id)
      options.update(
        :ordertype => "PREAUTH"
      )
      commit(money, creditcard, options)
    end

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

Post an authorization.

Captures the funds from an authorized transaction. Order_id must be a valid order id from a prior authorized transaction.

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 214
    def capture(money, authorization, options = {})
      options.update(
        :order_id => authorization,
        :ordertype => "POSTAUTH"
      )
      commit(money, nil, options)
    end

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

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 244
    def credit(money, identification, options = {})
      deprecated CREDIT_DEPRECATION_MESSAGE
      refund(money, identification, options)
    end

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

Buy the thing

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 187
    def purchase(money, creditcard, options={})
      requires!(options, :order_id)
      options.update(
        :ordertype => "SALE"
      )
      commit(money, creditcard, options)
    end

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

Send a purchase request with periodic options Recurring Options :action =>

    SUBMIT
    MODIFY
    CANCEL

:installments Identifies how many recurring payments to charge the customer :startdate Date to begin charging the recurring payments. Format: YYYYMMDD or "immediate" :periodicity =>

    :monthly
    :bimonthly
    :weekly
    :biweekly
    :yearly
    :daily

:threshold Tells how many times to retry the transaction (if it fails) before contacting the merchant. :comments Uh... comments

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 171
    def recurring(money, creditcard, options={})
      requires!(options, [:periodicity, :bimonthly, :monthly, :biweekly, :weekly, :yearly, :daily], :installments, :order_id )

      options.update(
        :ordertype => "SALE",
        :action => options[:action] || "SUBMIT",
        :installments => options[:installments] || 12,
        :startdate => options[:startdate] || "immediate",
        :periodicity => options[:periodicity].to_s || "monthly",
        :comments => options[:comments] || nil,
        :threshold => options[:threshold] || 3
      )
      commit(money, creditcard, options)
    end

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

Refund an order

identification must be a valid order id previously submitted by SALE

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 236
    def refund(money, identification, options = {})
      options.update(
        :ordertype => "CREDIT",
        :order_id => identification
      )
      commit(money, nil, options)
    end

test?() click to toggle source

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 249
    def test?
      @options[:test] || super
    end

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

Void a previous transaction

    # File lib/active_merchant/billing/gateways/linkpoint.rb, line 223
    def void(identification, options = {})
      options.update(
        :order_id => identification,
        :ordertype => "VOID"
      )
      commit(nil, nil, options)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.