Class: GreenByPhone::Gateway
- Inherits:
-
Object
- Object
- GreenByPhone::Gateway
- Defined in:
- lib/green_by_phone/gateway.rb
Constant Summary collapse
- API_URL =
'https://www.greenbyphone.com/eCheck.asmx'
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Gateway
constructor
A new instance of Gateway.
- #one_time_draft(options = {}) ⇒ Object
- #recurring_draft(options = {}) ⇒ Object
- #verification_result(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Gateway
Returns a new instance of Gateway.
5 6 7 8 |
# File 'lib/green_by_phone/gateway.rb', line 5 def initialize( = {}) @login = [:login] @password = [:password] end |
Instance Method Details
#one_time_draft(options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/green_by_phone/gateway.rb', line 10 def one_time_draft( = {}) post = {} add_customer(post, ) add_check(post, ) commit([:real_time] ? 'OneTimeDraftRTV' : 'OneTimeDraftBV', post) end |
#recurring_draft(options = {}) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/green_by_phone/gateway.rb', line 17 def recurring_draft( = {}) post = {} add_customer(post, ) add_check(post, ) add_recurring(post, ) commit([:real_time] ? 'RecurringDraftRTV' : 'RecurringDraftBV', post) end |
#verification_result(options = {}) ⇒ Object
25 26 27 28 |
# File 'lib/green_by_phone/gateway.rb', line 25 def verification_result( = {}) post = { 'Check_ID' => [:check_id] } commit('VerificationResult', post) end |