money_online 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +2 -9
- data/lib/money_online/request.rb +1 -4
- data/lib/money_online/version.rb +1 -1
- metadata +4 -4
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -40,18 +40,11 @@ class OrdersController < ApplicationController
|
|
40
40
|
redirect_to request.url
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
# app/controllers/payments_controller.rb
|
46
|
-
class PaymentsController < ApplicationController
|
47
|
-
|
48
|
-
# POST /payments/1/confirm
|
43
|
+
# POST /orders/1/confirm
|
49
44
|
def confirm
|
50
45
|
# params #=> amount: 7300, userid: 107, paymentid: 8831914, orderid: 8964, key: "d27f27b54c5c9b944685a111483e68b5"
|
51
46
|
response = MoneyOnline::Response.new(params)
|
52
|
-
if response.valid?
|
53
|
-
payment.confirm!
|
54
|
-
end
|
47
|
+
order.confirm! if response.valid?
|
55
48
|
render :xml => response
|
56
49
|
end
|
57
50
|
|
data/lib/money_online/request.rb
CHANGED
@@ -27,10 +27,7 @@ module MoneyOnline
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def params_valid?
|
30
|
-
[:amount, :user_id, :system_id, :order_id, :currency].
|
31
|
-
memo = false unless params[attribute]
|
32
|
-
memo
|
33
|
-
end
|
30
|
+
not [:amount, :user_id, :system_id, :order_id, :currency].any? { |attribute| params[attribute].blank? }
|
34
31
|
end
|
35
32
|
|
36
33
|
end
|
data/lib/money_online/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money_online
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-25 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: active_support
|
16
|
-
requirement: &
|
16
|
+
requirement: &70123164020300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70123164020300
|
25
25
|
description: MoneyOnline (aka DengiOnline) is a payment system, that have a single
|
26
26
|
interface for many payment providers
|
27
27
|
email:
|