paybox_direct 0.2.7 → 0.2.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 222c174628a01ba212c380b912261c45b2b0688e
4
- data.tar.gz: e211f9892a4c1d4de1f704c59df0bde2abeaab0d
3
+ metadata.gz: a16e530616e63f998bde288ecac2d23c556dfc2a
4
+ data.tar.gz: a49540aab6207cc108b9a46f403bbcfb1f9ef5a3
5
5
  SHA512:
6
- metadata.gz: 5e0601005030b8ac884e334f8bb61ba90ef646d687a042a647c75ea4b7de7ea373ade1a2495769497d0f5ec7aacd1ce7eb80f7f1593c32630721efa0ead15601
7
- data.tar.gz: 1c483c8e1cc27e12e1625b6a179e643c4e2f38cc587055142cc618f1ef4c3b2198e224485b87398758084c76a5cc55e85135387f2fd0b9b70d7549a1cc4e53f2
6
+ metadata.gz: ee715ac604406649d227a849bb48acd890dd8896fe9001c588f6932052081c6ad1a14236056c865eaa1416a1a1c010c96c6247177d319e0b502faa528026d124
7
+ data.tar.gz: d35acdfad44404c5506deabd3f14d850d19a97d2f5f183de10dc42e80d49e656677ada7c8a1ffb59d08c17ae5950ce23a71adc15d4fae1adef87513f591f59b7
@@ -126,6 +126,7 @@ module PayboxDirect
126
126
  debit_authorization(
127
127
  amount: amount,
128
128
  currency: currency,
129
+ ref: ref,
129
130
  request_id: req.request_id,
130
131
  transaction_id: req.response[:transaction_id]
131
132
  )
@@ -95,11 +95,11 @@ class PayboxDirect::Request
95
95
  private
96
96
 
97
97
  def run_http_post!(uri)
98
- http = @http_connection || self.class.http_connection(uri)
98
+ @http_connection ||= self.class.http_connection(uri)
99
99
  @post_request = Net::HTTP::Post.new(uri.request_uri)
100
100
  @post_request.set_form_data(@vars)
101
101
  begin
102
- @http_resp = http.request(@post_request)
102
+ @http_resp = @http_connection.request(@post_request)
103
103
  rescue
104
104
  raise PayboxDirect::ServerUnavailableError
105
105
  end
@@ -192,6 +192,7 @@ RSpec.describe PayboxDirect do
192
192
  expect(PayboxDirect).to receive(:debit_authorization).with(
193
193
  amount: 50.3,
194
194
  currency: :EUR,
195
+ ref: "debit_new_subscriber",
195
196
  request_id: DO_CALLS ? be_a(Fixnum) : 111111,
196
197
  transaction_id: DO_CALLS ? be_a(Fixnum) : 2222222
197
198
  ).and_call_original
@@ -302,6 +303,7 @@ RSpec.describe PayboxDirect do
302
303
  req = PayboxDirect.debit_authorization(
303
304
  amount: 18.20,
304
305
  currency: :EUR,
306
+ ref: "auth_to_debit",
305
307
  request_id: req_id,
306
308
  transaction_id: trans_id
307
309
  )
@@ -364,6 +366,7 @@ RSpec.describe PayboxDirect do
364
366
  PayboxDirect.debit_authorization(
365
367
  amount: 18.20,
366
368
  currency: :EUR,
369
+ ref: "test_ref",
367
370
  request_id: 111111,
368
371
  transaction_id: 2222222
369
372
  )
@@ -32,7 +32,8 @@ RSpec.describe PayboxDirect::Request do
32
32
  "ACTIVITE" => "024",
33
33
  "ACQUEREUR" => "ems",
34
34
  "VAR1" => "VAL1",
35
- "VAR2" => "VAL2"
35
+ "VAR2" => "VAL2",
36
+ "URL_ENCODE" => "O"
36
37
  })
37
38
  end
38
39
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paybox_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kévin Lesénéchal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-12 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 2.6.8
75
+ rubygems_version: 2.6.11
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: An API to Paybox Direct and Paybox Direct Plus