ruby-gpwebpay 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gp_webpay/config.rb +3 -2
- data/lib/gp_webpay/version.rb +1 -1
- data/lib/gp_webpay/web_services.rb +5 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10f9f36280dd83177937a3322e9e8dd0d132b7d8a0fea71b57e3d5c643488f62
|
4
|
+
data.tar.gz: 650bbf6c40432feb19d0b1488ec9f7bd5191fe583497456f7eb3e8e74960c480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f304f61ac02fcf7e9369c3b272a5a226865441f07aa8e3d93958a441d3603bb18d03a161053404109784983acc13b9d16e55341e72833ee7b4e429f31774e19
|
7
|
+
data.tar.gz: c193811d72686dccdef9da9b28abb97d1615543f822575ba6d547a652aafd400728502f6c6e0b9112c0b9645d8be687d676ee0490e883e490f3360fdfa554275
|
data/lib/gp_webpay/config.rb
CHANGED
@@ -25,6 +25,7 @@ module GpWebpay
|
|
25
25
|
config_accessor :environment do
|
26
26
|
defined?(Rails) && Rails.env || "test"
|
27
27
|
end
|
28
|
+
config_accessor :debug do false; end
|
28
29
|
|
29
30
|
def param_name
|
30
31
|
config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
|
@@ -32,9 +33,9 @@ module GpWebpay
|
|
32
33
|
|
33
34
|
def pay_url
|
34
35
|
if production?
|
35
|
-
"https://3dsecure.gpwebpay.com/
|
36
|
+
"https://3dsecure.gpwebpay.com/pgw/order.do"
|
36
37
|
else
|
37
|
-
"https://test.3dsecure.gpwebpay.com/
|
38
|
+
"https://test.3dsecure.gpwebpay.com/pgw/order.do"
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
data/lib/gp_webpay/version.rb
CHANGED
@@ -9,6 +9,7 @@ module GpWebpay
|
|
9
9
|
extend ActiveSupport::Concern
|
10
10
|
|
11
11
|
def send_request(request_xml)
|
12
|
+
GpWebpay.logger.debug "WS Raw request: #{request_xml}" if GpWebpay.config.debug
|
12
13
|
request = Curl::Easy.new(config.web_services_url)
|
13
14
|
request.headers["Content-Type"] = "text/xml;charset=UTF-8"
|
14
15
|
request.http_post(request_xml)
|
@@ -30,24 +31,28 @@ module GpWebpay
|
|
30
31
|
def ws_process_regular_subscription_payment
|
31
32
|
attributes = request_attributes("processRegularSubscriptionPayment")
|
32
33
|
raw_response = send_request(template.process_regular_subscription_payment(attributes)).body_str
|
34
|
+
GpWebpay.logger.debug "WS Raw response: #{raw_response}" if GpWebpay.config.debug
|
33
35
|
get_params_from(raw_response)
|
34
36
|
end
|
35
37
|
|
36
38
|
def ws_get_payment_detail
|
37
39
|
attributes = request_attributes("getPaymentDetail")
|
38
40
|
raw_response = send_request(template.get_payment_detail(attributes)).body_str
|
41
|
+
GpWebpay.logger.debug "WS Raw response: #{raw_response}" if GpWebpay.config.debug
|
39
42
|
get_params_from(raw_response)
|
40
43
|
end
|
41
44
|
|
42
45
|
def ws_get_payment_status
|
43
46
|
attributes = request_attributes("getPaymentStatus")
|
44
47
|
raw_response = send_request(template.get_payment_status(attributes)).body_str
|
48
|
+
GpWebpay.logger.debug "WS Raw response: #{raw_response}" if GpWebpay.config.debug
|
45
49
|
get_params_from(raw_response)
|
46
50
|
end
|
47
51
|
|
48
52
|
def ws_get_master_payment_status
|
49
53
|
attributes = request_attributes("getMasterPaymentStatus")
|
50
54
|
raw_response = send_request(template.get_master_payment_status(attributes)).body_str
|
55
|
+
GpWebpay.logger.debug "WS Raw response: #{raw_response}" if GpWebpay.config.debug
|
51
56
|
get_params_from(raw_response)
|
52
57
|
end
|
53
58
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-gpwebpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrej Antas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -192,7 +192,7 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
-
description:
|
195
|
+
description:
|
196
196
|
email:
|
197
197
|
- andrej@antas.cz
|
198
198
|
executables: []
|
@@ -224,7 +224,7 @@ homepage: https://github.com/redrick/gpwebpay
|
|
224
224
|
licenses:
|
225
225
|
- MIT
|
226
226
|
metadata: {}
|
227
|
-
post_install_message:
|
227
|
+
post_install_message:
|
228
228
|
rdoc_options: []
|
229
229
|
require_paths:
|
230
230
|
- lib
|
@@ -239,8 +239,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
|
-
rubygems_version: 3.
|
243
|
-
signing_key:
|
242
|
+
rubygems_version: 3.4.19
|
243
|
+
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: GP webpay, payments, SOAP, payment gateway
|
246
246
|
test_files: []
|