Sha256: 94c1cd5f25bb33b018fe54e22bb786799fe48a13c5c4b2aec4882327c1306de9
Contents?: true
Size: 400 Bytes
Versions: 2
Compression:
Stored size: 400 Bytes
Contents
require 'httparty' module Moocher module Creditcard def cc_blacklisted?(cc_number) bin = cc_number.to_s.strip[0..5] return "Not a Valid input" if (bin =~ /\A\d{6}/).nil? base_url = 'https://api.moocher.io/l/BINLISTNET/t/creditcard/i/' response = HTTParty.get("#{base_url}#{bin}") response.success? ? response.parsed_response : response.success? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
moocher-0.2.2 | lib/moocher/creditcards.rb |
moocher-0.2.1.3 | lib/moocher/creditcards.rb |