payu 0.7.2 → 0.7.3
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 +12 -4
- data/.gitignore +2 -0
- data/README.md +5 -5
- data/lib/payu/pos.rb +5 -2
- data/lib/payu/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
|
-
metadata.gz:
|
4
|
-
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YWRkYjBjMGNjMTI0ZjkzMDUxN2ViMmViZjViMjc1M2IzNjIxYWY0ZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YjljYTFiM2ZiZGY5MDZiMmMyMWFhNTdiNzMyZGVjNmU4ZTBmYTY5OA==
|
5
7
|
!binary "U0hBNTEy":
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YmFmZDA5NjQ2NmIxY2FiM2Q0YWNjOGQ5ZTA1MDk3ZjJkMDFhMzRkM2QzZTUz
|
10
|
+
ZWVmZTMyZTcyZmZjOWQxNDNmMjk5OTAxNWI0ZDIxNDYwMDA4MGMwYjY0NTVl
|
11
|
+
MTlkZTM1NDNhZDM5MjI4ZTY3MzQzZDU4NDNkYjFmMmI5ZDJjNzk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTdmZmQ1YzliODkxYTQ4MmY0ZDUyYTQ5MDliNzJmZjliMzQ3NjcxNWRjYzFh
|
14
|
+
NWU5ODExMmVhZjYwMjMwZDRiYmM5N2VjMTRjOTkzNmY2ODZlOGFmMTg3NWYw
|
15
|
+
MmNmODI3ZDlhMDE0ZDhiYTdlODJmMmJhYzk0MTFlOWNlNjg4OWU=
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
# payu
|
1
|
+
# payu [](http://badge.fury.io/rb/payu) [](http://travis-ci.org/ronin/payu) [](https://codeclimate.com/github/ronin/payu)
|
2
|
+
|
2
3
|
|
3
4
|
Simple library for accepting payments via PayU.
|
4
5
|
|
5
6
|
By [Visuality](http://www.visuality.pl).
|
6
7
|
|
7
|
-
[](http://travis-ci.org/ronin/payu)
|
8
|
-
[](https://codeclimate.com/github/ronin/payu)
|
9
|
-
|
10
8
|
## Features
|
11
9
|
|
12
10
|
* No dependencies on ActiveSupport or any similar libraries, so it should work in any Ruby application or framework
|
@@ -37,7 +35,7 @@ This gem implements only core functionality for integrating with PayU gateway. I
|
|
37
35
|
Your app will interact with PayU via point of sale (Pos). You can create it on PayU website and get its credentials. With these credentials you can create Pos instance:
|
38
36
|
|
39
37
|
```ruby
|
40
|
-
pos = Payu::Pos.new :pos_id => '12345', :pos_auth_key => 'abcdefghijk', :key1 => 'xxxxxxxx', :key2 => 'xxxxxxxx'
|
38
|
+
pos = Payu::Pos.new :pos_id => '12345', :pos_auth_key => 'abcdefghijk', :key1 => 'xxxxxxxx', :key2 => 'xxxxxxxx', :add_signature => true
|
41
39
|
```
|
42
40
|
|
43
41
|
You can also load Pos configuration from yaml file. For example config/payu.yml:
|
@@ -49,6 +47,7 @@ bank:
|
|
49
47
|
key1: XXX
|
50
48
|
key2: XXX
|
51
49
|
type: default
|
50
|
+
add_signature: true
|
52
51
|
|
53
52
|
sms:
|
54
53
|
pos_id: 56789
|
@@ -56,6 +55,7 @@ sms:
|
|
56
55
|
key1: XXX
|
57
56
|
key2: XXX
|
58
57
|
type: sms_premium
|
58
|
+
add_signature: false
|
59
59
|
```
|
60
60
|
|
61
61
|
Then add new initializer config/initializers/payu.rb:
|
data/lib/payu/pos.rb
CHANGED
@@ -20,7 +20,7 @@ module Payu
|
|
20
20
|
@variant = options[:variant] || 'default'
|
21
21
|
@encoding = options[:encoding] || 'UTF'
|
22
22
|
@test_payment = options[:test_payment] || false
|
23
|
-
@add_signature = options[:add_signature] ||
|
23
|
+
@add_signature = options[:add_signature] || true
|
24
24
|
|
25
25
|
raise PosInvalid.new('Missing pos_id parameter') if pos_id.nil? || pos_id == 0
|
26
26
|
raise PosInvalid.new('Missing pos_auth_key parameter') if pos_auth_key.nil? || pos_auth_key == ''
|
@@ -40,11 +40,14 @@ module Payu
|
|
40
40
|
:pos_id => @pos_id,
|
41
41
|
:pos_auth_key => @pos_auth_key,
|
42
42
|
:key1 => @key1,
|
43
|
-
:add_signature => add_signature?,
|
44
43
|
:encoding => encoding,
|
45
44
|
:variant => variant
|
46
45
|
})
|
47
46
|
|
47
|
+
if !options.has_key?(:add_signature)
|
48
|
+
options[:add_signature] = add_signature?
|
49
|
+
end
|
50
|
+
|
48
51
|
if !options.has_key?(:pay_type)
|
49
52
|
options[:pay_type] = test_payment? ? 't' : nil
|
50
53
|
end
|
data/lib/payu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Młoźniak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Simple integration with PayU gateway
|
14
14
|
email: michal.mlozniak@visuality.pl
|
@@ -16,9 +16,9 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
19
|
+
- .gitignore
|
20
|
+
- .rspec
|
21
|
+
- .travis.yml
|
22
22
|
- Gemfile
|
23
23
|
- LICENSE
|
24
24
|
- README.md
|
@@ -47,17 +47,17 @@ require_paths:
|
|
47
47
|
- lib
|
48
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
|
-
- -
|
50
|
+
- - ! '>='
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ! '>='
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
59
|
rubyforge_project:
|
60
|
-
rubygems_version: 2.0.
|
60
|
+
rubygems_version: 2.0.3
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: Simple integration with PayU gateway
|