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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: bd89d40d903eb3071605ebcb73c6a5ef076fe99b
4
- data.tar.gz: bff9e1d8f70f53d4273d0494cc969021cdfb7633
3
+ metadata.gz: !binary |-
4
+ YWRkYjBjMGNjMTI0ZjkzMDUxN2ViMmViZjViMjc1M2IzNjIxYWY0ZQ==
5
+ data.tar.gz: !binary |-
6
+ YjljYTFiM2ZiZGY5MDZiMmMyMWFhNTdiNzMyZGVjNmU4ZTBmYTY5OA==
5
7
  !binary "U0hBNTEy":
6
- metadata.gz: c8c2b53abdc3fffed22a2abffc276ef0c54e44891a57026c585f4373e9b542a507590434bbeb9fe206bf38ecbe3bb8b0414ae36059471ec5d5aa14a60b0794a3
7
- data.tar.gz: db52155ab82eecba64541f3e62fe732c7d50c1f30d15482b5d6144da7c9bd2c496892483b00964ab662b76b9ca68d53345de39cb3f61d944714e7843f471da6c
8
+ metadata.gz: !binary |-
9
+ YmFmZDA5NjQ2NmIxY2FiM2Q0YWNjOGQ5ZTA1MDk3ZjJkMDFhMzRkM2QzZTUz
10
+ ZWVmZTMyZTcyZmZjOWQxNDNmMjk5OTAxNWI0ZDIxNDYwMDA4MGMwYjY0NTVl
11
+ MTlkZTM1NDNhZDM5MjI4ZTY3MzQzZDU4NDNkYjFmMmI5ZDJjNzk=
12
+ data.tar.gz: !binary |-
13
+ OTdmZmQ1YzliODkxYTQ4MmY0ZDUyYTQ5MDliNzJmZjliMzQ3NjcxNWRjYzFh
14
+ NWU5ODExMmVhZjYwMjMwZDRiYmM5N2VjMTRjOTkzNmY2ODZlOGFmMTg3NWYw
15
+ MmNmODI3ZDlhMDE0ZDhiYTdlODJmMmJhYzk0MTFlOWNlNjg4OWU=
data/.gitignore CHANGED
@@ -1,5 +1,7 @@
1
1
  *.gem
2
2
  .bundle
3
3
  .rvmrc
4
+ .ruby-version
5
+ .ruby-gemset
4
6
  Gemfile.lock
5
7
  pkg/*
data/README.md CHANGED
@@ -1,12 +1,10 @@
1
- # payu
1
+ # payu [![Gem Version](https://badge.fury.io/rb/payu.png)](http://badge.fury.io/rb/payu) [![Build Status](https://api.travis-ci.org/ronin/payu.png?branch=master)](http://travis-ci.org/ronin/payu) [![Code Climate](https://codeclimate.com/github/ronin/payu.png)](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
- [![Build Status](https://api.travis-ci.org/ronin/payu.png?branch=master)](http://travis-ci.org/ronin/payu)
8
- [![Code Climate](https://codeclimate.com/github/ronin/payu.png)](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:
@@ -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] || false
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
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Payu
4
- VERSION = "0.7.2"
4
+ VERSION = '0.7.3'
5
5
  end
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.2
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-06-18 00:00:00.000000000 Z
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
- - ".gitignore"
20
- - ".rspec"
21
- - ".travis.yml"
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.0.preview3.1
60
+ rubygems_version: 2.0.3
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Simple integration with PayU gateway