priority_payout_gateway 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7beb080f9e76ef0360439d1cc37125cf507cf6b1
4
+ data.tar.gz: 76b2b24dd75c53468d0ad5279ba631f6b834e871
5
+ SHA512:
6
+ metadata.gz: 162c5b8722faf734f93199fdf0c24c6eb7736ed18ee6b610ecf530c7013bfe5bef65f119923db95cd1bc97d37e2b80961e4581151b661b12563c56e3b697ba75
7
+ data.tar.gz: 9f873e9a6a8ffbd193d9d7b464453165f240d14c10cd2a84fb3ef3099f4de426e08640ffac1dad7086686476d17b7ba8287527e578f7247c4ea16d1002ccb9a7
data/.env.sample ADDED
@@ -0,0 +1,3 @@
1
+ PPG_USERNAME: "myusername"
2
+ PPG_PASSWORD: "mypassword"
3
+
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ *.sublime-project
16
+ *.sublime-workspace
17
+
18
+ .DS_Store
19
+ .env
20
+ .ruby-version
21
+ .ruby-gemset
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.12.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in priority_payout_gateway.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Ben Eggett
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # PriorityPayoutGateway
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/priority_payout_gateway`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'priority_payout_gateway'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install priority_payout_gateway
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/priority_payout_gateway.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ require "dotenv"
3
+ Dotenv.load
4
+ require "bundler/setup"
5
+ require "priority_payout_gateway"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+ require "pry"
14
+ Pry.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,194 @@
1
+ module PriorityPayoutGateway
2
+ class Api
3
+ TRANSACTION_URL = ENV.fetch("TRANSACTION_URL", "https://secure.prioritypayoutgateway.com/api/transact.php")
4
+ QUERY_URL = ENV.fetch( "QUERY_URL", "https://secure.prioritypayoutgateway.com/api/query.php")
5
+ include HTTParty
6
+
7
+ attr_accessor :username, :password, :query
8
+
9
+ def initialize(options = {})
10
+ @username = options[:username] || ENV["PPG_USERNAME"]
11
+ @password = options[:password] || ENV["PPG_PASSWORD"]
12
+ end
13
+
14
+ def get(options={})
15
+ response = self.class.get(QUERY_URL, query: options.merge(credentials), timeout: 30, headers: headers)
16
+ api_type = options[:type] || options[:report_type]
17
+ handle_response(response, api_type)
18
+ end
19
+
20
+ def post(options={})
21
+ response = self.class.get(TRANSACTION_URL, query: options.merge(credentials), timeout: 30, headers: headers)
22
+ api_type = options[:type] || options[:customer_vault]
23
+ handle_response(response, api_type)
24
+ end
25
+
26
+ private
27
+
28
+ def handle_response(response, api_type)
29
+ if response.success?
30
+ PriorityPayoutGateway::Response.new(response, api_type)
31
+ else
32
+ PriorityPayoutGateway::Error.new(response.code, response.message, response)
33
+ end
34
+ end
35
+
36
+ def headers
37
+ {'Content-Type' => "application/xml", 'Accept' => "application/xml"}
38
+ end
39
+
40
+ def credentials
41
+ {username: username, password: password }
42
+ end
43
+
44
+ def set_query(options = {})
45
+ query = {}
46
+ query[:customer_vault] = options[:customer_vault] # add_customer or update_customer
47
+ query[:customer_vault_id] = options[:customer_vault_id]
48
+ query[:transactionid] = options[:transactionid]
49
+ query[:billing_id] = options[:billing_id]
50
+
51
+ # Query params
52
+ query[:condition] = options[:condition] # pending, pendingsettlement, failed, canceled, complete, unknown. Can be stringed together.
53
+ query[:transaction_type] = options[:transaction_type] # cc, ck
54
+ query[:action_type] = options[:action_type] # sale, refund, credit, auth, capture, void, return
55
+
56
+ query[:transaction_id] = options[:transaction_id] # can me multiple together
57
+ query[:cc_number] = options[:cc_number] # You can use either the full number or the last 4 digits of the credit card number.
58
+ query[:end_date] = options[:end_date] # YYYYMMDDhhmmss
59
+ query[:report_type] = options[:report_type] # receipt or customer_vault
60
+ query[:mobile_device_license] = options[:mobile_device_license]
61
+ query[:mobile_device_nickname] = options[:mobile_device_nickname]
62
+
63
+
64
+ # Credit Cards
65
+ query[:ccnumber] = options[:ccnumber]
66
+ query[:ccexp] = options[:ccexp] # FORMAT MMYY
67
+ query[:cvv] = options[:cvv] # Recommended
68
+
69
+ # Payment
70
+ query[:amount] = options[:amount]
71
+ query[:currency] = options[:currency] || 'USD'
72
+ query[:payment] = options[:payment] || 'creditcard' # creditcard or check
73
+ query[:processor_id] = options[:processor_id]
74
+ query[:dup_seconds] = options[:dup_seconds]
75
+ query[:billing_method] = options[:billing_method] # recurring
76
+ query[:customer_receipt] = options[:customer_receipt] # true, false
77
+
78
+ # Advanced Payment
79
+ query[:tax] = options[:tax]
80
+ query[:shipping] = options[:shipping]
81
+
82
+ # Recurring Billing
83
+ query[:recurring] = options[:recurring ] # add_subscription
84
+ query[:plan_id] = options [:plan_id]
85
+ query[:plan_name] = options [:plan_name]
86
+ query[:plan_payments] = options [:plan_payments] # 0 until canceled
87
+ query[:plan_amount] = options [:plan_amount]
88
+ query[:day_frequency] = options [:day_frequency]
89
+ query[:month_frequency] = options [:month_frequency] # 1-24
90
+ query[:day_of_month] = options [:day_of_month] # 1-31
91
+ query[:start_date] = options [:start_date] #YYYYMMDD
92
+ query[:subscription_id] = options [:subscription_id]
93
+
94
+
95
+ # Customer Billing
96
+ query[:first_name] = options[:first_name]
97
+ query[:last_name] = options[:last_name]
98
+ query[:company] = options[:company]
99
+ query[:address1] = options[:address1]
100
+ query[:address2] = options[:address2]
101
+ query[:city] = options[:city]
102
+ query[:state] = options[:state]
103
+ query[:zip] = options[:zip]
104
+ query[:country] = options[:country]
105
+ query[:phone] = options[:phone]
106
+ query[:fax] = options[:fax]
107
+ query[:email] = options[:email]
108
+ query[:ipaddress] = options[:ipaddress] # Recommended
109
+
110
+ # Additional Customer Info
111
+ query[:social_security_number] = options[:social_security_number]
112
+ query[:drivers_license_number] = options[:drivers_license_number]
113
+ query[:drivers_license_dob] = options[:drivers_license_dob]
114
+ query[:drivers_license_state] = options[:drivers_license_state]
115
+
116
+ # Customer Shipping
117
+ query[:shipping_id] = options[:shipping_id]
118
+ query[:shipping_first_name] = options[:shipping_first_name]
119
+ query[:shipping_last_name] = options[:shipping_last_name]
120
+ query[:shipping_company] = options[:shipping_company]
121
+ query[:shipping_address1] = options[:shipping_address1]
122
+ query[:shipping_address2] = options[:shipping_address2]
123
+ query[:shipping_city] = options[:shipping_city]
124
+ query[:shipping_state] = options[:shipping_state]
125
+ query[:shipping_zip] = options[:shipping_zip]
126
+ query[:shipping_country] = options[:shipping_country]
127
+ query[:shipping_phone] = options[:shipping_phone]
128
+ query[:shipping_fax] = options[:shipping_fax]
129
+ query[:shipping_email] = options[:shipping_email]
130
+
131
+ # For ACH
132
+ query[:checkname] = options[:check_name]
133
+ query[:checkaba] = options[:check_routing_number] # routing_number
134
+ query[:checkaccount] = options[:check_account_number]
135
+ query[:account_holder_type] = options[:account_holder_type] # personal or 'business'
136
+ query[:account_type] = options[:account_type] # checking or savings
137
+ query[:sec_code] = options[:sec_code] # 'PPD', 'WEB', 'TEL', or 'CCD'
138
+
139
+ # Optional order fields
140
+ query[:order_id] = options[:order_id]
141
+ query[:order_description] = options[:order_description]
142
+ query[:order_date] = options[:order_date]
143
+ query[:ponumber] = options[:ponumber]
144
+ query[:tracking_number] = options[:tracking_number]
145
+
146
+ # order update fields
147
+ query[:shipping_carrier] = options[:shipping_carrier] # ups, fedex, dhl, or usps
148
+ query[:shipping_postal] = options[:shipping_postal]
149
+ query[:ship_from_postal] = options[:ship_from_postal]
150
+ query[:shipping_date] = options[:shipping_date]
151
+ query[:summary_commodity_code] = options[:summary_commodity_code]
152
+ query[:duty_amount] = options[:duty_amount]
153
+ query[:discount_amount] = options[:discount_amount]
154
+ query[:tax] = options[:tax]
155
+ query[:national_tax_amount] = options[:national_tax_amount]
156
+ query[:alternate_tax_amount] = options[:alternate_tax_amount]
157
+ query[:alternate_tax_id] = options[:alternate_tax_id]
158
+ query[:vat_tax_amount] = options[:vat_tax_amount]
159
+ query[:vat_tax_rate] = options[:vat_tax_rate] # 1% = 1.00.
160
+ query[:vat_invoice_reference_number] = options[:vat_invoice_reference_number]
161
+ query[:merchant_vat_registration] = options[:merchant_vat_registration]
162
+ # merchant_defined_field_# Merchant Defined Fields.
163
+
164
+
165
+
166
+ # Descriptor fields
167
+ query[:descriptor] = options[:descriptor]
168
+ query[:descriptor_phone] = options[:descriptor_phone]
169
+ query[:descriptor_address] = options[:descriptor_address]
170
+ query[:descriptor_city] = options[:descriptor_city]
171
+ query[:descriptor_state] = options[:descriptor_state]
172
+ query[:descriptor_postal] = options[:descriptor_postal]
173
+ query[:descriptor_country] = options[:descriptor_country]
174
+ query[:descriptor_mcc] = options[:descriptor_mcc]
175
+ query[:descriptor_merchant_id] = options[:descriptor_merchant_id]
176
+ query[:descriptor_url] = options[:descriptor_url]
177
+
178
+ 1..20.to_a.each do |i|
179
+ query["merchant_defined_field_#{i}".to_sym] = options["merchant_defined_field_#{i}".to_sym]
180
+ end if options.select {|k,v| k.to_s.starts_with? 'merchant_defined_field' }.any?
181
+
182
+ @query = query.select {|k,v| !v.nil?}
183
+
184
+ end
185
+
186
+ def require_fields(*fields)
187
+ if query.values_at(*fields).include?(nil)
188
+ missing_fields = fields - query.keys
189
+ raise Error::MissingParameters.new("Missing required keys: #{missing_fields.to_s.gsub(']', '').gsub('[', '')}") if missing_fields.any?
190
+ end
191
+ end
192
+ end
193
+ end
194
+
@@ -0,0 +1,38 @@
1
+ module PriorityPayoutGateway
2
+ class CustomerVault < Api
3
+
4
+ # PriorityPayoutGateway::CustomerVault.new.create ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe"
5
+ def create(options = {})
6
+ query = set_query(options)
7
+ query[:customer_vault] = 'add_customer'
8
+
9
+ require_fields(:ccnumber, :ccexp)
10
+ response = post query
11
+ end
12
+
13
+ # PriorityPayoutGateway::CustomerVault.new.update customer_vault_id: 481397475, ccnumber: '4111111111111111', ccexp: "0220", first_name: "Jane", last_name: "Doe"
14
+ def update(options = {})
15
+ query = set_query(options)
16
+ query[:customer_vault] = 'update_customer'
17
+ require_fields(:customer_vault_id)
18
+ response = post query
19
+ end
20
+
21
+ # PriorityPayoutGateway::CustomerVault.new.destroy customer_vault_id: 481397475
22
+ def destroy(options = {})
23
+ query = set_query(options)
24
+ query[:customer_vault] = 'delete_customer'
25
+ require_fields(:customer_vault_id)
26
+ response = post query
27
+ end
28
+
29
+ # PriorityPayoutGateway::CustomerVault.new.find customer_vault_id: 481397475
30
+ def find(options = {})
31
+ query = set_query(options)
32
+ query[:report_type] = 'customer_vault'
33
+ require_fields(:customer_vault_id)
34
+ response = get query
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,15 @@
1
+ module PriorityPayoutGateway
2
+ class Data
3
+
4
+ # Attributes that have a value
5
+ def attributes
6
+ all_attributes.select {|x| !self.send(x).nil? }
7
+ end
8
+
9
+ def all_attributes
10
+ self.instance_variables.map{|attribute| attribute.to_s.gsub('@', '').to_sym }
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,20 @@
1
+ module PriorityPayoutGateway
2
+ class Error
3
+ class AuthenticationError < StandardError; end
4
+ class NoApiKey < AuthenticationError; end
5
+ class InvalidResponseFormat < TypeError; end
6
+ class MissingParameters < TypeError; end
7
+ class Timeout < Timeout::Error ; end
8
+ class NoData < EOFError; end
9
+
10
+ attr_reader :message, :code, :response
11
+
12
+ def initialize( code, message, response)
13
+ @code = response_code
14
+ @message = response_message
15
+ @response = response
16
+ end
17
+
18
+ end
19
+ end
20
+
@@ -0,0 +1,55 @@
1
+ module PriorityPayoutGateway
2
+ class Recurring < Api
3
+
4
+ # PriorityPayoutGateway::Recurring.new.create_plan plan_amount: 1.99, plan_name: "Test 1.99", plan_id: "test-1", month_frequency: 1, day_of_month: 1
5
+ def create_plan(options = {})
6
+ query = set_query(options)
7
+ # Vault Info
8
+ query[:recurring] = 'add_plan'
9
+ query[:type] = 'recurring'
10
+ query[:plan_payments] ||= '0'
11
+ require_fields(:plan_amount, :plan_name, :plan_id) # day_frequency, #month_frequency 1-24, # day_of month 1-31
12
+ response = post query
13
+ end
14
+
15
+
16
+ # PriorityPayoutGateway::Recurring.new.add_subscription_to_plan plan_id: "test-1", customer_vault_id: 664625840
17
+ def add_subscription_to_plan(options = {})
18
+ query = set_query(options)
19
+ query[:recurring] = 'add_subscription'
20
+ query[:type] = 'recurring'
21
+ require_fields(:plan_id) # day_frequency, #month_frequency 1-24, # day_of month 1-31
22
+ response = post query
23
+ end
24
+
25
+ # PriorityPayoutGateway::Recurring.new.add_custom_subscription plan_amount: 1.99, month_frequency: 1, day_of_month: 1, customer_vault_id: 664625840
26
+ def add_custom_subscription(options = {})
27
+ query = set_query(options)
28
+ query[:recurring] = 'add_subscription'
29
+ query[:type] = 'recurring'
30
+ query[:plan_payments] ||= '0'
31
+ require_fields(:plan_payments, :plan_amount) # day_frequency, #month_frequency 1-24, # day_of month 1-31
32
+ response = post query
33
+ end
34
+
35
+ # PriorityPayoutGateway::Recurring.new.update_subscription subscription_id: "3261766445", first_name: "John", last_name: "Doe"
36
+ def update_subscription(options = {})
37
+ query = set_query(options)
38
+ query[:recurring] = 'update_subscription'
39
+ query[:type] = 'recurring'
40
+ require_fields(:subscription_id)
41
+ response = post query
42
+ end
43
+
44
+ # PriorityPayoutGateway::Recurring.new.delete_subscription subscription_id: "3261766445"
45
+ def delete_subscription(options = {})
46
+ query = set_query(options)
47
+ query[:recurring] = 'delete_subscription'
48
+ query[:type] = 'recurring'
49
+ require_fields(:subscription_id)
50
+ response = post query
51
+ end
52
+
53
+ end
54
+ end
55
+
@@ -0,0 +1,173 @@
1
+ module PriorityPayoutGateway
2
+ class Response
3
+
4
+ attr_accessor :response, :success, :code, :api_type, :transactions, :customers, :response_text, :response_message, :customer_vault_id, :subscription_id, :plan_id, :plan_amount, :orderid, :transactionid
5
+
6
+ def initialize(response, api_type)
7
+ @response = response
8
+ @code = response.code
9
+ @api_type = api_type
10
+ @success = response.success?
11
+ send "set_#{api_type}"
12
+ end
13
+
14
+ def set_
15
+ parsed_response
16
+ binding.pry
17
+ end
18
+
19
+ def success?
20
+ !!success
21
+ end
22
+
23
+ private
24
+
25
+ def parsed_response
26
+ if response.body.is_a?(String)
27
+ if response.body.include?('xml')
28
+ Hash.from_xml response.body
29
+ else
30
+ parsed = CGI.parse(response.body)
31
+ @response_message = responses[parsed['response'].first]
32
+ @success = parsed['response'].first == '1'
33
+ @response_text = parsed['responsetext'].first
34
+ @customer_vault_id = parsed['customer_vault_id'].first if parsed['customer_vault_id'].first.present?
35
+ @plan_id = parsed['plan_id'].first if parsed['plan_id'].first.present?
36
+ @plan_amount = parsed['plan_amount'].first if parsed['plan_amount'].first.present?
37
+ @subscription_id = parsed['subscription_id'].first if parsed['subscription_id'].first.present?
38
+ @orderid = parsed['orderid'].first if parsed['orderid'].first.present?
39
+ @transactionid = parsed['transactionid'].first if parsed['transactionid'].first.present?
40
+ parsed
41
+ end
42
+ else
43
+ response
44
+ end
45
+ end
46
+
47
+
48
+ def set_transaction
49
+ parsed_response
50
+ if parsed_response && parsed_response['nm_response'].present? && parsed_response['nm_response']['transaction'].present?
51
+ transactions = parsed_response['nm_response']['transaction']
52
+ if transactions.is_a?(Hash)
53
+ @transactions = [ PriorityPayoutGateway::Result::Transaction.new( transactions ) ]
54
+ elsif transactions.is_a?(Array)
55
+ @transactions = transactions.map {|c| PriorityPayoutGateway::Result::Transaction.new( c ) }
56
+ end
57
+ else
58
+ self
59
+ end
60
+ end
61
+ alias_method :set_sale, :set_transaction
62
+ alias_method :set_auth, :set_transaction
63
+ alias_method :set_credit, :set_transaction
64
+ alias_method :set_validate, :set_transaction
65
+ alias_method :set_capture, :set_transaction
66
+ alias_method :set_void, :set_transaction
67
+ alias_method :set_refund, :set_transaction
68
+ alias_method :set_update, :set_transaction
69
+
70
+ def set_customer
71
+ parsed_response
72
+ end
73
+ alias_method :set_add_customer, :set_customer
74
+ alias_method :set_update_customer, :set_customer
75
+ alias_method :set_delete_customer, :set_customer
76
+
77
+ # def set_receipt
78
+ # parsed_response
79
+ # end
80
+
81
+ def set_recurring
82
+ parsed_response
83
+ end
84
+
85
+ def set_customer_vault
86
+ parsed_response
87
+ if parsed_response && parsed_response['nm_response'] && parsed_response['nm_response']['customer_vault'] && customers = parsed_response['nm_response']['customer_vault']['customer']
88
+ if customers.is_a?(Hash)
89
+ @customers = [ PriorityPayoutGateway::Result::Customer.new( customers ) ]
90
+ elsif customers.is_a?(Array)
91
+ @customers = customers.map {|c| PriorityPayoutGateway::Result::Customer.new( c ) }
92
+ end
93
+ end
94
+ end
95
+
96
+ def responses
97
+ {"1" => "Transaction Approved", "2" => "Transaction Declined", "3" => "Error in transaction data or system error"}
98
+ end
99
+
100
+ def response_codes
101
+ {
102
+ "100" => "Transaction was approved.",
103
+ "200" => "Transaction was declined by processor.",
104
+ "201" => "Do not honor.",
105
+ "202" => "Insufficient funds.",
106
+ "203" => "Over limit.",
107
+ "204" => "Transaction not allowed.",
108
+ "220" => "Incorrect payment information.",
109
+ "221" => "No such card issuer.",
110
+ "222" => "No card number on file with issuer.",
111
+ "223" => "Expired card.",
112
+ "224" => "Invalid expiration date.",
113
+ "225" => "Invalid card security code.",
114
+ "240" => "Call issuer for further information.",
115
+ "250" => "Pick up card.",
116
+ "251" => "Lost card.",
117
+ "252" => "Stolen card.",
118
+ "253" => "Fraudulent card.",
119
+ "260" => "Declined with further instructions available. (See response text)",
120
+ "261" => "Declined-Stop all recurring payments.",
121
+ "262" => "Declined-Stop this recurring program.",
122
+ "263" => "Declined-Update cardholder data available.",
123
+ "264" => "Declined-Retry in a few days.",
124
+ "300" => "Transaction was rejected by gateway.",
125
+ "400" => "Transaction error returned by processor.",
126
+ "410" => "Invalid merchant configuration.",
127
+ "411" => "Merchant account is inactive.",
128
+ "420" => "Communication error.",
129
+ "421" => "Communication error with issuer.",
130
+ "430" => "Duplicate transaction at processor.",
131
+ "440" => "Processor format error.",
132
+ "441" => "Invalid transaction information.",
133
+ "460" => "Processor feature not available.",
134
+ "461" => "Unsupported card type."
135
+ }
136
+ end
137
+
138
+ def avs_response_codes
139
+ {
140
+ "X" => "Exact match, 9-character numeric ZIP",
141
+ "Y" => "Exact match, 5-character numeric ZIP",
142
+ "D" => "Exact match, 5-character numeric ZIP",
143
+ "M" => "Exact match, 5-character numeric ZIP",
144
+ "A" => "Address match only",
145
+ "B" => "Address match only",
146
+ "W" => "9-character numeric ZIP match only",
147
+ "Z" => "5-character ZIP match only",
148
+ "P" => "5-character ZIP match only",
149
+ "L" => "5-character ZIP match only",
150
+ "N" => "No address or ZIP match only",
151
+ "C" => "No address or ZIP match only",
152
+ "U" => "Address unavailable",
153
+ "G" => "Non-U.S. issuer does not participate",
154
+ "I" => "Non-U.S. issuer does not participate",
155
+ "R" => "Issuer system unavailable",
156
+ "E" => "Not a mail/phone order",
157
+ "S" => "Service not supported",
158
+ "O" => "AVS not available"
159
+ }
160
+ end
161
+
162
+ def cvv_response_codes
163
+ {
164
+ "M" => "CVV2/CVC2 match",
165
+ "N" => "CVV2/CVC2 no match",
166
+ "P" => "Not processed",
167
+ "S" => "Merchant has indicated that CVV2/CVC2 is not present on card",
168
+ "U" => "Issuer is not certified and/or has not provided Visa encryption keys"
169
+ }
170
+ end
171
+
172
+ end
173
+ end
@@ -0,0 +1,38 @@
1
+ module PriorityPayoutGateway
2
+ module Result
3
+ class Action < Data
4
+
5
+ attr_accessor :amount, :action_type, :date, :success, :ip_address, :source, :username, :response_text, :batch_id, :processor_batch_id, :response_code, :processor_response_text, :processor_response_code, :device_license_number, :device_nickname
6
+
7
+ attr_accessor
8
+
9
+ def initialize(action)
10
+ set_attributes(action)
11
+ $actions ||= []
12
+ $actions << action.keys
13
+ end
14
+
15
+ private
16
+
17
+ def set_attributes(action)
18
+ @amount = action["amount"]
19
+ @action_type = action["action_type"]
20
+ @date = action["date"]
21
+ @success = action["success"]
22
+ @ip_address = action["ip_address"]
23
+ @source = action["source"]
24
+ @username = action["username"]
25
+ @response_text = action["response_text"]
26
+ @batch_id = action["batch_id"]
27
+ @processor_batch_id = action["processor_batch_id"]
28
+ @response_code = action["response_code"]
29
+ @processor_response_text = action["processor_response_text"]
30
+ @processor_response_code = action["processor_response_code"]
31
+ @device_license_number = action["device_license_number"]
32
+ @device_nickname = action["device_nickname"]
33
+
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,63 @@
1
+ module PriorityPayoutGateway
2
+ module Result
3
+ class Customer < Data
4
+
5
+ attr_accessor :id, :first_name, :last_name, :address_1, :address_2, :company, :city, :state, :postal_code, :country, :email, :phone, :fax, :cell_phone, :customertaxid, :website, :shipping_first_name, :shipping_last_name, :shipping_address_1, :shipping_address_2, :shipping_company, :shipping_city, :shipping_state, :shipping_postal_code, :shipping_country, :shipping_email, :shipping_carrier, :tracking_number, :shipping_date, :shipping, :cc_number, :cc_hash, :cc_exp, :cc_start_date, :cc_issue_number, :check_account, :check_hash, :check_aba, :check_name, :account_holder_type, :account_type, :sec_code, :processor_id, :cc_bin, :customer_vault_id
6
+
7
+
8
+ def initialize(customer)
9
+ set_attributes(customer)
10
+ end
11
+
12
+ private
13
+ def set_attributes(customer)
14
+ @id = customer["id"]
15
+ @first_name = customer["first_name"]
16
+ @last_name = customer["last_name"]
17
+ @address_1 = customer["address_1"]
18
+ @address_2 = customer["address_2"]
19
+ @company = customer["company"]
20
+ @city = customer["city"]
21
+ @state = customer["state"]
22
+ @postal_code = customer["postal_code"]
23
+ @country = customer["country"]
24
+ @email = customer["email"]
25
+ @phone = customer["phone"]
26
+ @fax = customer["fax"]
27
+ @cell_phone = customer["cell_phone"]
28
+ @customertaxid = customer["customertaxid"]
29
+ @website = customer["website"]
30
+ @shipping_first_name = customer["shipping_first_name"]
31
+ @shipping_last_name = customer["shipping_last_name"]
32
+ @shipping_address_1 = customer["shipping_address_1"]
33
+ @shipping_address_2 = customer["shipping_address_2"]
34
+ @shipping_company = customer["shipping_company"]
35
+ @shipping_city = customer["shipping_city"]
36
+ @shipping_state = customer["shipping_state"]
37
+ @shipping_postal_code = customer["shipping_postal_code"]
38
+ @shipping_country = customer["shipping_country"]
39
+ @shipping_email = customer["shipping_email"]
40
+ @shipping_carrier = customer["shipping_carrier"]
41
+ @tracking_number = customer["tracking_number"]
42
+ @shipping_date = customer["shipping_date"]
43
+ @shipping = customer["shipping"]
44
+ @cc_number = customer["cc_number"]
45
+ @cc_hash = customer["cc_hash"]
46
+ @cc_exp = customer["cc_exp"]
47
+ @cc_start_date = customer["cc_start_date"]
48
+ @cc_issue_number = customer["cc_issue_number"]
49
+ @check_account = customer["check_account"]
50
+ @check_hash = customer["check_hash"]
51
+ @check_aba = customer["check_aba"]
52
+ @check_name = customer["check_name"]
53
+ @account_holder_type = customer["account_holder_type"]
54
+ @account_type = customer["account_type"]
55
+ @sec_code = customer["sec_code"]
56
+ @processor_id = customer["processor_id"]
57
+ @cc_bin = customer["cc_bin"]
58
+ @customer_vault_id = customer["customer_vault_id"]
59
+ end
60
+
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,74 @@
1
+
2
+
3
+ module PriorityPayoutGateway
4
+ module Result
5
+ class Transaction < Data
6
+
7
+ attr_accessor :transaction_id, :partial_payment_id, :partial_payment_balance, :platform_id, :transaction_type, :condition, :order_id, :authorization_code, :ponumber, :order_description, :first_name, :last_name, :address_1, :address_2, :company, :city, :state, :postal_code, :country, :email, :phone, :fax, :cell_phone, :customertaxid, :customerid, :website, :shipping_first_name, :shipping_last_name, :shipping_address_1, :shipping_address_2, :shipping_company, :shipping_city, :shipping_state, :shipping_postal_code, :shipping_country, :shipping_email, :shipping_carrier, :tracking_number, :shipping_date, :shipping, :shipping_phone, :cc_number, :cc_hash, :cc_exp, :cavv, :actions
8
+
9
+ def initialize(transaction)
10
+ set_attributes(transaction)
11
+ end
12
+
13
+ private
14
+
15
+ def set_attributes(transaction)
16
+ @transaction_id = transaction["transaction_id"]
17
+ @partial_payment_id = transaction["partial_payment_id"]
18
+ @partial_payment_balance = transaction["partial_payment_balance"]
19
+ @platform_id = transaction["platform_id"]
20
+ @transaction_type = transaction["transaction_type"]
21
+ @condition = transaction["condition"]
22
+ @order_id = transaction["order_id"]
23
+ @authorization_code = transaction["authorization_code"]
24
+ @ponumber = transaction["ponumber"]
25
+ @order_description = transaction["order_description"]
26
+ @first_name = transaction["first_name"]
27
+ @last_name = transaction["last_name"]
28
+ @address_1 = transaction["address_1"]
29
+ @address_2 = transaction["address_2"]
30
+ @company = transaction["company"]
31
+ @city = transaction["city"]
32
+ @state = transaction["state"]
33
+ @postal_code = transaction["postal_code"]
34
+ @country = transaction["country"]
35
+ @email = transaction["email"]
36
+ @phone = transaction["phone"]
37
+ @fax = transaction["fax"]
38
+ @cell_phone = transaction["cell_phone"]
39
+ @customertaxid = transaction["customertaxid"]
40
+ @customerid = transaction["customerid"]
41
+ @website = transaction["website"]
42
+ @shipping_first_name = transaction["shipping_first_name"]
43
+ @shipping_last_name = transaction["shipping_last_name"]
44
+ @shipping_address_1 = transaction["shipping_address_1"]
45
+ @shipping_address_2 = transaction["shipping_address_2"]
46
+ @shipping_company = transaction["shipping_company"]
47
+ @shipping_city = transaction["shipping_city"]
48
+ @shipping_state = transaction["shipping_state"]
49
+ @shipping_postal_code = transaction["shipping_postal_code"]
50
+ @shipping_country = transaction["shipping_country"]
51
+ @shipping_email = transaction["shipping_email"]
52
+ @shipping_carrier = transaction["shipping_carrier"]
53
+ @tracking_number = transaction["tracking_number"]
54
+ @shipping_date = transaction["shipping_date"]
55
+ @shipping = transaction["shipping"]
56
+ @shipping_phone = transaction["shipping_phone"]
57
+ @cc_number = transaction["cc_number"]
58
+ @cc_hash = transaction["cc_hash"]
59
+ @cc_exp = transaction["cc_exp"]
60
+ @cavv = transaction["cavv"]
61
+ set_actions(transaction["action"])
62
+ end
63
+
64
+ def set_actions(actions)
65
+ if actions.is_a?(Hash)
66
+ @actions = [ PriorityPayoutGateway::Result::Action.new( actions ) ]
67
+ elsif actions.is_a?(Array)
68
+ @actions = actions.map {|c| PriorityPayoutGateway::Result::Action.new( c ) }
69
+ end if actions.present?
70
+ end
71
+
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,80 @@
1
+ module PriorityPayoutGateway
2
+ class Transaction < Api
3
+
4
+ # PriorityPayoutGateway::Transaction.new.sale ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe", amount: 22.30, email: "john@doe.com", country: "US"
5
+
6
+ # PriorityPayoutGateway::Transaction.new.sale ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe", amount: 22.45, email: "john@doe.com", country: "US", customer_vault: "add_customer"
7
+ def sale(options = {})
8
+ query = set_query(options)
9
+ query[:type] = 'sale'
10
+ require_fields(:first_name, :last_name, :email, :amount) # :ccnumber, :ccexp, :customer_vault_id
11
+ post query
12
+ end
13
+
14
+ # PriorityPayoutGateway::Transaction.new.authorize ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe", amount: 22.25, email: "john@doe.com", country: "US"
15
+ def authorize(options = {})
16
+ query = set_query(options)
17
+ query[:type] = 'auth'
18
+ require_fields(:first_name, :last_name, :email, :amount ) # :ccnumber, :ccexp,
19
+ post query
20
+ end
21
+
22
+ # PriorityPayoutGateway::Transaction.new.capture transactionid: 3261830498, amount: 22.30
23
+ def capture(options = {})
24
+ query = set_query(options)
25
+ query[:type] = 'capture'
26
+ require_fields(:transactionid, :amount )
27
+ post query
28
+ end
29
+
30
+ # PriorityPayoutGateway::Transaction.new.void transactionid: 3261830498, amount: 22.30
31
+ def void(options = {})
32
+ query = set_query(options)
33
+ query[:type] = 'void'
34
+ require_fields(:transactionid)
35
+ post query
36
+ end
37
+
38
+ # PriorityPayoutGateway::Transaction.new.refund transactionid: 3261844010, amount: 5
39
+ def refund(options = {})
40
+ query = set_query(options)
41
+ query[:type] = 'refund'
42
+ require_fields(:transactionid) # amount
43
+ post query
44
+ end
45
+
46
+ # PriorityPayoutGateway::Transaction.new.update transactionid: 3261844010, first_name: "joe"
47
+ def update(options = {})
48
+ query = set_query(options)
49
+ query[:type] = 'update'
50
+ require_fields(:transactionid)
51
+ post query
52
+ end
53
+
54
+ # PriorityPayoutGateway::Transaction.new.find transactionid: 3261844010
55
+ def find(options = {})
56
+ query = set_query(options)
57
+ query[:report_type] ||= 'transaction'
58
+ response = get query
59
+ end
60
+
61
+ # Disabled for our merchant account
62
+ # PriorityPayoutGateway::Transaction.new.credit ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe", amount: 22.30, email: "john@doe.com", country: "US"
63
+ def credit(options = {})
64
+ query = set_query(options)
65
+ query[:type] = 'credit'
66
+ require_fields(:first_name, :last_name, :email, :amount ) # :ccnumber, :ccexp,
67
+ post query
68
+ end
69
+
70
+ # Disabled for our merchant account
71
+ # PriorityPayoutGateway::Transaction.new.validate ccnumber: '4111111111111111', ccexp: "0219", first_name: "John", last_name: "Doe", email: "john@doe.com", country: "US"
72
+ def validate(options = {})
73
+ query = set_query(options)
74
+ query[:type] = 'validate'
75
+ require_fields(:first_name, :last_name, :email) # :ccnumber, :ccexp,
76
+ post query
77
+ end
78
+
79
+ end
80
+ end
@@ -0,0 +1,3 @@
1
+ module PriorityPayoutGateway
2
+ VERSION = "0.9.0"
3
+ end
@@ -0,0 +1,22 @@
1
+ require "rubygems"
2
+ require "active_support/all"
3
+ require "httparty"
4
+ require "ostruct"
5
+
6
+ require "priority_payout_gateway/api"
7
+ require "priority_payout_gateway/data"
8
+ require "priority_payout_gateway/result/action"
9
+ require "priority_payout_gateway/result/transaction"
10
+ require "priority_payout_gateway/result/customer"
11
+ require "priority_payout_gateway/customer_vault"
12
+
13
+ require "priority_payout_gateway/error"
14
+ require "priority_payout_gateway/recurring"
15
+ require "priority_payout_gateway/response"
16
+ require "priority_payout_gateway/transaction"
17
+ require "priority_payout_gateway/version"
18
+
19
+ module PriorityPayoutGateway
20
+
21
+
22
+ end
@@ -0,0 +1,46 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'priority_payout_gateway/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "priority_payout_gateway"
8
+ spec.version = PriorityPayoutGateway::VERSION
9
+ spec.authors = ["Ben Eggett"]
10
+ spec.email = ["beneggett@gmail.com"]
11
+ spec.authors = ["Ben Eggett"]
12
+ spec.email = ["beneggett@gmail.com"]
13
+
14
+ spec.summary = %q{ Priority Payout Gateway (NMI) Api }
15
+ spec.description = %q{ Ruby wrapper for interacting with the Priority Payout Gateway. Priority Payout Gateway is a white label gateway for NMI. }
16
+ spec.homepage = "https://github.com/beneggett/sportradar-api"
17
+
18
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
20
+ if spec.respond_to?(:metadata)
21
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
22
+ else
23
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_development_dependency "bundler", "~> 1.12"
32
+ spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "minitest", "~> 5.0"
34
+ spec.add_development_dependency "vcr"
35
+ spec.add_development_dependency "webmock"
36
+ spec.add_development_dependency "pry"
37
+ spec.add_development_dependency "guard"
38
+ spec.add_development_dependency "guard-minitest"
39
+ spec.add_development_dependency "coveralls"
40
+ spec.add_development_dependency "simplecov"
41
+ spec.add_development_dependency "minitest-focus"
42
+ spec.add_development_dependency "dotenv"
43
+ spec.add_dependency "httparty", ">= 0.14.0"
44
+ spec.add_dependency "activesupport"
45
+
46
+ end
metadata ADDED
@@ -0,0 +1,263 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: priority_payout_gateway
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Ben Eggett
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: vcr
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: guard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-minitest
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: coveralls
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: minitest-focus
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: dotenv
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: httparty
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: 0.14.0
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 0.14.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: activesupport
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ description: " Ruby wrapper for interacting with the Priority Payout Gateway. Priority
210
+ Payout Gateway is a white label gateway for NMI. "
211
+ email:
212
+ - beneggett@gmail.com
213
+ executables: []
214
+ extensions: []
215
+ extra_rdoc_files: []
216
+ files:
217
+ - ".env.sample"
218
+ - ".gitignore"
219
+ - ".travis.yml"
220
+ - Gemfile
221
+ - LICENSE.txt
222
+ - README.md
223
+ - Rakefile
224
+ - bin/console
225
+ - bin/setup
226
+ - lib/priority_payout_gateway.rb
227
+ - lib/priority_payout_gateway/api.rb
228
+ - lib/priority_payout_gateway/customer_vault.rb
229
+ - lib/priority_payout_gateway/data.rb
230
+ - lib/priority_payout_gateway/error.rb
231
+ - lib/priority_payout_gateway/recurring.rb
232
+ - lib/priority_payout_gateway/response.rb
233
+ - lib/priority_payout_gateway/result/action.rb
234
+ - lib/priority_payout_gateway/result/customer.rb
235
+ - lib/priority_payout_gateway/result/transaction.rb
236
+ - lib/priority_payout_gateway/transaction.rb
237
+ - lib/priority_payout_gateway/version.rb
238
+ - priority_payout_gateway.gemspec
239
+ homepage: https://github.com/beneggett/sportradar-api
240
+ licenses: []
241
+ metadata:
242
+ allowed_push_host: https://rubygems.org
243
+ post_install_message:
244
+ rdoc_options: []
245
+ require_paths:
246
+ - lib
247
+ required_ruby_version: !ruby/object:Gem::Requirement
248
+ requirements:
249
+ - - ">="
250
+ - !ruby/object:Gem::Version
251
+ version: '0'
252
+ required_rubygems_version: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ requirements: []
258
+ rubyforge_project:
259
+ rubygems_version: 2.5.1
260
+ signing_key:
261
+ specification_version: 4
262
+ summary: Priority Payout Gateway (NMI) Api
263
+ test_files: []