webpay_rails 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -36
- data/README.md +3 -3
- data/lib/webpay_rails.rb +1 -1
- data/lib/webpay_rails/base.rb +2 -2
- data/lib/webpay_rails/railites.rb +1 -1
- data/lib/webpay_rails/soap.rb +9 -1
- data/lib/webpay_rails/version.rb +1 -1
- data/webpay_rails.gemspec +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c220c2dd1bc964a61dc0237d0924be0aefbd4315
|
4
|
+
data.tar.gz: ab365432a005e9f82469e689aa0e66920e0adc41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f9cc2d8c11381d29737dc7335c2570de799f5b6da2f3577fffdc9cbec378cc9c8b7469d413c196d7ecd7e76d74bc3ee71ce8f3365acbc682c43e8793312378
|
7
|
+
data.tar.gz: 11ee2bc0e0f6226dee85a626e3e650897a0ef48db31586246c5dc606293542265fc3c36741a0c47014965b2fea47fc8b59002fee615fb4045c677cf9610b15e7
|
data/CHANGELOG.md
CHANGED
@@ -1,36 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
### 1.1.0 - 2016-11-03
|
4
|
-
|
5
|
-
#### bug fixes
|
6
|
-
* fix response verification
|
7
|
-
|
8
|
-
#### enhancements
|
9
|
-
* add support for nullify method
|
10
|
-
* raise detailed execptions when rescued from Savon::SOAPFault
|
11
|
-
* group certificates and private keys on Vault
|
12
|
-
* improve execptions when missing certificates, private_keys or commerce_code, and when set an invalid environment
|
13
|
-
* add support for certificates and private key as a files
|
14
|
-
* replace specific exceptions by generic exceptions with more detailed explanations
|
15
|
-
* add an option for disable the auto acknowledgement on transaction_result method
|
16
|
-
|
17
|
-
### 1.0.3 - 2016-09-15
|
18
|
-
|
19
|
-
#### bug fixes
|
20
|
-
* add missing error
|
21
|
-
|
22
|
-
### 1.0.2 - 2016-08-30
|
23
|
-
|
24
|
-
#### enhancements
|
25
|
-
* add rails logger support for savon
|
26
|
-
* add missing attributes on transanction result (`session_id`, `card_expiration_date`, `shares_number`)
|
27
|
-
|
28
|
-
### 1.0.1 - 2016-08-26
|
29
|
-
|
30
|
-
#### bug fixes
|
31
|
-
* Fix bug transanction_result approved? (by @isseu)
|
32
|
-
|
33
|
-
### 1.0.0 - 2016-08-06
|
34
|
-
|
35
|
-
* Add test for init_transaction.
|
36
|
-
* Rewrite official webpay sdk v1.1.0 for extend models on rails.
|
1
|
+
See the [Releases section of our GitHub project](https://github.com/limcross/webpay_rails/releases) for changelogs for each release version of WebpayRails.
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ _This gem (including certificates used in tests) was originally based on the SDK
|
|
12
12
|
|
13
13
|
## Getting started
|
14
14
|
|
15
|
-
__This README is only valid for the *master* branch, click [here](https://github.com/limcross/webpay_rails/blob/v1.1.
|
15
|
+
__This README is only valid for the *master* branch, click [here](https://github.com/limcross/webpay_rails/blob/v1.1.1/README.md) for see the latest released version.__
|
16
16
|
|
17
17
|
You can add it to your `Gemfile`:
|
18
18
|
|
@@ -41,7 +41,7 @@ class Order < ActiveRecord::Base
|
|
41
41
|
...
|
42
42
|
-----END CERTIFICATE-----',
|
43
43
|
environment: :integration,
|
44
|
-
log:
|
44
|
+
log: true
|
45
45
|
)
|
46
46
|
end
|
47
47
|
```
|
@@ -50,7 +50,7 @@ As you can see for `private_key`, `public_cert`, and `webpay_cert`, the content
|
|
50
50
|
|
51
51
|
The default `environment` is `:integration`, and the valid environments are `:integration`, `:certification` and `:production`. Depending on the environment is assigned the wsdl path.
|
52
52
|
|
53
|
-
The `log` is very useful when generating the evidence of integration, and is enabled by default.
|
53
|
+
The `log` is very useful when generating the evidence of integration, and is enabled by default. The log can be found both in the rails log and in a separate file for each trade code (`log\webpay_123456789.log`).
|
54
54
|
|
55
55
|
Obviously all these values should not be defined directly in the model. It is strongly recommended to use environment variables for this ([dotenv](https://github.com/bkeepers/dotenv)).
|
56
56
|
|
data/lib/webpay_rails.rb
CHANGED
data/lib/webpay_rails/base.rb
CHANGED
@@ -20,7 +20,7 @@ module WebpayRails
|
|
20
20
|
# ...
|
21
21
|
# -----END CERTIFICATE-----',
|
22
22
|
# environment: :integration,
|
23
|
-
# log:
|
23
|
+
# log: true
|
24
24
|
# )
|
25
25
|
#
|
26
26
|
# # setup with certificates and private_key files
|
@@ -30,7 +30,7 @@ module WebpayRails
|
|
30
30
|
# public_cert: 'absolute/path/to/public_cert.crt',
|
31
31
|
# webpay_cert: 'absolute/path/to/webpay_cert.crt',
|
32
32
|
# environment: :integration,
|
33
|
-
# log:
|
33
|
+
# log: true
|
34
34
|
# )
|
35
35
|
def webpay_rails(args)
|
36
36
|
class_attribute :vault, :soap_normal, :soap_nullify,
|
data/lib/webpay_rails/soap.rb
CHANGED
@@ -14,7 +14,7 @@ module WebpayRails
|
|
14
14
|
end
|
15
15
|
|
16
16
|
self.class.client(wsdl: wsdl_path, log: args[:log] || true,
|
17
|
-
logger:
|
17
|
+
logger: file_logger.extend(rails_logger))
|
18
18
|
end
|
19
19
|
|
20
20
|
private
|
@@ -74,5 +74,13 @@ module WebpayRails
|
|
74
74
|
def valid_environments
|
75
75
|
[:production, :certification, :integration]
|
76
76
|
end
|
77
|
+
|
78
|
+
def rails_logger
|
79
|
+
ActiveSupport::Logger.broadcast(WebpayRails.rails_logger)
|
80
|
+
end
|
81
|
+
|
82
|
+
def file_logger
|
83
|
+
Logger.new(Rails.root.join("log/webpay_#{@commerce_code}.log"))
|
84
|
+
end
|
77
85
|
end
|
78
86
|
end
|
data/lib/webpay_rails/version.rb
CHANGED
data/webpay_rails.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency 'signer', '~> 1.4.3'
|
23
23
|
s.add_dependency 'savon', '~> 2'
|
24
24
|
s.add_dependency 'nokogiri', '~> 1.6', '>= 1.6.7.2'
|
25
|
-
s.add_dependency 'activesupport', '>=
|
25
|
+
s.add_dependency 'activesupport', '>= 4', '< 5.1'
|
26
26
|
s.add_dependency 'railties', '>= 4.1.0', '< 5.1'
|
27
27
|
|
28
28
|
s.add_development_dependency 'rspec', '~> 3.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpay_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastián Orellana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: signer
|
@@ -64,14 +64,20 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '4'
|
68
|
+
- - "<"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '5.1'
|
68
71
|
type: :runtime
|
69
72
|
prerelease: false
|
70
73
|
version_requirements: !ruby/object:Gem::Requirement
|
71
74
|
requirements:
|
72
75
|
- - ">="
|
73
76
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
77
|
+
version: '4'
|
78
|
+
- - "<"
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '5.1'
|
75
81
|
- !ruby/object:Gem::Dependency
|
76
82
|
name: railties
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -335,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
341
|
version: '0'
|
336
342
|
requirements: []
|
337
343
|
rubyforge_project:
|
338
|
-
rubygems_version: 2.
|
344
|
+
rubygems_version: 2.6.10
|
339
345
|
signing_key:
|
340
346
|
specification_version: 4
|
341
347
|
summary: WebpayRails is an easy solution for integrate Transbank Webpay in Rails applications.
|