vantiv 1.0.0 → 1.0.1

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.
Files changed (75) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +2 -0
  5. data/CHANGELOG.md +7 -3
  6. data/README.md +4 -4
  7. data/bin/generate_sandbox_fixtures +2 -1
  8. data/exe/vantiv-certify-app +9 -30
  9. data/lib/vantiv.rb +17 -4
  10. data/lib/vantiv/api/address.rb +9 -2
  11. data/lib/vantiv/api/live_transaction_response.rb +4 -0
  12. data/lib/vantiv/api/request.rb +14 -8
  13. data/lib/vantiv/api/request_body.rb +6 -3
  14. data/lib/vantiv/api/response.rb +6 -6
  15. data/lib/vantiv/api/response_body.rb +13 -4
  16. data/lib/vantiv/api/transaction.rb +22 -4
  17. data/lib/vantiv/api/transaction_request_representer_xml.rb +4 -0
  18. data/lib/vantiv/api/transaction_response.rb +22 -3
  19. data/lib/vantiv/api/transaction_response_representer.rb +2 -0
  20. data/lib/vantiv/api/transaction_response_representer_xml.rb +2 -0
  21. data/lib/vantiv/certification/paypage_driver.rb +7 -1
  22. data/lib/vantiv/certification/views/index.html.erb +1 -1
  23. data/lib/vantiv/environment.rb +10 -5
  24. data/lib/vantiv/mocked_sandbox/api_request.rb +0 -2
  25. data/lib/vantiv/mocked_sandbox/fixture_generator.rb +11 -0
  26. data/lib/vantiv/mocked_sandbox/fixtures/auth--4457000300000007.json +8 -11
  27. data/lib/vantiv/mocked_sandbox/fixtures/auth--4457000301100004.json +8 -11
  28. data/lib/vantiv/mocked_sandbox/fixtures/auth--4457002100000005.json +7 -10
  29. data/lib/vantiv/mocked_sandbox/fixtures/auth--4457010000000009.json +7 -10
  30. data/lib/vantiv/mocked_sandbox/fixtures/auth--5112000101110009.json +8 -11
  31. data/lib/vantiv/mocked_sandbox/fixtures/auth--5112001600000006.json +7 -10
  32. data/lib/vantiv/mocked_sandbox/fixtures/auth--5112001900000003.json +7 -10
  33. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--4457000300000007.json +8 -11
  34. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--4457000301100004.json +8 -11
  35. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--4457002100000005.json +7 -10
  36. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--4457010000000009.json +7 -10
  37. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--5112000101110009.json +8 -11
  38. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--5112001600000006.json +7 -10
  39. data/lib/vantiv/mocked_sandbox/fixtures/auth_capture--5112001900000003.json +7 -10
  40. data/lib/vantiv/mocked_sandbox/fixtures/auth_reversal.json +6 -9
  41. data/lib/vantiv/mocked_sandbox/fixtures/capture.json +6 -9
  42. data/lib/vantiv/mocked_sandbox/fixtures/credit.json +6 -9
  43. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000300000007.json +6 -10
  44. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457000301100004.json +6 -10
  45. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457002100000005.json +6 -10
  46. data/lib/vantiv/mocked_sandbox/fixtures/refund--4457010000000009.json +6 -10
  47. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112000101110009.json +6 -10
  48. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001600000006.json +6 -10
  49. data/lib/vantiv/mocked_sandbox/fixtures/refund--5112001900000003.json +6 -10
  50. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--RGFQNCt6U1d1M21SeVByVTM4dHlHb1FsVkUrSmpnWXhNY0o5UkMzRlZFanZiUHVnYjN1enJXbG1WSDF4aXlNc.json +5 -4
  51. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--account-updater-account-closed-token.json +20 -0
  52. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--account-updater-contact-cardholder-token.json +20 -0
  53. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--account-updater-token.json +20 -0
  54. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--expired-card-token.json +20 -0
  55. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--insufficient-funds-token.json +20 -0
  56. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--invalid-account-number-token.json +20 -0
  57. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--mocked-valid-temporary-token.json +6 -9
  58. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--pDZJcmd1VjNlYXNaSlRMTGpocVZQY1NWVXE4Z W5UTko4NU9KK3p1L1p1Vzg4YzVPQVlSUHNITG1 JN2I0Nzl.json +5 -4
  59. data/lib/vantiv/mocked_sandbox/fixtures/tokenize--valid-account-token.json +20 -0
  60. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000300000007.json +6 -9
  61. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457000301100004.json +6 -9
  62. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457002100000005.json +6 -9
  63. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010000000009.json +6 -9
  64. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--4457010010900010.json +6 -8
  65. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112000101110009.json +6 -9
  66. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001600000006.json +6 -9
  67. data/lib/vantiv/mocked_sandbox/fixtures/tokenize_by_direct_post--5112001900000003.json +6 -9
  68. data/lib/vantiv/mocked_sandbox/fixtures/void.json +6 -9
  69. data/lib/vantiv/mocked_sandbox/mocked_response_representer.rb +1 -0
  70. data/lib/vantiv/paypage.rb +17 -3
  71. data/lib/vantiv/response_code_map.rb +960 -0
  72. data/lib/vantiv/test_card.rb +73 -81
  73. data/lib/vantiv/version.rb +1 -1
  74. data/vantiv-ruby.gemspec +3 -2
  75. metadata +32 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5f9b473eb8a3d878119b85cb9ad330b5ad8af5d9
4
- data.tar.gz: 5734e6739eaafbd3e31e684f739f27befd9c797e
2
+ SHA256:
3
+ metadata.gz: 27ec337c20c24981d68ec39f5db4634e15b1cb62880f53fd167da6d5f86eae6e
4
+ data.tar.gz: 9f91b90c596a142aa211d85092405bf3a2fa3543f5ff95d8ecf538410ee816d8
5
5
  SHA512:
6
- metadata.gz: 45fd5a14471fa72dc275f56435f08466581163df9b5e7f8e5c000d65aee01c8c601526a4839c2d990993827a21a861b2fa7f017c4957b83a4cf0486a628e10ad
7
- data.tar.gz: 64351720d5b21e19efe184fb47c28d4e7ef23c1e1d2620eb2700882fe74fe642d8a30c0809a47970fb7bd7beb64b79f5a37fde4bcd85254733317a68320d05e5
6
+ metadata.gz: 00bacdab79c33ef5bd48e8870f101c38c0a129c90e55b4975b16b5b3a8837bb9403fbd9992e89c2f46d13f917a342a02d7112105fb295ede8f942c949b972ddb
7
+ data.tar.gz: cb915f95ae7c5003369d01db7b8a026c614dd887d215b2aed7783b4c6314ebd4f40ec79b22faecfee8868b9c7c1f6bb41c07ffd10acf6842065ba15e59d5cd21
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /pkg/
10
10
  /spec/reports/
11
11
  /tmp/
12
+ /.idea
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.5.0
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  before_install: gem install bundler -v 1.10.6
3
3
  cache: bundler
4
+ addons:
5
+ firefox: "latest"
4
6
  notifications:
5
7
  email: false
@@ -1,4 +1,11 @@
1
1
  Vantiv Ruby Changes
2
+
3
+ master
4
+ -----------
5
+ - Update Vantiv XML version to 10.5
6
+ - Rename certiciation environment to precertification
7
+ - Add postcertification environment
8
+
2
9
  1.0.0
3
10
  -----------
4
11
  - Breaking changes: replace deprecated DevHub API with XML API
@@ -8,7 +15,6 @@ Vantiv Ruby Changes
8
15
  - Implement Apple Pay
9
16
  - Implement Security Code (CVV) mismatch filtering
10
17
 
11
-
12
18
  0.3.0
13
19
  -----------
14
20
  - Bug/fix: adds expiry arguments to the relevant methods when running the fixture generator
@@ -81,5 +87,3 @@ NOTE: API change occurs in this version bump on:
81
87
  - Add script to run all Devhub certification environment validation tests
82
88
  via script:
83
89
  - Allows merchants to install gem and certify quickly, rather than manually
84
-
85
-
data/README.md CHANGED
@@ -41,7 +41,7 @@ Vantiv requires merchants to certify their applications for usage with their API
41
41
  To certify your application, run the following script:
42
42
 
43
43
  ```
44
- $ bundle exec vantiv-certify-app -a sub-your-merchant-id-in-here -p your-paypage-id -u your-user -w your-password
44
+ $ bundle exec vantiv-certify-app
45
45
  ```
46
46
 
47
47
  A certs.txt file will be generated in the directory that the script is run, and then opened. It contains a list of XML Certification Order IDs and associated Transaction IDs, like follows:
@@ -57,7 +57,7 @@ AUTH_CAPTURE_2, transaction-id-for-AUTH_CAPTURE_2-here
57
57
  If you want to just run a subset of the certifications you can pass in the Test ID that you want to which match against using the `--filter_by` option. For example, if you only want to run the Account Updater certification, which have Test IDs that are prefixed with `ACCOUNT_UPDATER`, you would filter by `ACCOUNT_UPDATER` like follows:
58
58
 
59
59
  ```
60
- $ bundle exec vantiv-certify-app -a bar -p bla -u uzr -w pwd --filter_by=ACCOUNT_UPDATER
60
+ $ bundle exec vantiv-certify-app --filter_by=ACCOUNT_UPDATER
61
61
  ```
62
62
 
63
63
 
@@ -106,7 +106,7 @@ To render the payframe, the merchant must include the payframe js file in the pa
106
106
  # OR:
107
107
  <%= javascript_include_tag Vantiv.payframe_js %>
108
108
  # OR it can be hardcoded:
109
- <script src="https://request-prelive.np-securepaypage-litle.com/LitlePayPage/js/payframe-client.min.js" type="text/javascript"></script>
109
+ <script src="https://request.eprotect.vantivprelive.com/LitlePayPage/js/payframe-client.min.js" type="text/javascript"></script>
110
110
  ```
111
111
 
112
112
  To initialize the payframe:
@@ -329,7 +329,7 @@ To use the gem in any non-production environment, set the client's environment t
329
329
 
330
330
  ```ruby
331
331
  Vantiv.configure do |config|
332
- config.environment = Vantiv::Environment::CERTIFICATION
332
+ config.environment = Vantiv::Environment::PRECERTIFICATION
333
333
  end
334
334
  ```
335
335
 
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "vantiv"
4
+ require "vantiv/environment"
4
5
  require "vantiv/mocked_sandbox/fixture_generator"
5
6
 
6
7
  require "dotenv"
7
8
  Dotenv.load
8
9
  Vantiv.configure do |config|
9
- config.environment = Vantiv::Environment::CERTIFICATION
10
+ config.environment = Vantiv::Environment::PRECERTIFICATION
10
11
  config.merchant_id = ENV["MERCHANT_ID"]
11
12
  config.default_order_source = "ecommerce"
12
13
  config.paypage_id = ENV["PAYPAGE_ID"]
@@ -6,23 +6,7 @@ require 'optparse'
6
6
 
7
7
  options = {}
8
8
  parser = OptionParser.new do |opts|
9
- opts.banner = "Usage: vantiv-certify-app -a <merchant_id> -p <paypage_id> -u <user> -w <password> [--filter_by <test_name>]"
10
-
11
- opts.on("-a", "--merchant_id MERCHANT_ID", "Vantiv Merchant ID") do |merchant_id|
12
- options[:merchant_id] = merchant_id
13
- end
14
-
15
- opts.on("-p", "--paypage_id PAYPAGE_ID", "Vantiv Paypage ID") do |paypage_id|
16
- options[:paypage_id] = paypage_id
17
- end
18
-
19
- opts.on("-u", "--user VANTIV_USER", "Vantiv XML User") do |user|
20
- options[:user] = user
21
- end
22
-
23
- opts.on("-w", "--password VANTIV_PASSWORD", "Vantiv XML Password") do |password|
24
- options[:password] = password
25
- end
9
+ opts.banner = "Usage: vantiv-certify-app [--filter_by <test_name>]"
26
10
 
27
11
  opts.on("--filter_by [TEST_NAME]", "Filter which certifications to run") do |filter|
28
12
  options[:filter_by] = filter
@@ -31,26 +15,21 @@ end
31
15
 
32
16
  parser.parse!
33
17
 
34
- required_arguments = %i[merchant_id paypage_id user password]
35
- missing_arguments = required_arguments.select{ |required_argument| options[required_argument].nil? }
36
-
37
- if missing_arguments.any?
38
- puts "Missing options: #{missing_arguments.join(", ")}"
39
- puts parser.banner
40
- exit
41
- end
42
-
18
+ require "dotenv"
19
+ Dotenv.load
43
20
  Vantiv.configure do |config|
44
- config.merchant_id = options.fetch(:merchant_id)
45
- config.paypage_id = options.fetch(:paypage_id)
46
21
  config.environment = Vantiv::Environment::CERTIFICATION
22
+ config.merchant_id = ENV["MERCHANT_ID"]
23
+ config.default_order_source = "ecommerce"
24
+ config.paypage_id = ENV["PAYPAGE_ID"]
47
25
 
48
- config.user = options.fetch(:user)
49
- config.password = options.fetch(:password)
26
+ config.user = ENV["VANTIV_USER"]
27
+ config.password = ENV["VANTIV_PASSWORD"]
50
28
 
51
29
  config.default_report_group = '1'
52
30
  end
53
31
 
32
+
54
33
  Vantiv::Certification::ValidationTestRunner.run(
55
34
  save_to: "certs.txt",
56
35
  filter_by: options[:filter_by]
@@ -7,6 +7,7 @@ require 'vantiv/test_card'
7
7
  require 'vantiv/test_temporary_token'
8
8
  require 'vantiv/environment'
9
9
  require 'vantiv/mocked_sandbox'
10
+ require 'vantiv/response_code_map'
10
11
  require 'vantiv/paypage'
11
12
 
12
13
  module Vantiv
@@ -42,7 +43,8 @@ module Vantiv
42
43
 
43
44
  def self.auth(amount:, payment_account_id:, customer_id:, order_id:, expiry_month:, expiry_year:,
44
45
  order_source: Vantiv.default_order_source, use_temporarily_stored_security_code: false,
45
- online_payment_cryptogram: nil)
46
+ online_payment_cryptogram: nil, original_network_transaction_id: nil, processing_type: nil,
47
+ original_transaction_amount: nil)
46
48
 
47
49
  # RE use_temporarily_stored_security_code
48
50
  # From XML Docs:
@@ -62,7 +64,10 @@ module Vantiv
62
64
  expiry_year: expiry_year,
63
65
  cvv: cvv,
64
66
  order_source: order_source,
65
- online_payment_cryptogram: online_payment_cryptogram
67
+ online_payment_cryptogram: online_payment_cryptogram,
68
+ original_network_transaction_id: original_network_transaction_id,
69
+ original_transaction_amount: original_transaction_amount,
70
+ processing_type: processing_type
66
71
  )
67
72
  Api::Request.new(
68
73
  endpoint: Api::Endpoints::AUTHORIZATION,
@@ -99,7 +104,8 @@ module Vantiv
99
104
 
100
105
  def self.auth_capture(amount:, payment_account_id:, customer_id:, order_id:,
101
106
  expiry_month:, expiry_year:, order_source: Vantiv.default_order_source,
102
- online_payment_cryptogram: nil)
107
+ online_payment_cryptogram: nil, original_network_transaction_id: nil, processing_type: nil,
108
+ original_transaction_amount: nil)
103
109
  body = Api::RequestBody.for_auth_or_sale(
104
110
  amount: amount,
105
111
  order_id: order_id,
@@ -108,7 +114,10 @@ module Vantiv
108
114
  expiry_month: expiry_month,
109
115
  expiry_year: expiry_year,
110
116
  order_source: order_source,
111
- online_payment_cryptogram: online_payment_cryptogram
117
+ online_payment_cryptogram: online_payment_cryptogram,
118
+ original_network_transaction_id: original_network_transaction_id,
119
+ original_transaction_amount: original_transaction_amount,
120
+ processing_type: processing_type
112
121
  )
113
122
  Api::Request.new(
114
123
  endpoint: Api::Endpoints::SALE,
@@ -158,6 +167,10 @@ module Vantiv
158
167
  ).run
159
168
  end
160
169
 
170
+ def self.get_error_description(code:)
171
+ ResponseCodeMap.get_error_description(code: code)
172
+ end
173
+
161
174
  def self.configure
162
175
  yield self
163
176
  end
@@ -1,8 +1,15 @@
1
1
  module Vantiv
2
2
  module Api
3
3
  class Address
4
- attr_accessor :billing_name, :billing_address_1, :billing_address_2,
5
- :billing_city, :billing_state, :billing_zipcode, :billing_country
4
+ attr_accessor *%i(
5
+ billing_address_1
6
+ billing_address_2
7
+ billing_city
8
+ billing_country
9
+ billing_name
10
+ billing_state
11
+ billing_zipcode
12
+ )
6
13
  end
7
14
  end
8
15
  end
@@ -47,6 +47,10 @@ module Vantiv
47
47
  litle_transaction_response.account_updater || AccountUpdaterResponse.new
48
48
  end
49
49
 
50
+ def network_transaction_id
51
+ litle_transaction_response.network_transaction_id
52
+ end
53
+
50
54
  private
51
55
  def transaction_approved?
52
56
  response_code == RESPONSE_CODES[:approved]
@@ -26,7 +26,7 @@ module Vantiv
26
26
  end
27
27
 
28
28
  def run_request
29
- http_response = make_request
29
+ http_response = send_request(build_request)
30
30
  populated_response(@response_object, http_response)
31
31
  end
32
32
 
@@ -47,16 +47,20 @@ module Vantiv
47
47
  populated_body.transaction.application_id = populated_body.application_id
48
48
 
49
49
  populated_body.xmlns = "http://www.litle.com/schema"
50
- populated_body.version = "10.2"
50
+ populated_body.version = "10.5"
51
51
 
52
52
  populated_body
53
53
  end
54
54
 
55
- def make_request
56
- http = Net::HTTP.new(uri.host, uri.port)
57
- http.use_ssl = true
55
+ def build_request
58
56
  request = Net::HTTP::Post.new(uri.request_uri, header)
59
57
  request.body = body.to_xml
58
+ request
59
+ end
60
+
61
+ def send_request(request)
62
+ http = Net::HTTP.new(uri.host, uri.port)
63
+ http.use_ssl = true
60
64
  http.request(request)
61
65
  end
62
66
 
@@ -72,9 +76,11 @@ module Vantiv
72
76
 
73
77
  def root_uri
74
78
  if Vantiv::Environment.production?
75
- "https://transact.litle.com"
76
- elsif Vantiv::Environment.certification?
77
- "https://transact-prelive.litle.com"
79
+ "https://transact.vantivcnp.com"
80
+ elsif Vantiv::Environment.postcertification?
81
+ "https://transact.vantivpostlive.com"
82
+ elsif Vantiv::Environment.precertification?
83
+ "https://transact.vantivprelive.com"
78
84
  end
79
85
  end
80
86
 
@@ -40,8 +40,8 @@ module Vantiv
40
40
 
41
41
  def self.for_auth_or_sale(amount:, customer_id:, order_id:, payment_account_id:,
42
42
  expiry_month:, expiry_year:, cvv: nil, order_source: Vantiv.default_order_source,
43
- online_payment_cryptogram: nil)
44
-
43
+ online_payment_cryptogram: nil, original_network_transaction_id: nil,
44
+ processing_type: nil, original_transaction_amount: nil)
45
45
 
46
46
  if online_payment_cryptogram
47
47
  cardholder_authentication = CardholderAuthentication.new(
@@ -57,7 +57,10 @@ module Vantiv
57
57
  customer_id: customer_id,
58
58
  order_source: order_source,
59
59
  partial_approved_flag: false,
60
- cardholder_authentication: cardholder_authentication
60
+ cardholder_authentication: cardholder_authentication,
61
+ original_network_transaction_id: original_network_transaction_id,
62
+ processing_type: processing_type,
63
+ original_transaction_amount: original_transaction_amount
61
64
  )
62
65
  card = Card.new(
63
66
  expiry_month: expiry_month,
@@ -20,15 +20,15 @@ module Vantiv
20
20
  private
21
21
 
22
22
  def litle_response_has_error?
23
- body.response == "3" ||
24
- # NOTE: this kind of sucks, but at the commit point, the DevHub
25
- # Api sometimes gives 200OK when litle had a parse issue and returns
26
- # 'Error validating xml data...' instead of an actual error
27
- !!body.body_message.match(/error/i)
23
+ body.response != "0" || !!body.body_message.match(/error/i)
28
24
  end
29
25
 
30
26
  def api_level_error_message
31
- "API level error"
27
+ xml_validation_error? ? body.body_message : "API level error"
28
+ end
29
+
30
+ def xml_validation_error?
31
+ body.response == "1"
32
32
  end
33
33
 
34
34
  attr_reader :transaction_response_name
@@ -3,10 +3,19 @@ module Vantiv
3
3
  class ResponseBody
4
4
  attr_writer :message, :response_code
5
5
 
6
- attr_accessor :body_message, :response, :version, :request_id
7
-
8
- attr_accessor :authorization_response, :sale_response, :credit_response, :void_response,
9
- :auth_reversal_response, :capture_response, :register_token_response
6
+ attr_accessor *%i(
7
+ body_message
8
+ request_id
9
+ response
10
+ version
11
+ auth_reversal_response
12
+ authorization_response
13
+ capture_response
14
+ credit_response
15
+ register_token_response
16
+ sale_response
17
+ void_response
18
+ )
10
19
  end
11
20
  end
12
21
  end
@@ -1,12 +1,27 @@
1
1
  module Vantiv
2
2
  module Api
3
3
  class Transaction
4
- attr_accessor :id, :order_id, :customer_id, :order_source, :partial_approved_flag,
5
- :amount_in_cents, :report_group, :card, :type, :application_id, :address,
6
- :cardholder_authentication
4
+ attr_accessor *%i(
5
+ address
6
+ amount_in_cents
7
+ application_id
8
+ card
9
+ cardholder_authentication
10
+ customer_id
11
+ id
12
+ order_id
13
+ order_source
14
+ original_network_transaction_id
15
+ original_transaction_amount
16
+ partial_approved_flag
17
+ processing_type
18
+ report_group
19
+ type
20
+ )
7
21
 
8
22
  def initialize(id: nil, amount_in_cents: nil, order_id: nil, customer_id: nil,
9
- partial_approved_flag: nil, order_source: nil, cardholder_authentication: nil)
23
+ partial_approved_flag: nil, order_source: nil, cardholder_authentication: nil,
24
+ original_network_transaction_id: nil, processing_type: nil, original_transaction_amount: nil)
10
25
  @id = id
11
26
  @amount_in_cents = amount_in_cents
12
27
  @order_id = order_id
@@ -14,6 +29,9 @@ module Vantiv
14
29
  @partial_approved_flag = partial_approved_flag
15
30
  @order_source = order_source
16
31
  @cardholder_authentication = cardholder_authentication
32
+ @original_network_transaction_id = original_network_transaction_id
33
+ @processing_type = processing_type
34
+ @original_transaction_amount = original_transaction_amount
17
35
  end
18
36
 
19
37
  def amount
@@ -54,4 +54,8 @@ class TransactionRequestRepresenterXml < Representable::Decorator
54
54
  end
55
55
 
56
56
  property :partial_approved_flag, as: :allowPartialAuth
57
+
58
+ property :processing_type, as: :processingType
59
+ property :original_network_transaction_id, as: :originalNetworkTransactionId
60
+ property :original_transaction_amount, as: :originalTransactionAmount
57
61
  end
@@ -1,9 +1,28 @@
1
1
  module Vantiv
2
2
  module Api
3
3
  class TransactionResponse
4
- attr_accessor :message, :response_code, :transaction_id, :response_time, :id, :report_group, :payment_account_id,
5
- :post_date, :type, :bin, :auth_code, :customer_id, :order_id, :token_response_code, :token_message,
6
- :fraud_result, :account_updater, :token_response, :apple_pay_response
4
+ attr_accessor *%i(
5
+ account_updater
6
+ apple_pay_response
7
+ auth_code
8
+ bin
9
+ customer_id
10
+ fraud_result
11
+ id
12
+ message
13
+ network_transaction_id
14
+ order_id
15
+ payment_account_id
16
+ post_date
17
+ report_group
18
+ response_code
19
+ response_time
20
+ token_message
21
+ token_response
22
+ token_response_code
23
+ transaction_id
24
+ type
25
+ )
7
26
  end
8
27
  end
9
28
  end