# File lib/active_merchant/billing/integrations/payflow_link/helper.rb, line 8 8: def initialize(order, account, options = {}) 9: super 10: add_field('login', account) 11: add_field('echodata', 'True') 12: add_field('user2', self.test?) 13: add_field('invoice', order) 14: add_field('vendor', account) 15: add_field('user', options[:credential4] || account) 16: add_field('trxtype', 'S') 17: end
# File lib/active_merchant/billing/integrations/payflow_link/helper.rb, line 42 42: def billing_address(params = {}) 43: # Get the country code in the correct format 44: # Use what we were given if we can't find anything 45: country_code = lookup_country_code(params.delete(:country)) 46: add_field(mappings[:billing_address][:country], country_code) 47: 48: add_field(mappings[:billing_address][:address], [params.delete(:address1), params.delete(:address2)].compact.join(' ')) 49: 50: province_code = params.delete(:state) 51: add_field(mappings[:billing_address][:state], province_code.blank? ? 'N/A' : province_code.upcase) 52: 53: # Everything else 54: params.each do |k, v| 55: field = mappings[:billing_address][k] 56: add_field(field, v) unless field.nil? 57: end 58: end
# File lib/active_merchant/billing/integrations/payflow_link/helper.rb, line 87 87: def parse_response(response) 88: response = response.split("&").inject({}) do |hash, param| 89: key, value = param.split("=") 90: hash[key] = value 91: hash 92: end 93: 94: [response['SECURETOKEN'], response['SECURETOKENID']] if response['RESPMSG'] && response['RESPMSG'].downcase == "approved" 95: end
# File lib/active_merchant/billing/integrations/payflow_link/helper.rb, line 76 76: def request_secure_token 77: @fields["securetokenid"] = secure_token_id 78: @fields["createsecuretoken"] = "Y" 79: 80: fields = @fields.collect {|key, value| "#{key}[#{value.length}]=#{value}" }.join("&") 81: 82: response = ssl_post(secure_token_url, fields) 83: 84: parse_response(response) 85: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.