smartkiosk-client 0.1.9 → 0.1.10
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.
data/app/controllers/payments.rb
CHANGED
@@ -41,15 +41,20 @@ class Application
|
|
41
41
|
Smartware.cash_acceptor.close
|
42
42
|
|
43
43
|
if payment.payment_type == 0
|
44
|
-
|
44
|
+
attributes = {
|
45
|
+
:banknotes => Smartware.cash_acceptor.banknotes
|
46
|
+
}
|
45
47
|
else
|
46
|
-
|
48
|
+
attributes = {
|
47
49
|
:paid_amount => params['payment']['paid_amount'],
|
48
50
|
:card_track1 => params['payment']['card_track1'],
|
49
51
|
:card_track2 => params['payment']['card_track2']
|
50
|
-
|
52
|
+
}
|
51
53
|
end
|
52
54
|
|
55
|
+
attributes[:meta] = params['payment']['meta']
|
56
|
+
|
57
|
+
payment.update_attributes attributes
|
53
58
|
payment.receipt.print
|
54
59
|
payment.pay
|
55
60
|
nil
|
data/app/models/payment.rb
CHANGED
@@ -11,6 +11,7 @@ module Payments
|
|
11
11
|
response = RestClient.post "#{Terminal.config.host}/payments/#{payment.foreign_id}/pay",
|
12
12
|
:provider => payment.provider.keyword,
|
13
13
|
:terminal => Terminal.config.keyword,
|
14
|
+
:meta => payment.meta,
|
14
15
|
:payment => {
|
15
16
|
:paid_amount => payment.paid_amount,
|
16
17
|
:card_track1 => payment.card_track1,
|
@@ -14,6 +14,7 @@ class CreatePayments < ActiveRecord::Migration
|
|
14
14
|
t.boolean :checked, :default => false
|
15
15
|
t.boolean :processed, :default => false
|
16
16
|
t.boolean :failed, :default => false
|
17
|
+
t.text :meta
|
17
18
|
|
18
19
|
t.decimal :paid_amount, :precision => 38, :scale => 2
|
19
20
|
t.decimal :commission_amount, :precision => 38, :scale => 2
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartkiosk-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -626,7 +626,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
626
626
|
version: '0'
|
627
627
|
segments:
|
628
628
|
- 0
|
629
|
-
hash:
|
629
|
+
hash: -1955689674729030001
|
630
630
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
631
631
|
none: false
|
632
632
|
requirements:
|
@@ -635,7 +635,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
635
635
|
version: '0'
|
636
636
|
segments:
|
637
637
|
- 0
|
638
|
-
hash:
|
638
|
+
hash: -1955689674729030001
|
639
639
|
requirements: []
|
640
640
|
rubyforge_project:
|
641
641
|
rubygems_version: 1.8.23
|