Class: ActiveMerchant::Billing::BanwireGateway
- Defined in:
- lib/active_merchant/billing/gateways/banwire.rb
Constant Summary collapse
- URL =
'https://banwire.com/api.pago_pro'
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
-
#initialize(options = {}) ⇒ BanwireGateway
constructor
A new instance of BanwireGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #scrub(transcript) ⇒ Object
- #supports_scrubbing? ⇒ Boolean
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, card_brand, #generate_unique_id, inherited, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #test?
Methods included from CreditCardFormatting
#expdate, #format, #strftime_yyyymm
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ BanwireGateway
Returns a new instance of BanwireGateway.
11 12 13 14 |
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 11 def initialize( = {}) requires!(, :login) super end |
Instance Method Details
#purchase(money, creditcard, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 16 def purchase(money, creditcard, = {}) post = {} add_response_type(post) add_customer_data(post, ) add_order_data(post, ) add_creditcard(post, creditcard) add_address(post, creditcard, ) add_customer_data(post, ) add_amount(post, money, ) commit(money, post) end |
#scrub(transcript) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 33 def scrub(transcript) transcript. gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]'). gsub(%r((&?card_num=)[^&]*)i, '\1[FILTERED]'). gsub(%r((&?card_ccv2=)[^&]*)i, '\1[FILTERED]') end |
#supports_scrubbing? ⇒ Boolean
29 30 31 |
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 29 def supports_scrubbing? true end |