GiactVerification

WARNING This gem only works for Version 5.8.x of GIACT's API
Installation
Add this line to your application's Gemfile:
gem 'giact_verification'
Or install it yourself as:
$ gem install giact_verification
Configuration
To set up your API keys, use the configuration helper like this:
GiactVerification.configure do |config|
config.api_username = 'foo'
config.api_password = 'bar'
config.giact_endpoint = :production
end
giact_endpoint
options are :production
, :sandbox
and :stubbed
.
:production
Will send requests to their production endpoint:sandbox
Will send requests to their sandbox endpoint:stubbed
Will stub requests locally (no network request) and return one of a series of set responses based on the last name passed.
gAuthenticate
GiactVerification::Authenticate
takes two arguements: a valid customer and a valid check.
GiactVerification::Authenticate.call(
customer: {
first_name: "Kent"
last_name: "Beck"
address_line1: "123 Test Dr."
city: "Abbotsford"
state: "MA"
zip_code: "54321"
phone_number: "4127982231"
tax_id: 9876543210
date_of_birth: Date.parse('Mar 6 1961')
},
check: {
routing_number: 123456789
account_number: 00012300089
}
)
GiactVerification::Authenticate.call()
will return a GiactVerification::Response
object which has the following API:
response = GiactVerification::Authenticate.call(customer: some_customer, check: some_check)
response.raw_request
response.raw_response
response.success?
response.parsed_response
{
item_reference_id: String,
created_date: DateTime,
verification_response: String,
account_response_code: String,
bank_name: String,
account_added_date: DateTime,
account_last_updated_date: DateTime,
account_closed_date: DateTime,
funds_confirmation_result: String,
customer_response_code: String
}
The following are valid customer fields. Please note that the required fields noted below only represent the bare minimum. Some GIACT services will require additional fields.
- name_prefix: 1-4 characters
- first_name: 2-40 characters REQUIRED
- middle_name: 1-40 characters
- last_name: 2-40 characters REQUIRED
- name_suffix: 1-4 characters
- address_line1: 2-40 characters REQUIRED
- address_line2: 1-40 characters
- city: 2-25 characters REQUIRED
- state: 2 characters, valid US state or Candian province REQUIRED
- zip_code: 5 or 7 or 10 characters, valid US or Canadian postal code REQUIRED
- country: Either 'US' or 'CA', defaults to 'US'
- phone_number: 10 numeric characters, can't start with 0, no dashes
- tax_id: Social security number or business ein REQUIRED
- date_of_birth: Date, DateTime or an object that responds to :strftime REQUIRED
- drivers_license_number: 1-28 numeric characters
- drivers_license_state: 2 characters, valid US state or Candian province
- email_address: 1-100 characters
- current_ip_address: 1-15 characters
- mobile_consent_record_id: Numeric, unspecified length
- alternative_id_type: Must be one of the following: 'UsaMilitaryId', 'UsaStateId', 'PassportUsa', 'PassportForeign', 'UsaResidentAlienId', 'StudentId', 'TribalId', 'DlCanada', 'DlMexico', or 'OtherForeignId'
- alternative_id_issuer: 1-50 characters
- alternative_id_number: 1-50 numeric characters
- domain: 1-100 characters
The following are valid check fields:
- routing_number: 9 numeric characters REQUIRED
- account_number: 4-17 numeric characters REQUIRED
- check_number: numeric, unspecified length
- check_amount: float or float-like string (eg. '100.01')
- account_type: one of the following: 'Checking', 'Savings' or 'Other'
Using config.giact_endpoint = :stubbed
will return a set response based on the last name passed in. These responses were built to be used in acceptance/integration tests. The built in responses were copied from the sandbox API and are as follows:
last_name: GiactError
Will respond with an errored response (mimicking an error on GIACT's server)last_name: GiactDeclined
Will respond with a declined response- ANY OTHER LAST NAME Will return a passed response
The response is stubbed at a HTTP level, you'll still need to pass valid customer and check parameters to pass local validation.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/georgewambold/giact_verification. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake
to run the tests.
License
The gem is available as open source under the terms of the MIT License.