Class: ActiveMerchant::Billing::FirstPayGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::FirstPayGateway
- Defined in:
- lib/active_merchant/billing/gateways/first_pay.rb
Defined Under Namespace
Classes: FirstPayPostData
Constant Summary
- TEST_URL =
both URLs are IP restricted
'https://apgcert.first-pay.com/AcqENGIN/SecureCapture'- LIVE_URL =
'https://acqengin.first-pay.com/AcqENGIN/SecureCapture'- ACTIONS =
{ 'sale' => 1, 'credit' => 2, 'void' => 3 }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary (collapse)
- - (Object) credit(money, reference, options = {})
-
- (FirstPayGateway) initialize(options = {})
constructor
A new instance of FirstPayGateway.
- - (Object) purchase(money, creditcard, options = {})
- - (Object) refund(money, reference, options = {})
- - (Object) void(money, creditcard, options = {})
Methods inherited from Gateway
card_brand, #card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
- (FirstPayGateway) initialize(options = {})
A new instance of FirstPayGateway
34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 34 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
- (Object) credit(money, reference, options = {})
63 64 65 66 |
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 63 def credit(money, reference, = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, reference, ) end |
- (Object) purchase(money, creditcard, options = {})
40 41 42 43 44 45 46 47 48 |
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 40 def purchase(money, creditcard, = {}) post = FirstPayPostData.new add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, ) add_customer_data(post, ) commit('sale', money, post) end |
- (Object) refund(money, reference, options = {})
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 50 def refund(money, reference, = {}) requires!(, :credit_card) post = FirstPayPostData.new add_invoice(post, ) add_creditcard(post, [:credit_card]) add_address(post, ) add_customer_data(post, ) add_credit_data(post, reference) commit('credit', money, post) end |
- (Object) void(money, creditcard, options = {})
68 69 70 71 72 73 74 75 76 |
# File 'lib/active_merchant/billing/gateways/first_pay.rb', line 68 def void(money, creditcard, = {}) post = FirstPayPostData.new add_creditcard(post, creditcard) add_void_data(post, ) add_invoice(post, ) add_customer_data(post, ) commit('void', money, post) end |