Class: ActiveMerchant::Billing::InstapayGateway
- Defined in:
- lib/active_merchant/billing/gateways/instapay.rb
Constant Summary collapse
- GATEWAY_URL =
'https://trans.instapaygateway.com/cgi-bin/process.cgi'
- SUCCESS =
"Accepted"
- SUCCESS_MESSAGE =
"The transaction has been approved"
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
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ InstapayGateway
constructor
A new instance of InstapayGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from Utils
#deprecated, generate_unique_id
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ InstapayGateway
Returns a new instance of InstapayGateway.
22 23 24 25 26 |
# File 'lib/active_merchant/billing/gateways/instapay.rb', line 22 def initialize( = {}) requires!(, :login) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/instapay.rb', line 28 def (money, creditcard, = {}) post = {} post[:authonly] = 1 add_amount(post, money) add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, ) add_customer_data(post, ) commit('ns_quicksale_cc', post) end |
#capture(money, authorization, options = {}) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/active_merchant/billing/gateways/instapay.rb', line 51 def capture(money, , = {}) post = {} add_amount(post, money) add_reference(post, ) commit('ns_quicksale_cc', post) end |
#purchase(money, creditcard, options = {}) ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/active_merchant/billing/gateways/instapay.rb', line 40 def purchase(money, creditcard, = {}) post = {} add_amount(post, money) add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, ) add_customer_data(post, ) commit('ns_quicksale_cc', post) end |