spree_onpay 0.1 → 0.2
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.
@@ -1,3 +1,4 @@
|
|
1
|
+
#encoding: utf-8
|
1
2
|
class Gateway::OnpayController < Spree::BaseController
|
2
3
|
skip_before_filter :verify_authenticity_token, :only => [:api]
|
3
4
|
before_filter :load_order, :only => [:api]
|
@@ -40,9 +41,7 @@ class Gateway::OnpayController < Spree::BaseController
|
|
40
41
|
params["order_currency"],
|
41
42
|
@gateway.options[:priv_code]].join(';')).upcase
|
42
43
|
if @gateway.options[:test_mode] then
|
43
|
-
logger.debug "--TEST"
|
44
44
|
tst_valid_check(params["pay_for"],params["order_amount"],params["order_currency"]) ? out_code_comment(0,"All,OK") : out_code_comment(3,"Error on parameters check")
|
45
|
-
logger.debug "---#{@out["code"]}"
|
46
45
|
else
|
47
46
|
valid_check(params["pay_for"],params["order_amount"],params["order_currency"]) ? out_code_comment(0,"All,OK") : out_code_comment(3,"Error on parameters check")
|
48
47
|
end
|
@@ -68,16 +67,13 @@ class Gateway::OnpayController < Spree::BaseController
|
|
68
67
|
@out["onpay_id"] = params["onpay_id"]
|
69
68
|
if @gateway.options[:test_mode] then
|
70
69
|
if tst_valid_check(params["pay_for"],params["order_amount"],params["order_currency"]) then
|
71
|
-
logger.debug "--TEST"
|
72
70
|
create_payment(params["order_amount"].to_f)
|
73
71
|
out_code_comment(0,"OK")
|
74
72
|
else
|
75
73
|
out_code_comment(3,"Error on parameters check")
|
76
74
|
end
|
77
|
-
logger.debug "---#{@out["code"]}"
|
78
75
|
else
|
79
76
|
if valid_check(params["pay_for"],params["order_amount"],params["order_currency"]) then
|
80
|
-
logger.debug "--ORIGINAL"
|
81
77
|
create_payment(params["order_amount"].to_f)
|
82
78
|
out_code_comment(0,"OK")
|
83
79
|
else
|
data/app/models/gateway/onpay.rb
CHANGED
data/spree_onpay.gemspec
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_onpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: "0.
|
8
|
+
- 2
|
9
|
+
version: "0.2"
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Reshetov Andrei
|