payr 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/payr/bills_controller.rb +1 -2
- data/lib/payr/client.rb +6 -5
- data/lib/payr/version.rb +1 -1
- metadata +4 -4
@@ -1,8 +1,7 @@
|
|
1
1
|
class Payr::BillsController < ApplicationController
|
2
|
-
before_filter :check_response, except: [:pay, :failure, :ipn]
|
2
|
+
before_filter :check_response, except: [:pay, :failure, :ipn, :cancelled]
|
3
3
|
before_filter :check_ipn_response, only: [:ipn]
|
4
4
|
|
5
|
-
|
6
5
|
def pay
|
7
6
|
@bill = Payr::Bill.new(buyer_id: params[:buyer][:id],
|
8
7
|
amount: params[:total_price],
|
data/lib/payr/client.rb
CHANGED
@@ -20,17 +20,18 @@ module Payr
|
|
20
20
|
pbx_hash: Payr.hash.upcase,
|
21
21
|
pbx_time: command_timestamp }
|
22
22
|
|
23
|
-
|
24
|
-
returned_hash.merge!(pbx_typepaiement: Payr.typepaiement,
|
25
|
-
pbx_typepcarte: Payr.typecard) unless Payr.typepaiement.nil? || Payr.typecard.nil?
|
23
|
+
|
26
24
|
|
27
25
|
returned_hash.merge!(pbx_effectue: params[:callbacks][:paid],
|
28
26
|
pbx_refuse: params[:callbacks][:refused],
|
29
|
-
pbx_annule: params[:callbacks][:cancelled]
|
30
|
-
pbx_repondre_a: params[:callbacks][:cancelled])
|
27
|
+
pbx_annule: params[:callbacks][:cancelled])
|
31
28
|
|
32
29
|
returned_hash.merge!(pbx_repondre_a: params[:callbacks][:ipn])
|
33
30
|
|
31
|
+
# optionnal parameters
|
32
|
+
returned_hash.merge!(pbx_typepaiement: Payr.typepaiement,
|
33
|
+
pbx_typepcarte: Payr.typecard) unless Payr.typepaiement.nil? || Payr.typecard.nil?
|
34
|
+
|
34
35
|
base_params = self.to_base_params(returned_hash)
|
35
36
|
|
36
37
|
returned_hash.merge(pbx_hmac: self.generate_hmac(base_params))
|
data/lib/payr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
segments:
|
140
140
|
- 0
|
141
|
-
hash:
|
141
|
+
hash: -296478619546749009
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
none: false
|
144
144
|
requirements:
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash:
|
150
|
+
hash: -296478619546749009
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
153
|
rubygems_version: 1.8.24
|