buckaruby 1.7.0 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -54
- data/README.md +54 -18
- data/lib/buckaruby/action.rb +4 -4
- data/lib/buckaruby/amount.rb +25 -0
- data/lib/buckaruby/configuration.rb +35 -40
- data/lib/buckaruby/currency.rb +3 -3
- data/lib/buckaruby/exception.rb +9 -8
- data/lib/buckaruby/gateway.rb +64 -72
- data/lib/buckaruby/operation.rb +5 -5
- data/lib/buckaruby/payment_method.rb +20 -12
- data/lib/buckaruby/request.rb +62 -68
- data/lib/buckaruby/response.rb +69 -67
- data/lib/buckaruby/signature.rb +26 -7
- data/lib/buckaruby/transaction_type.rb +24 -21
- data/lib/buckaruby/version.rb +1 -1
- data/lib/buckaruby.rb +1 -2
- metadata +16 -97
- data/.github/workflows/test.yml +0 -23
- data/.gitignore +0 -19
- data/.rubocop.yml +0 -107
- data/Gemfile +0 -12
- data/Gemfile.lock +0 -71
- data/Rakefile +0 -10
- data/buckaruby.gemspec +0 -28
- data/lib/buckaruby/iban.rb +0 -29
- data/lib/buckaruby/ideal.rb +0 -21
- data/spec/buckaruby/configuration_spec.rb +0 -113
- data/spec/buckaruby/field_mapper_spec.rb +0 -69
- data/spec/buckaruby/gateway_spec.rb +0 -803
- data/spec/buckaruby/iban_spec.rb +0 -75
- data/spec/buckaruby/signature_spec.rb +0 -89
- data/spec/buckaruby/support/case_insensitive_hash_spec.rb +0 -74
- data/spec/fixtures/responses/callback_invalid_signature.txt +0 -1
- data/spec/fixtures/responses/callback_payment_amex.txt +0 -1
- data/spec/fixtures/responses/callback_payment_cancelled.txt +0 -1
- data/spec/fixtures/responses/callback_payment_empty_transaction_type.txt +0 -1
- data/spec/fixtures/responses/callback_payment_failed.txt +0 -1
- data/spec/fixtures/responses/callback_payment_giropay.txt +0 -1
- data/spec/fixtures/responses/callback_payment_pending.txt +0 -1
- data/spec/fixtures/responses/callback_payment_rejected.txt +0 -1
- data/spec/fixtures/responses/callback_payment_sepa.txt +0 -1
- data/spec/fixtures/responses/callback_payment_sofort.txt +0 -1
- data/spec/fixtures/responses/callback_payment_success.txt +0 -1
- data/spec/fixtures/responses/callback_payment_visa.txt +0 -1
- data/spec/fixtures/responses/callback_recurrent_sepa.txt +0 -1
- data/spec/fixtures/responses/callback_recurrent_visa.txt +0 -1
- data/spec/fixtures/responses/callback_refund_amex.txt +0 -1
- data/spec/fixtures/responses/callback_refund_ideal.txt +0 -1
- data/spec/fixtures/responses/callback_refund_paypal.txt +0 -1
- data/spec/fixtures/responses/callback_reversal_paypal.txt +0 -1
- data/spec/fixtures/responses/callback_reversal_sepa.txt +0 -1
- data/spec/fixtures/responses/callback_valid_signature.txt +0 -1
- data/spec/fixtures/responses/cancel_success.txt +0 -1
- data/spec/fixtures/responses/recurrent_transaction_success.txt +0 -1
- data/spec/fixtures/responses/refund_info_error.txt +0 -1
- data/spec/fixtures/responses/refund_info_success.txt +0 -1
- data/spec/fixtures/responses/refund_transaction_success.txt +0 -1
- data/spec/fixtures/responses/setup_transaction_success.txt +0 -1
- data/spec/fixtures/responses/specify_transaction_success.txt +0 -1
- data/spec/fixtures/responses/status_cancellable.txt +0 -1
- data/spec/fixtures/responses/status_noncancellable.txt +0 -1
- data/spec/fixtures/responses/status_success.txt +0 -1
- data/spec/spec_helper.rb +0 -16
data/lib/buckaruby/response.rb
CHANGED
@@ -8,17 +8,17 @@ require 'date'
|
|
8
8
|
module Buckaruby
|
9
9
|
# Base class for any response.
|
10
10
|
class Response
|
11
|
-
attr_reader :
|
11
|
+
attr_reader :response
|
12
12
|
|
13
13
|
def initialize(body, config)
|
14
|
-
@logger = config.logger
|
15
|
-
|
16
14
|
@response = parse_response(body)
|
17
|
-
@params = Support::CaseInsensitiveHash.new(@response)
|
18
15
|
|
19
|
-
|
16
|
+
logger = config.logger
|
17
|
+
logger.debug("[response] params: #{params.inspect}")
|
18
|
+
end
|
20
19
|
|
21
|
-
|
20
|
+
def params
|
21
|
+
@params ||= Support::CaseInsensitiveHash.new(response)
|
22
22
|
end
|
23
23
|
|
24
24
|
def status
|
@@ -34,7 +34,7 @@ module Buckaruby
|
|
34
34
|
custom = Support::CaseInsensitiveHash.new
|
35
35
|
|
36
36
|
params.each do |key, value|
|
37
|
-
next unless key.upcase.start_with?(
|
37
|
+
next unless key.upcase.start_with?('CUST_')
|
38
38
|
|
39
39
|
new_key = key.to_s[5..-1]
|
40
40
|
custom[new_key] = value
|
@@ -49,7 +49,7 @@ module Buckaruby
|
|
49
49
|
additional = Support::CaseInsensitiveHash.new
|
50
50
|
|
51
51
|
params.each do |key, value|
|
52
|
-
next unless key.upcase.start_with?(
|
52
|
+
next unless key.upcase.start_with?('ADD_')
|
53
53
|
|
54
54
|
new_key = key.to_s[4..-1]
|
55
55
|
additional[new_key] = value
|
@@ -72,25 +72,14 @@ module Buckaruby
|
|
72
72
|
response
|
73
73
|
end
|
74
74
|
|
75
|
-
def verify_signature!(response, config)
|
76
|
-
if params[:brq_apiresult].nil? || params[:brq_apiresult].casecmp("fail") != 0
|
77
|
-
sent_signature = params[:brq_signature]
|
78
|
-
generated_signature = Signature.generate_signature(response, config)
|
79
|
-
|
80
|
-
if sent_signature != generated_signature
|
81
|
-
raise SignatureException.new(sent_signature, generated_signature)
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
75
|
def parse_time(time)
|
87
|
-
|
76
|
+
Time.strptime(time, '%Y-%m-%d %H:%M:%S') if time
|
88
77
|
end
|
89
78
|
end
|
90
79
|
|
91
80
|
# Base for a transaction response.
|
92
81
|
module TransactionResponse
|
93
|
-
def
|
82
|
+
def consumer_bic
|
94
83
|
case payment_method
|
95
84
|
when PaymentMethod::IDEAL
|
96
85
|
params[:brq_service_ideal_consumerbic]
|
@@ -101,7 +90,7 @@ module Buckaruby
|
|
101
90
|
end
|
102
91
|
end
|
103
92
|
|
104
|
-
def
|
93
|
+
def consumer_iban
|
105
94
|
case payment_method
|
106
95
|
when PaymentMethod::IDEAL
|
107
96
|
params[:brq_service_ideal_consumeriban]
|
@@ -112,7 +101,7 @@ module Buckaruby
|
|
112
101
|
end
|
113
102
|
end
|
114
103
|
|
115
|
-
def
|
104
|
+
def consumer_name
|
116
105
|
case payment_method
|
117
106
|
when PaymentMethod::IDEAL
|
118
107
|
params[:brq_service_ideal_consumername] || params[:brq_customer_name]
|
@@ -147,86 +136,77 @@ module Buckaruby
|
|
147
136
|
parse_payment_method(params[:brq_payment_method] || params[:brq_transaction_method])
|
148
137
|
end
|
149
138
|
|
150
|
-
def redirect_url
|
151
|
-
params[:brq_redirecturl]
|
152
|
-
end
|
153
|
-
|
154
|
-
def refund_transaction_id
|
155
|
-
params[:brq_relatedtransaction_refund]
|
156
|
-
end
|
157
|
-
|
158
|
-
def reversal_transaction_id
|
159
|
-
params[:brq_relatedtransaction_reversal]
|
160
|
-
end
|
161
|
-
|
162
139
|
def transaction_id
|
163
140
|
params[:brq_transactions]
|
164
141
|
end
|
165
142
|
|
166
|
-
def transaction_type
|
167
|
-
TransactionType.parse(params[:brq_transaction_type], params[:brq_recurring])
|
168
|
-
end
|
169
|
-
|
170
143
|
def transaction_status
|
171
144
|
status
|
172
145
|
end
|
173
146
|
|
174
|
-
def
|
175
|
-
|
176
|
-
account_bic: account_bic,
|
177
|
-
account_iban: account_iban,
|
178
|
-
account_name: account_name,
|
179
|
-
collect_date: collect_date,
|
180
|
-
invoicenumber: invoicenumber,
|
181
|
-
mandate_reference: mandate_reference,
|
182
|
-
payment_id: payment_id,
|
183
|
-
payment_method: payment_method,
|
184
|
-
refund_transaction_id: refund_transaction_id,
|
185
|
-
reversal_transaction_id: reversal_transaction_id,
|
186
|
-
timestamp: timestamp,
|
187
|
-
transaction_id: transaction_id,
|
188
|
-
transaction_type: transaction_type,
|
189
|
-
transaction_status: transaction_status
|
190
|
-
}.reject { |_key, value| value.nil? }
|
191
|
-
|
192
|
-
hash
|
147
|
+
def transaction_type
|
148
|
+
TransactionType.parse(params[:brq_transaction_type], params[:brq_recurring])
|
193
149
|
end
|
194
150
|
|
195
151
|
private
|
196
152
|
|
197
153
|
def parse_date(date)
|
198
|
-
|
154
|
+
Date.strptime(date, '%Y-%m-%d') if date
|
199
155
|
end
|
200
156
|
|
201
157
|
def parse_payment_method(method)
|
202
|
-
method
|
158
|
+
method&.downcase
|
203
159
|
end
|
204
160
|
end
|
205
161
|
|
206
162
|
# Base class for a response via the API.
|
207
163
|
class ApiResponse < Response
|
208
|
-
def initialize(
|
209
|
-
super(
|
164
|
+
def initialize(body, config)
|
165
|
+
super(body, config)
|
210
166
|
|
211
|
-
if
|
167
|
+
if api_result.nil? || api_result.casecmp('fail').zero?
|
212
168
|
raise ApiException, params
|
213
169
|
end
|
170
|
+
|
171
|
+
Signature.verify!(config, response)
|
172
|
+
end
|
173
|
+
|
174
|
+
private
|
175
|
+
|
176
|
+
def api_result
|
177
|
+
params[:brq_apiresult]
|
214
178
|
end
|
215
179
|
end
|
216
180
|
|
217
181
|
# Response when creating a new transaction.
|
218
182
|
class SetupTransactionResponse < ApiResponse
|
219
183
|
include TransactionResponse
|
184
|
+
|
185
|
+
def redirect_url
|
186
|
+
params[:brq_redirecturl]
|
187
|
+
end
|
220
188
|
end
|
221
189
|
|
222
190
|
# Response when creating a recurrent transaction.
|
223
191
|
class RecurrentTransactionResponse < ApiResponse
|
224
192
|
include TransactionResponse
|
193
|
+
|
194
|
+
def transaction_type
|
195
|
+
TransactionType::PAYMENT_RECURRENT
|
196
|
+
end
|
225
197
|
end
|
226
198
|
|
227
199
|
# Response when creating a refund transaction.
|
228
200
|
class RefundTransactionResponse < ApiResponse
|
229
201
|
include TransactionResponse
|
202
|
+
|
203
|
+
def refunded_transaction_id
|
204
|
+
params[:brq_relatedtransaction_refund]
|
205
|
+
end
|
206
|
+
|
207
|
+
def transaction_type
|
208
|
+
TransactionType::REFUND
|
209
|
+
end
|
230
210
|
end
|
231
211
|
|
232
212
|
# Response when retrieving the refund information.
|
@@ -236,7 +216,7 @@ module Buckaruby
|
|
236
216
|
end
|
237
217
|
|
238
218
|
def refundable?
|
239
|
-
!params[:brq_refundinfo_1_isrefundable].nil? && params[:brq_refundinfo_1_isrefundable].casecmp(
|
219
|
+
!params[:brq_refundinfo_1_isrefundable].nil? && params[:brq_refundinfo_1_isrefundable].casecmp('true').zero?
|
240
220
|
end
|
241
221
|
|
242
222
|
def maximum_amount
|
@@ -257,7 +237,15 @@ module Buckaruby
|
|
257
237
|
include TransactionResponse
|
258
238
|
|
259
239
|
def cancellable?
|
260
|
-
!params[:brq_transaction_cancelable].nil? && params[:brq_transaction_cancelable].casecmp(
|
240
|
+
!params[:brq_transaction_cancelable].nil? && params[:brq_transaction_cancelable].casecmp('true').zero?
|
241
|
+
end
|
242
|
+
|
243
|
+
def refunded_transaction_id
|
244
|
+
params[:brq_relatedtransaction_refund]
|
245
|
+
end
|
246
|
+
|
247
|
+
def reversed_transaction_id
|
248
|
+
params[:brq_relatedtransaction_reversal]
|
261
249
|
end
|
262
250
|
end
|
263
251
|
|
@@ -265,9 +253,23 @@ module Buckaruby
|
|
265
253
|
class CancelResponse < ApiResponse
|
266
254
|
end
|
267
255
|
|
268
|
-
# Response when verifying the
|
269
|
-
class
|
256
|
+
# Response when verifying the push response.
|
257
|
+
class PushResponse < Response
|
270
258
|
include TransactionResponse
|
259
|
+
|
260
|
+
def initialize(body, config)
|
261
|
+
super(body, config)
|
262
|
+
|
263
|
+
Signature.verify!(config, response)
|
264
|
+
end
|
265
|
+
|
266
|
+
def refunded_transaction_id
|
267
|
+
params[:brq_relatedtransaction_refund]
|
268
|
+
end
|
269
|
+
|
270
|
+
def reversed_transaction_id
|
271
|
+
params[:brq_relatedtransaction_reversal]
|
272
|
+
end
|
271
273
|
end
|
272
274
|
|
273
275
|
# Response when retrieving the specification for a transaction.
|
data/lib/buckaruby/signature.rb
CHANGED
@@ -8,21 +8,23 @@ module Buckaruby
|
|
8
8
|
module Signature
|
9
9
|
module_function
|
10
10
|
|
11
|
-
def
|
11
|
+
def generate(config, params)
|
12
|
+
string = generate_params_string(config.secret, params)
|
13
|
+
|
12
14
|
case config.hash_method
|
13
15
|
when :sha1
|
14
|
-
Digest::SHA1.hexdigest(
|
16
|
+
Digest::SHA1.hexdigest(string)
|
15
17
|
when :sha256
|
16
|
-
Digest::SHA256.hexdigest(
|
18
|
+
Digest::SHA256.hexdigest(string)
|
17
19
|
when :sha512
|
18
|
-
Digest::SHA512.hexdigest(
|
20
|
+
Digest::SHA512.hexdigest(string)
|
19
21
|
else
|
20
22
|
raise ArgumentError, "Invalid hash method provided: #{config.hash_method}"
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
|
-
def
|
25
|
-
sign_params = params.select { |key, _value| key.to_s.upcase.start_with?(
|
26
|
+
def generate_params_string(secret, params)
|
27
|
+
sign_params = params.select { |key, _value| key.to_s.upcase.start_with?('BRQ_', 'ADD_', 'CUST_') && key.to_s.casecmp('BRQ_SIGNATURE').nonzero? }
|
26
28
|
sign_params = order_signature_params(sign_params)
|
27
29
|
|
28
30
|
string = sign_params.map { |param| "#{param[0]}=#{param[1]}" }.join
|
@@ -36,12 +38,29 @@ module Buckaruby
|
|
36
38
|
# that is identical to the beginning of a longer string, comes before the longer string.
|
37
39
|
# Take for example the following, comma separated, list which has been sorted:
|
38
40
|
# a_a, a0, a0a, a1a, aaA, aab, aba, aCa
|
39
|
-
CHAR_ORDER =
|
41
|
+
CHAR_ORDER = '_01234567890abcdefghijklmnopqrstuvwxyz'
|
40
42
|
|
41
43
|
def order_signature_params(params)
|
42
44
|
params.sort_by do |key, _value|
|
43
45
|
key.to_s.downcase.each_char.map { |c| CHAR_ORDER.index(c) }
|
44
46
|
end
|
45
47
|
end
|
48
|
+
|
49
|
+
# Check the signature from the Buckaroo response with our generated signature.
|
50
|
+
def verify!(config, params)
|
51
|
+
sent_signature = params.find { |key, _value| key.to_s.casecmp('BRQ_SIGNATURE').zero? }&.last
|
52
|
+
generated_signature = Signature.generate(config, params)
|
53
|
+
|
54
|
+
if sent_signature.nil? || generated_signature.nil? || !safe_equals?(sent_signature, generated_signature)
|
55
|
+
raise SignatureException.new(sent_signature, generated_signature)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Constant time string comparison.
|
60
|
+
def safe_equals?(signature, other_signature)
|
61
|
+
check = signature.bytesize ^ other_signature.bytesize
|
62
|
+
signature.bytes.zip(other_signature.bytes) { |x, y| check |= x ^ y.to_i }
|
63
|
+
check.zero?
|
64
|
+
end
|
46
65
|
end
|
47
66
|
end
|
@@ -23,22 +23,24 @@ module Buckaruby
|
|
23
23
|
'C001', # Transfer
|
24
24
|
|
25
25
|
'C044', 'C192', 'C283', 'C293', 'C318', 'C345',
|
26
|
-
'
|
26
|
+
'C801', 'C802', 'C880', 'C963', 'V002', 'V032',
|
27
|
+
'V038', 'V044',
|
27
28
|
'V192', 'V283', 'V293', 'V313', 'V318', 'V345',
|
28
29
|
'V696', # Visa
|
29
30
|
|
30
31
|
'C043', 'C089', 'C273', 'C303', 'C328', 'C355',
|
31
|
-
'
|
32
|
-
'
|
32
|
+
'C806', 'C807', 'C876', 'C969', 'V001', 'V031',
|
33
|
+
'V037', 'V043', 'V089', 'V273', 'V303', 'V328',
|
34
|
+
'V355', 'V702', # MasterCard
|
33
35
|
|
34
|
-
'C046', 'C251', 'C288', 'C308', 'C333', '
|
35
|
-
'
|
36
|
-
'V288', 'V308', 'V333', 'V705',
|
36
|
+
'C046', 'C251', 'C288', 'C308', 'C333', 'C811',
|
37
|
+
'C812', 'C872', 'C972', 'V034', 'V040', 'V046',
|
38
|
+
'V094', 'V245', 'V288', 'V308', 'V333', 'V705', # Maestro
|
37
39
|
|
38
40
|
'V003', 'V030', 'V036', 'V042' # American Express
|
39
41
|
|
40
42
|
# Check the recurring flag to detect a normal or recurring transaction.
|
41
|
-
if brq_recurring
|
43
|
+
if brq_recurring&.casecmp('true')&.zero?
|
42
44
|
TransactionType::PAYMENT_RECURRENT
|
43
45
|
else
|
44
46
|
TransactionType::PAYMENT
|
@@ -52,17 +54,18 @@ module Buckaruby
|
|
52
54
|
'C101', # Transfer
|
53
55
|
|
54
56
|
'C080', 'C194', 'C281', 'C290', 'C315', 'C342',
|
55
|
-
'C881', 'C961', 'V068', 'V074', 'V080',
|
56
|
-
'V194', 'V281', 'V290', 'V315', 'V342',
|
57
|
+
'C803', 'C881', 'C961', 'V068', 'V074', 'V080',
|
58
|
+
'V102', 'V194', 'V281', 'V290', 'V315', 'V342',
|
59
|
+
'V694', # Visa
|
57
60
|
|
58
61
|
'C079', 'C197', 'C300', 'C325', 'C352', 'C371',
|
59
|
-
'C877', 'C967', 'V067', 'V073', 'V079',
|
60
|
-
'V149', 'V197', 'V300', 'V325', 'V352',
|
61
|
-
'V700',
|
62
|
+
'C808', 'C877', 'C967', 'V067', 'V073', 'V079',
|
63
|
+
'V101', 'V149', 'V197', 'V300', 'V325', 'V352',
|
64
|
+
'V371', 'V700', # MasterCard
|
62
65
|
|
63
|
-
'C082', 'C252', 'C286', 'C305', 'C330', '
|
64
|
-
'C970', 'V070', 'V076', 'V082', 'V246',
|
65
|
-
'V305', 'V330', 'V703',
|
66
|
+
'C082', 'C252', 'C286', 'C305', 'C330', 'C813',
|
67
|
+
'C873', 'C970', 'V070', 'V076', 'V082', 'V246',
|
68
|
+
'V286', 'V305', 'V330', 'V703', # Maestro
|
66
69
|
|
67
70
|
'V066', 'V072', 'V078', 'V103' # American Express
|
68
71
|
TransactionType::REFUND
|
@@ -70,14 +73,14 @@ module Buckaruby
|
|
70
73
|
'V111', # PayPal
|
71
74
|
'C544', # Sofort
|
72
75
|
|
73
|
-
'C554', 'C593', '
|
74
|
-
'V544', 'V592',
|
76
|
+
'C554', 'C593', 'C804', 'C882', 'V132', 'V138',
|
77
|
+
'V144', 'V544', 'V592', # Visa
|
75
78
|
|
76
|
-
'C553', 'C589', '
|
77
|
-
'V543', 'V589',
|
79
|
+
'C553', 'C589', 'C809', 'C878', 'V131', 'V137',
|
80
|
+
'V143', 'V543', 'V589', # MasterCard
|
78
81
|
|
79
|
-
'C546', 'C551', '
|
80
|
-
'V545', 'V546',
|
82
|
+
'C546', 'C551', 'C814', 'C874', 'V134', 'V140',
|
83
|
+
'V146', 'V545', 'V546', # Maestro
|
81
84
|
|
82
85
|
'V130', 'V136', 'V142' # American Express
|
83
86
|
TransactionType::REVERSAL
|
data/lib/buckaruby/version.rb
CHANGED
data/lib/buckaruby.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'buckaruby/action'
|
4
|
+
require_relative 'buckaruby/amount'
|
4
5
|
require_relative 'buckaruby/currency'
|
5
|
-
require_relative 'buckaruby/ideal'
|
6
6
|
require_relative 'buckaruby/language'
|
7
7
|
require_relative 'buckaruby/operation'
|
8
8
|
require_relative 'buckaruby/payment_method'
|
@@ -13,7 +13,6 @@ require_relative 'buckaruby/configuration'
|
|
13
13
|
require_relative 'buckaruby/exception'
|
14
14
|
require_relative 'buckaruby/field_mapper'
|
15
15
|
require_relative 'buckaruby/gateway'
|
16
|
-
require_relative 'buckaruby/iban'
|
17
16
|
require_relative 'buckaruby/request'
|
18
17
|
require_relative 'buckaruby/response'
|
19
18
|
require_relative 'buckaruby/signature'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buckaruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kentaa
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,41 +58,33 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.0'
|
69
69
|
description: The Buckaruby gem provides a Ruby library for communicating with the
|
70
70
|
Buckaroo Payment Engine 3.0.
|
71
71
|
email:
|
72
|
-
-
|
72
|
+
- developers@kentaa.nl
|
73
73
|
executables: []
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- ".github/workflows/test.yml"
|
78
|
-
- ".gitignore"
|
79
|
-
- ".rubocop.yml"
|
80
77
|
- CHANGELOG.md
|
81
|
-
- Gemfile
|
82
|
-
- Gemfile.lock
|
83
78
|
- LICENSE.txt
|
84
79
|
- README.md
|
85
|
-
- Rakefile
|
86
|
-
- buckaruby.gemspec
|
87
80
|
- lib/buckaruby.rb
|
88
81
|
- lib/buckaruby/action.rb
|
82
|
+
- lib/buckaruby/amount.rb
|
89
83
|
- lib/buckaruby/configuration.rb
|
90
84
|
- lib/buckaruby/currency.rb
|
91
85
|
- lib/buckaruby/exception.rb
|
92
86
|
- lib/buckaruby/field_mapper.rb
|
93
87
|
- lib/buckaruby/gateway.rb
|
94
|
-
- lib/buckaruby/iban.rb
|
95
|
-
- lib/buckaruby/ideal.rb
|
96
88
|
- lib/buckaruby/language.rb
|
97
89
|
- lib/buckaruby/operation.rb
|
98
90
|
- lib/buckaruby/payment_method.rb
|
@@ -103,47 +95,11 @@ files:
|
|
103
95
|
- lib/buckaruby/transaction_status.rb
|
104
96
|
- lib/buckaruby/transaction_type.rb
|
105
97
|
- lib/buckaruby/version.rb
|
106
|
-
- spec/buckaruby/configuration_spec.rb
|
107
|
-
- spec/buckaruby/field_mapper_spec.rb
|
108
|
-
- spec/buckaruby/gateway_spec.rb
|
109
|
-
- spec/buckaruby/iban_spec.rb
|
110
|
-
- spec/buckaruby/signature_spec.rb
|
111
|
-
- spec/buckaruby/support/case_insensitive_hash_spec.rb
|
112
|
-
- spec/fixtures/responses/callback_invalid_signature.txt
|
113
|
-
- spec/fixtures/responses/callback_payment_amex.txt
|
114
|
-
- spec/fixtures/responses/callback_payment_cancelled.txt
|
115
|
-
- spec/fixtures/responses/callback_payment_empty_transaction_type.txt
|
116
|
-
- spec/fixtures/responses/callback_payment_failed.txt
|
117
|
-
- spec/fixtures/responses/callback_payment_giropay.txt
|
118
|
-
- spec/fixtures/responses/callback_payment_pending.txt
|
119
|
-
- spec/fixtures/responses/callback_payment_rejected.txt
|
120
|
-
- spec/fixtures/responses/callback_payment_sepa.txt
|
121
|
-
- spec/fixtures/responses/callback_payment_sofort.txt
|
122
|
-
- spec/fixtures/responses/callback_payment_success.txt
|
123
|
-
- spec/fixtures/responses/callback_payment_visa.txt
|
124
|
-
- spec/fixtures/responses/callback_recurrent_sepa.txt
|
125
|
-
- spec/fixtures/responses/callback_recurrent_visa.txt
|
126
|
-
- spec/fixtures/responses/callback_refund_amex.txt
|
127
|
-
- spec/fixtures/responses/callback_refund_ideal.txt
|
128
|
-
- spec/fixtures/responses/callback_refund_paypal.txt
|
129
|
-
- spec/fixtures/responses/callback_reversal_paypal.txt
|
130
|
-
- spec/fixtures/responses/callback_reversal_sepa.txt
|
131
|
-
- spec/fixtures/responses/callback_valid_signature.txt
|
132
|
-
- spec/fixtures/responses/cancel_success.txt
|
133
|
-
- spec/fixtures/responses/recurrent_transaction_success.txt
|
134
|
-
- spec/fixtures/responses/refund_info_error.txt
|
135
|
-
- spec/fixtures/responses/refund_info_success.txt
|
136
|
-
- spec/fixtures/responses/refund_transaction_success.txt
|
137
|
-
- spec/fixtures/responses/setup_transaction_success.txt
|
138
|
-
- spec/fixtures/responses/specify_transaction_success.txt
|
139
|
-
- spec/fixtures/responses/status_cancellable.txt
|
140
|
-
- spec/fixtures/responses/status_noncancellable.txt
|
141
|
-
- spec/fixtures/responses/status_success.txt
|
142
|
-
- spec/spec_helper.rb
|
143
98
|
homepage: https://github.com/KentaaNL/buckaruby
|
144
99
|
licenses:
|
145
100
|
- MIT
|
146
|
-
metadata:
|
101
|
+
metadata:
|
102
|
+
rubygems_mfa_required: 'true'
|
147
103
|
post_install_message:
|
148
104
|
rdoc_options: []
|
149
105
|
require_paths:
|
@@ -152,52 +108,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
108
|
requirements:
|
153
109
|
- - ">="
|
154
110
|
- !ruby/object:Gem::Version
|
155
|
-
version: 2.
|
111
|
+
version: 2.5.0
|
156
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
113
|
requirements:
|
158
114
|
- - ">="
|
159
115
|
- !ruby/object:Gem::Version
|
160
116
|
version: '0'
|
161
117
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
118
|
+
rubygems_version: 3.3.7
|
163
119
|
signing_key:
|
164
120
|
specification_version: 4
|
165
121
|
summary: Ruby library for communicating with the Buckaroo Payment Engine 3.0.
|
166
|
-
test_files:
|
167
|
-
- spec/buckaruby/configuration_spec.rb
|
168
|
-
- spec/buckaruby/field_mapper_spec.rb
|
169
|
-
- spec/buckaruby/gateway_spec.rb
|
170
|
-
- spec/buckaruby/iban_spec.rb
|
171
|
-
- spec/buckaruby/signature_spec.rb
|
172
|
-
- spec/buckaruby/support/case_insensitive_hash_spec.rb
|
173
|
-
- spec/fixtures/responses/callback_invalid_signature.txt
|
174
|
-
- spec/fixtures/responses/callback_payment_amex.txt
|
175
|
-
- spec/fixtures/responses/callback_payment_cancelled.txt
|
176
|
-
- spec/fixtures/responses/callback_payment_empty_transaction_type.txt
|
177
|
-
- spec/fixtures/responses/callback_payment_failed.txt
|
178
|
-
- spec/fixtures/responses/callback_payment_giropay.txt
|
179
|
-
- spec/fixtures/responses/callback_payment_pending.txt
|
180
|
-
- spec/fixtures/responses/callback_payment_rejected.txt
|
181
|
-
- spec/fixtures/responses/callback_payment_sepa.txt
|
182
|
-
- spec/fixtures/responses/callback_payment_sofort.txt
|
183
|
-
- spec/fixtures/responses/callback_payment_success.txt
|
184
|
-
- spec/fixtures/responses/callback_payment_visa.txt
|
185
|
-
- spec/fixtures/responses/callback_recurrent_sepa.txt
|
186
|
-
- spec/fixtures/responses/callback_recurrent_visa.txt
|
187
|
-
- spec/fixtures/responses/callback_refund_amex.txt
|
188
|
-
- spec/fixtures/responses/callback_refund_ideal.txt
|
189
|
-
- spec/fixtures/responses/callback_refund_paypal.txt
|
190
|
-
- spec/fixtures/responses/callback_reversal_paypal.txt
|
191
|
-
- spec/fixtures/responses/callback_reversal_sepa.txt
|
192
|
-
- spec/fixtures/responses/callback_valid_signature.txt
|
193
|
-
- spec/fixtures/responses/cancel_success.txt
|
194
|
-
- spec/fixtures/responses/recurrent_transaction_success.txt
|
195
|
-
- spec/fixtures/responses/refund_info_error.txt
|
196
|
-
- spec/fixtures/responses/refund_info_success.txt
|
197
|
-
- spec/fixtures/responses/refund_transaction_success.txt
|
198
|
-
- spec/fixtures/responses/setup_transaction_success.txt
|
199
|
-
- spec/fixtures/responses/specify_transaction_success.txt
|
200
|
-
- spec/fixtures/responses/status_cancellable.txt
|
201
|
-
- spec/fixtures/responses/status_noncancellable.txt
|
202
|
-
- spec/fixtures/responses/status_success.txt
|
203
|
-
- spec/spec_helper.rb
|
122
|
+
test_files: []
|
data/.github/workflows/test.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
branches:
|
6
|
-
- 1.x
|
7
|
-
pull_request:
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
test:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
ruby-version: ['2.4', '2.5', '2.6', '2.7', '3.0']
|
15
|
-
|
16
|
-
steps:
|
17
|
-
- uses: actions/checkout@v2
|
18
|
-
- uses: ruby/setup-ruby@v1
|
19
|
-
with:
|
20
|
-
ruby-version: ${{ matrix.ruby-version }}
|
21
|
-
bundler-cache: true
|
22
|
-
- name: Run tests
|
23
|
-
run: bundle exec rake
|
data/.gitignore
DELETED