buckaruby 2.0.1 → 2.1.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/README.md +0 -11
- data/lib/buckaruby/gateway.rb +1 -3
- data/lib/buckaruby/request.rb +6 -10
- data/lib/buckaruby/response.rb +4 -4
- data/lib/buckaruby/support/case_insensitive_hash.rb +1 -1
- data/lib/buckaruby/transaction_status.rb +1 -1
- data/lib/buckaruby/transaction_type.rb +4 -4
- data/lib/buckaruby/version.rb +1 -1
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 999b6cb27ab479a14f6f11fe0cce0692cc7b9f73026e46c61ff9e061acfab71d
|
4
|
+
data.tar.gz: f571d647ee4166f6f5eb1abcfa806dd3807d6790b8823d564807d3c013f963ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376b94f44ac00d239b2da91b36e1a8de4642e0a6f46e4ed891d9609423166908ad320d7354a436412b3b1569bcada08e1809abedb57f9e83e8e4105ab29201e9
|
7
|
+
data.tar.gz: 81d9650be0ab685f877e73ac5856f546cb5617461218ec4212ad9d72ddc8bf665c717b3db7961ad5435b60533ebb5e613e39fd3212e8fdf73a68acf900dbdaba
|
data/README.md
CHANGED
@@ -11,7 +11,6 @@ The Buckaruby gem provides a Ruby library for communicating with the Buckaroo Pa
|
|
11
11
|
- [Installation](#installation)
|
12
12
|
- [Usage](#usage)
|
13
13
|
- [Payment methods](#payment-methods)
|
14
|
-
- [Get issuers](#get-issuers)
|
15
14
|
- [Start transaction](#start-transaction)
|
16
15
|
- [Recurrent transaction](#recurrent-transaction)
|
17
16
|
- [Refund transaction](#refund-transaction)
|
@@ -79,14 +78,6 @@ To retrieve the payment methods enabled in Buckaroo and supported by this librar
|
|
79
78
|
payment_methods = gateway.payment_methods
|
80
79
|
```
|
81
80
|
|
82
|
-
### Get issuers
|
83
|
-
|
84
|
-
When using iDEAL as payment method, it is mandatory to send the `issuer` parameter in the start transaction request. You can retrieve the list of available issuers with the method `issuers`. This will return a hash with the ID of the issuer (hash key) and the issuer name (hash value).
|
85
|
-
|
86
|
-
```ruby
|
87
|
-
issuers = gateway.issuers(Buckaruby::PaymentMethod::IDEAL)
|
88
|
-
```
|
89
|
-
|
90
81
|
### Start transaction
|
91
82
|
|
92
83
|
To start a new transaction, use the method `setup_transaction`:
|
@@ -95,7 +86,6 @@ To start a new transaction, use the method `setup_transaction`:
|
|
95
86
|
options = {
|
96
87
|
amount: 10,
|
97
88
|
payment_method: Buckaruby::PaymentMethod::IDEAL,
|
98
|
-
issuer: "INGBNL2A",
|
99
89
|
invoicenumber: "12345",
|
100
90
|
return_url: "http://www.return.url/"
|
101
91
|
}
|
@@ -219,7 +209,6 @@ For example:
|
|
219
209
|
options = {
|
220
210
|
amount: 10,
|
221
211
|
payment_method: Buckaruby::PaymentMethod::IDEAL,
|
222
|
-
issuer: "INGBNL2A",
|
223
212
|
invoicenumber: "12345",
|
224
213
|
return_url: "http://www.return.url/",
|
225
214
|
custom: {
|
data/lib/buckaruby/gateway.rb
CHANGED
@@ -36,7 +36,7 @@ module Buckaruby
|
|
36
36
|
params = description[:requestparameters].find { |param| param[:name].casecmp('issuer').zero? } if description
|
37
37
|
items = params[:listitemdescription] if params
|
38
38
|
|
39
|
-
items
|
39
|
+
items.to_h { |item| [item[:value], item[:description]] }
|
40
40
|
end
|
41
41
|
|
42
42
|
# Setup a new transaction.
|
@@ -159,8 +159,6 @@ module Buckaruby
|
|
159
159
|
required_params << :return_url if options[:payment_method] != PaymentMethod::SEPA_DIRECT_DEBIT
|
160
160
|
|
161
161
|
case options[:payment_method]
|
162
|
-
when PaymentMethod::IDEAL, PaymentMethod::IDEAL_PROCESSING
|
163
|
-
required_params << :issuer
|
164
162
|
when PaymentMethod::SEPA_DIRECT_DEBIT
|
165
163
|
required_params << [:consumer_iban, :consumer_name]
|
166
164
|
end
|
data/lib/buckaruby/request.rb
CHANGED
@@ -113,17 +113,13 @@ module Buckaruby
|
|
113
113
|
|
114
114
|
case options[:payment_method]
|
115
115
|
when PaymentMethod::IDEAL
|
116
|
-
params
|
117
|
-
|
118
|
-
|
119
|
-
brq_service_ideal_version: '2'
|
120
|
-
)
|
116
|
+
params[:brq_service_ideal_action] = Action::PAY
|
117
|
+
params[:brq_service_ideal_issuer] = options[:issuer] if options[:issuer]
|
118
|
+
params[:brq_service_ideal_version] = '2'
|
121
119
|
when PaymentMethod::IDEAL_PROCESSING
|
122
|
-
params
|
123
|
-
|
124
|
-
|
125
|
-
brq_service_idealprocessing_version: '2'
|
126
|
-
)
|
120
|
+
params[:brq_service_idealprocessing_action] = Action::PAY
|
121
|
+
params[:brq_service_idealprocessing_issuer] = options[:issuer] if options[:issuer]
|
122
|
+
params[:brq_service_idealprocessing_version] = '2'
|
127
123
|
when PaymentMethod::SEPA_DIRECT_DEBIT
|
128
124
|
params.merge!(
|
129
125
|
brq_service_sepadirectdebit_action: Action::PAY,
|
data/lib/buckaruby/response.rb
CHANGED
@@ -36,7 +36,7 @@ module Buckaruby
|
|
36
36
|
params.each do |key, value|
|
37
37
|
next unless key.upcase.start_with?('CUST_')
|
38
38
|
|
39
|
-
new_key = key.to_s[5
|
39
|
+
new_key = key.to_s[5..]
|
40
40
|
custom[new_key] = value
|
41
41
|
end
|
42
42
|
|
@@ -51,7 +51,7 @@ module Buckaruby
|
|
51
51
|
params.each do |key, value|
|
52
52
|
next unless key.upcase.start_with?('ADD_')
|
53
53
|
|
54
|
-
new_key = key.to_s[4
|
54
|
+
new_key = key.to_s[4..]
|
55
55
|
additional[new_key] = value
|
56
56
|
end
|
57
57
|
|
@@ -162,7 +162,7 @@ module Buckaruby
|
|
162
162
|
# Base class for a response via the API.
|
163
163
|
class ApiResponse < Response
|
164
164
|
def initialize(body, config)
|
165
|
-
super
|
165
|
+
super
|
166
166
|
|
167
167
|
if api_result.nil? || api_result.casecmp('fail').zero?
|
168
168
|
raise ApiException, params
|
@@ -258,7 +258,7 @@ module Buckaruby
|
|
258
258
|
include TransactionResponse
|
259
259
|
|
260
260
|
def initialize(body, config)
|
261
|
-
super
|
261
|
+
super
|
262
262
|
|
263
263
|
Signature.verify!(config, response)
|
264
264
|
end
|
@@ -10,7 +10,7 @@ module Buckaruby
|
|
10
10
|
|
11
11
|
module_function
|
12
12
|
|
13
|
-
# See https://
|
13
|
+
# See https://docs.buckaroo.io/docs/integration-transaction-type-overview
|
14
14
|
def parse(brq_transaction_type, brq_recurring)
|
15
15
|
if brq_transaction_type && !brq_transaction_type.empty?
|
16
16
|
case brq_transaction_type
|
@@ -37,7 +37,7 @@ module Buckaruby
|
|
37
37
|
'C812', 'C872', 'C972', 'V034', 'V040', 'V046',
|
38
38
|
'V094', 'V245', 'V288', 'V308', 'V333', 'V705', # Maestro
|
39
39
|
|
40
|
-
'V003', 'V030', 'V036', 'V042'
|
40
|
+
'V003', 'V030', 'V036', 'V042', 'C990' # American Express
|
41
41
|
|
42
42
|
# Check the recurring flag to detect a normal or recurring transaction.
|
43
43
|
if brq_recurring&.casecmp('true')&.zero?
|
@@ -67,7 +67,7 @@ module Buckaruby
|
|
67
67
|
'C873', 'C970', 'V070', 'V076', 'V082', 'V246',
|
68
68
|
'V286', 'V305', 'V330', 'V703', # Maestro
|
69
69
|
|
70
|
-
'V066', 'V072', 'V078', 'V103'
|
70
|
+
'V066', 'V072', 'V078', 'V103', 'C992' # American Express
|
71
71
|
TransactionType::REFUND
|
72
72
|
when 'C501', 'C502', 'C562', # (SEPA) Direct Debit
|
73
73
|
'V111', # PayPal
|
@@ -82,7 +82,7 @@ module Buckaruby
|
|
82
82
|
'C546', 'C551', 'C814', 'C874', 'V134', 'V140',
|
83
83
|
'V146', 'V545', 'V546', # Maestro
|
84
84
|
|
85
|
-
'V130', 'V136', 'V142'
|
85
|
+
'V130', 'V136', 'V142', 'C993' # American Express
|
86
86
|
TransactionType::REVERSAL
|
87
87
|
end
|
88
88
|
else
|
data/lib/buckaruby/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kentaa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bigdecimal
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
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: logger
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
description: The Buckaruby gem provides a Ruby library for communicating with the
|
70
98
|
Buckaroo Payment Engine 3.0.
|
71
99
|
email:
|
@@ -108,14 +136,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
136
|
requirements:
|
109
137
|
- - ">="
|
110
138
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
139
|
+
version: 3.0.0
|
112
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
141
|
requirements:
|
114
142
|
- - ">="
|
115
143
|
- !ruby/object:Gem::Version
|
116
144
|
version: '0'
|
117
145
|
requirements: []
|
118
|
-
rubygems_version: 3.3
|
146
|
+
rubygems_version: 3.5.3
|
119
147
|
signing_key:
|
120
148
|
specification_version: 4
|
121
149
|
summary: Ruby library for communicating with the Buckaroo Payment Engine 3.0.
|