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 CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
+ .DS_Store
3
4
  Gemfile.lock
4
5
  pkg/*
data/README.md CHANGED
@@ -40,18 +40,11 @@ class OrdersController < ApplicationController
40
40
  redirect_to request.url
41
41
  end
42
42
 
43
- end
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? && (Order.find(response.order_id).amount == response.amount)
53
- payment.confirm!
54
- end
47
+ order.confirm! if response.valid?
55
48
  render :xml => response
56
49
  end
57
50
 
@@ -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].inject(true) do |memo, attribute|
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
@@ -1,3 +1,3 @@
1
1
  module MoneyOnline
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-14 00:00:00.000000000Z
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: &70345677064500 !ruby/object:Gem::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: *70345677064500
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: