eway_rapid 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 478acbee46e2da78654b8f5247e3c52e0b27c573
4
- data.tar.gz: dd78e049b7ab567023388bf66ba32939a6db06b0
3
+ metadata.gz: 3cadf9a06166c7bff3ef2ebf6129fa768c421390
4
+ data.tar.gz: eb63766a182424dab6d7d5cdacb150585af32a5f
5
5
  SHA512:
6
- metadata.gz: 8fd579db7ef9c8b9e038323ce2c5870f25df693905e29d9fcff9a47874b0ffae3848a2cde2533447eaab5d435001642f33dd9aa3b7d44624444e0d35bc29ebd9
7
- data.tar.gz: 8e7d254edee4fab2b0fc36b9c7bf30160ed97ad7bf7ebe6bf6a336387eb3582428147bb5c8703752bbbe5cb7dbcb838ec5b87249853b743275d753f0e173aef2
6
+ metadata.gz: 87d91c452520897a536b036dc57cbae2a2a7a7d50732543ba537ab6957783a0c9e89cd89415ed6cb371a11e938dea8914ba12804c29ffb932f1bb570c20d2a8c
7
+ data.tar.gz: 8e3d549bd14215fb27b1628e6dc5e23e0d73c4e1eb33eb885fbf073b93645bc29c7f74ee27482c24be5cdf1a118e35b5af1d2641a3658ac4de8ca7e5b2d25ea9
data/.travis.yml CHANGED
@@ -4,6 +4,7 @@ rvm:
4
4
  - 2.0.0
5
5
  - 2.1
6
6
  - 2.2
7
+ - 2.3.0
7
8
  - jruby-19mode
8
9
 
9
10
  before_install: gem install bundler -v 1.10.6
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes will be documented in this file
4
4
 
5
+ ## 1.0.1
6
+
7
+ - Fix for endpoint names ('production' & 'sandbox') not working
8
+
5
9
  ## 1.0.0
6
10
 
7
11
  - First release
data/README.md CHANGED
@@ -51,7 +51,7 @@ api_key = 'Rapid API Key'
51
51
  password = 'Rapid API Password'
52
52
  endpoint = 'sandbox'
53
53
 
54
- client = RapidSDK::RapidClient.new(api_key, password, endpoint)
54
+ client = EwayRapid::RapidClient.new(api_key, password, endpoint)
55
55
 
56
56
  transaction = EwayRapid::Models::Transaction.new
57
57
  transaction.customer = EwayRapid::Models::Customer.new
@@ -69,7 +69,7 @@ payment_details.total_amount = 1000
69
69
  transaction.payment_details = payment_details
70
70
  transaction.transaction_type = EwayRapid::Enums::TransactionType::PURCHASE
71
71
 
72
- response = client.create_transaction(EwayRapid::Enums::PaymentMethod::DIRECT, basic_direct)
72
+ response = client.create_transaction(EwayRapid::Enums::PaymentMethod::DIRECT, transaction)
73
73
 
74
74
  if response.transaction_status.status?
75
75
  puts "Success! ID: #{response.transaction_status.transaction_id.to_s}"
@@ -88,9 +88,9 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
88
88
 
89
89
  The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
90
90
 
91
- [ico-version]: https://img.shields.io/gem/v/eway-rapid.svg?style=flat-square
91
+ [ico-version]: https://img.shields.io/gem/v/eway_rapid.svg?style=flat-square
92
92
  [ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
93
93
  [ico-travis]: https://img.shields.io/travis/eWAYPayment/eway-rapid-ruby/master.svg?style=flat-square
94
94
 
95
- [link-rubygems]: https://rubygems.org/gems/eway-rapid
95
+ [link-rubygems]: https://rubygems.org/gems/eway_rapid
96
96
  [link-travis]: https://travis-ci.org/eWAYPayment/eway-rapid-ruby
data/eway_rapid.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = 'eway_rapid'
8
8
  spec.version = EwayRapid::VERSION
9
9
  spec.required_ruby_version = '>= 1.9.3'
10
- spec.author = ['eWAY']
10
+ spec.author = ['eWAY']
11
11
  spec.summary = 'Ruby gem for eWAY\'s Rapid API'
12
12
  spec.description = 'Easy online payments with eWAY and the eWAY Rapid Ruby gem.'
13
13
  spec.homepage = 'https://www.eway.com.au'
@@ -44,39 +44,39 @@ module EwayRapid
44
44
  begin
45
45
  case payment_method
46
46
  when Enums::PaymentMethod::DIRECT
47
- url = @rapid_endpoint + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
47
+ url = @web_url + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
48
48
 
49
49
  request = Message::TransactionProcess::TransDirectPaymentMsgProcess.create_request(transaction)
50
50
  response = Message::TransactionProcess::TransDirectPaymentMsgProcess.send_request(url, @api_key, @password, request)
51
51
  Message::TransactionProcess::TransDirectPaymentMsgProcess.make_result(response)
52
52
  when Enums::PaymentMethod::RESPONSIVE_SHARED
53
- url = @rapid_endpoint + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
53
+ url = @web_url + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
54
54
 
55
55
  request = Message::TransactionProcess::TransResponsiveSharedMsgProcess.create_request(transaction)
56
56
  response = Message::TransactionProcess::TransResponsiveSharedMsgProcess.send_request(url, @api_key, @password, request)
57
57
  Message::TransactionProcess::TransResponsiveSharedMsgProcess.make_result(response)
58
58
  when Enums::PaymentMethod::TRANSPARENT_REDIRECT
59
- url = @rapid_endpoint + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
59
+ url = @web_url + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
60
60
 
61
61
  request = Message::TransactionProcess::TransTransparentRedirectMsgProcess.create_request(transaction)
62
62
  response = Message::TransactionProcess::TransTransparentRedirectMsgProcess.send_request(url, @api_key, @password, request)
63
63
  Message::TransactionProcess::TransTransparentRedirectMsgProcess.make_result(response)
64
64
  when Enums::PaymentMethod::WALLET
65
65
  if transaction.capture
66
- url = @rapid_endpoint + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
66
+ url = @web_url + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
67
67
 
68
68
  request = Message::TransactionProcess::TransDirectPaymentMsgProcess.create_request(transaction)
69
69
  response = Message::TransactionProcess::TransDirectPaymentMsgProcess.send_request(url, @api_key, @password, request)
70
70
  Message::TransactionProcess::TransDirectPaymentMsgProcess.make_result(response)
71
71
  else
72
- url = @rapid_endpoint + Constants::CAPTURE_PAYMENT_METHOD
72
+ url = @web_url + Constants::CAPTURE_PAYMENT_METHOD
73
73
 
74
74
  request = Message::TransactionProcess::CapturePaymentMsgProcess.create_request(transaction)
75
75
  response = Message::TransactionProcess::CapturePaymentMsgProcess.send_request(url, @api_key, @password, request)
76
76
  Message::TransactionProcess::CapturePaymentMsgProcess.make_result(response)
77
77
  end
78
78
  when Enums::PaymentMethod::AUTHORISATION
79
- url = @rapid_endpoint + Constants::CAPTURE_PAYMENT_METHOD
79
+ url = @web_url + Constants::CAPTURE_PAYMENT_METHOD
80
80
 
81
81
  request = Message::TransactionProcess::CapturePaymentMsgProcess.create_request(transaction)
82
82
  response = Message::TransactionProcess::CapturePaymentMsgProcess.send_request(url, @api_key, @password, request)
@@ -140,7 +140,7 @@ module EwayRapid
140
140
  end
141
141
 
142
142
  begin
143
- url = @rapid_endpoint + Constants::TRANSACTION_METHOD
143
+ url = @web_url + Constants::TRANSACTION_METHOD
144
144
 
145
145
  request = Message::RefundProcess::RefundMsgProcess.create_request(refund)
146
146
  response = Message::RefundProcess::RefundMsgProcess.send_request(url, @api_key, @password, request)
@@ -160,7 +160,7 @@ module EwayRapid
160
160
  return make_response_with_exception(Exceptions::APIKeyInvalidException.new('API key, password or Rapid endpoint missing or invalid'), RefundResponse)
161
161
  end
162
162
  begin
163
- url = @rapid_endpoint + Constants::CANCEL_AUTHORISATION_METHOD
163
+ url = @web_url + Constants::CANCEL_AUTHORISATION_METHOD
164
164
 
165
165
  request = Message::RefundProcess::CancelAuthorisationMsgProcess.create_request(refund)
166
166
  response = Message::RefundProcess::CancelAuthorisationMsgProcess.send_request(url, @api_key, @password, request)
@@ -184,19 +184,19 @@ module EwayRapid
184
184
  begin
185
185
  case payment_method
186
186
  when Enums::PaymentMethod::DIRECT
187
- url = @rapid_endpoint + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
187
+ url = @web_url + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
188
188
 
189
189
  request = Message::CustomerProcess::CustDirectPaymentMsgProcess.create_request(customer)
190
190
  response = Message::CustomerProcess::CustDirectPaymentMsgProcess.send_request(url, @api_key, @password, request)
191
191
  Message::CustomerProcess::CustDirectPaymentMsgProcess.make_result(response)
192
192
  when Enums::PaymentMethod::RESPONSIVE_SHARED
193
- url = @rapid_endpoint + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
193
+ url = @web_url + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
194
194
 
195
195
  request = Message::CustomerProcess::CustResponsiveSharedMsgProcess.create_request(customer)
196
196
  response = Message::CustomerProcess::CustResponsiveSharedMsgProcess.send_request(url, @api_key, @password, request)
197
197
  Message::CustomerProcess::CustResponsiveSharedMsgProcess.make_result(response)
198
198
  when Enums::PaymentMethod::TRANSPARENT_REDIRECT
199
- url = @rapid_endpoint + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
199
+ url = @web_url + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
200
200
 
201
201
  request = Message::CustomerProcess::CustTransparentRedirectMsgProcess.create_request(customer)
202
202
  response = Message::CustomerProcess::CustTransparentRedirectMsgProcess.send_request(url, @api_key, @password, request)
@@ -222,18 +222,18 @@ module EwayRapid
222
222
  begin
223
223
  case payment_method
224
224
  when Enums::PaymentMethod::DIRECT
225
- url = @rapid_endpoint + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
225
+ url = @web_url + Constants::DIRECT_PAYMENT_METHOD_NAME + Constants::JSON_SUFFIX
226
226
  request = Message::CustomerProcess::CustDirectUpdateMsgProcess.create_request(customer)
227
227
  response = Message::CustomerProcess::CustDirectUpdateMsgProcess.send_request(url, @api_key, @password, request)
228
228
  Message::CustomerProcess::CustDirectUpdateMsgProcess.make_result(response)
229
229
  when Enums::PaymentMethod::RESPONSIVE_SHARED
230
- url = @rapid_endpoint + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
230
+ url = @web_url + Constants::RESPONSIVE_SHARED_METHOD_NAME + Constants::JSON_SUFFIX
231
231
 
232
232
  request = Message::CustomerProcess::CustResponsiveUpdateMsgProcess.create_request(customer)
233
233
  response = Message::CustomerProcess::CustResponsiveUpdateMsgProcess.send_request(url, @api_key, @password, request)
234
234
  Message::CustomerProcess::CustResponsiveUpdateMsgProcess.make_result(response)
235
235
  when Enums::PaymentMethod::TRANSPARENT_REDIRECT
236
- url = @rapid_endpoint + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
236
+ url = @web_url + Constants::TRANSPARENT_REDIRECT_METHOD_NAME + Constants::JSON_SUFFIX
237
237
 
238
238
  request = Message::CustomerProcess::CustTransparentUpdateMsgProcess.create_request(customer)
239
239
  response = Message::CustomerProcess::CustTransparentUpdateMsgProcess.send_request(url, @api_key, @password, request)
@@ -258,7 +258,7 @@ module EwayRapid
258
258
  return make_response_with_exception(Exceptions::APIKeyInvalidException.new('API key, password or Rapid endpoint missing or invalid'), QueryCustomerResponse)
259
259
  end
260
260
  begin
261
- url = @rapid_endpoint + Constants::DIRECT_CUSTOMER_SEARCH_METHOD + Constants::JSON_SUFFIX
261
+ url = @web_url + Constants::DIRECT_CUSTOMER_SEARCH_METHOD + Constants::JSON_SUFFIX
262
262
  url = URI.encode(url)
263
263
 
264
264
  request = Message::CustomerProcess::QueryCustomerMsgProcess.create_request(token_customer_id.to_s)
@@ -306,9 +306,9 @@ module EwayRapid
306
306
  end
307
307
  begin
308
308
  if request.nil? || request == ''
309
- url = @rapid_endpoint + request_path + '/' + '0'
309
+ url = @web_url + request_path + '/' + '0'
310
310
  else
311
- url = @rapid_endpoint + request_path + '/' + request
311
+ url = @web_url + request_path + '/' + request
312
312
  end
313
313
  url = URI.encode(url)
314
314
 
@@ -358,7 +358,7 @@ module EwayRapid
358
358
  @list_error.clear
359
359
  end
360
360
  set_valid(true)
361
- @logger.info "Initiate client [#{@rapid_endpoint}] successful!" if @logger
361
+ @logger.info "Initiate client using [#{@web_url}] successful!" if @logger
362
362
  rescue => e
363
363
  @logger.error "Error setting Rapid endpoint #{e.backtrace.inspect}" if @logger
364
364
  set_valid(false)
@@ -1,3 +1,3 @@
1
1
  module EwayRapid
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eway_rapid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - eWAY
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-23 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client