Class: ActiveMerchant::Billing::PrismPayAM

Inherits:
Gateway
  • Object
show all
Defined in:
lib/prismpay/prismpay_am.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = { }) ⇒ PrismPayAM

init



14
15
16
17
18
19
# File 'lib/prismpay/prismpay_am.rb', line 14

def initialize(options = { })
  requires!(options, :login)
  @options = options
  @gateway = PrismPay::PrismPay.new(options)
  super
end

Instance Method Details

#authorize(amount, creditcard, options = { }) ⇒ Object



55
56
57
58
# File 'lib/prismpay/prismpay_am.rb', line 55

def authorize(amount, creditcard, options ={ })
  result = @gateway.cc_authorize(amount, creditcard, options)
  result.active_merchant_response
end

#capture(amount, identification, pp_id, options = {}) ⇒ Object



60
61
62
63
# File 'lib/prismpay/prismpay_am.rb', line 60

def capture(amount, identification, pp_id, options = {})
  result = @gateway.cc_capture(amount, identification, pp_id, options)
  result.active_merchant_response
end

#check_consumer_disbursement(amount, check, options = {}) ⇒ Object



40
41
42
43
# File 'lib/prismpay/prismpay_am.rb', line 40

def check_consumer_disbursement(amount, check, options = {})
  result = @gateway.ext_ach_consumer_disbursement(amount, check, options)
  result.active_merchant_response
end

#check_purchase(amount, check, options = {}) ⇒ Object

Transactions



22
23
24
25
# File 'lib/prismpay/prismpay_am.rb', line 22

def check_purchase(amount, check, options = {})
  result = @gateway.ach_sale(amount, check, options)
  result.active_merchant_response
end

#check_refund(amount, identification, pp_txn_id, options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/prismpay/prismpay_am.rb', line 32

def check_refund(amount, identification, pp_txn_id, options = {})

  result = @gateway.ach_refund(amount, identification, 
                                   pp_txn_id, options)

  result.active_merchant_response
end

#check_void(identification, pp_txn_id, options = {}) ⇒ Object



27
28
29
30
# File 'lib/prismpay/prismpay_am.rb', line 27

def check_void(identification, pp_txn_id, options = {})
  result = @gateway.ach_void(identification, pp_txn_id, options)
  result.active_merchant_response
end

#profile_sale(amount, profile_id, last_four, options = {}) ⇒ Object



45
46
47
48
# File 'lib/prismpay/prismpay_am.rb', line 45

def profile_sale(amount, profile_id, last_four, options = {})
  result = @gateway.profile_sale(amount, profile_id, last_four, options)
  result.active_merchant_response
end

#purchase(amount, creditcard, options = { }) ⇒ Object



50
51
52
53
# File 'lib/prismpay/prismpay_am.rb', line 50

def purchase(amount, creditcard, options = { })
  result = @gateway.cc_purchase(amount, creditcard, options)
  result.active_merchant_response
end

#refund(amount, identification, pp_txn_id, options = { }) ⇒ Object



70
71
72
73
# File 'lib/prismpay/prismpay_am.rb', line 70

def refund(amount, identification, pp_txn_id, options ={ })
  result = @gateway.credit(amount, identification, pp_txn_id, options)
  result.active_merchant_response
end

#void(amount, identification, pp_txn_id, options = {}) ⇒ Object



65
66
67
68
# File 'lib/prismpay/prismpay_am.rb', line 65

def void(amount, identification, pp_txn_id, options = {})
  result = @gateway.cc_void(amount, identification, pp_txn_id, options)
  result.active_merchant_response
end