Class: ActiveMerchant::Billing::HdfcGateway
- Defined in:
- lib/active_merchant/billing/gateways/hdfc.rb
Constant Summary
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(amount, payment_method, options = {}) ⇒ Object
- #capture(amount, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ HdfcGateway
constructor
A new instance of HdfcGateway.
- #purchase(amount, payment_method, options = {}) ⇒ Object
- #refund(amount, authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ HdfcGateway
Returns a new instance of HdfcGateway.
17 18 19 20 |
# File 'lib/active_merchant/billing/gateways/hdfc.rb', line 17 def initialize(={}) requires!(, :login, :password) super end |
Instance Method Details
#authorize(amount, payment_method, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/hdfc.rb', line 31 def (amount, payment_method, ={}) post = {} add_invoice(post, amount, ) add_payment_method(post, payment_method) add_customer_data(post, ) commit('authorize', post) end |
#capture(amount, authorization, options = {}) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/active_merchant/billing/gateways/hdfc.rb', line 40 def capture(amount, , ={}) post = {} add_invoice(post, amount, ) add_reference(post, ) add_customer_data(post, ) commit('capture', post) end |
#purchase(amount, payment_method, options = {}) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/hdfc.rb', line 22 def purchase(amount, payment_method, ={}) post = {} add_invoice(post, amount, ) add_payment_method(post, payment_method) add_customer_data(post, ) commit('purchase', post) end |
#refund(amount, authorization, options = {}) ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'lib/active_merchant/billing/gateways/hdfc.rb', line 49 def refund(amount, , ={}) post = {} add_invoice(post, amount, ) add_reference(post, ) add_customer_data(post, ) commit('refund', post) end |