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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 493b0cc82ddb5121dbc99cf6bed9a551353b05afd152170dfe17d5d01a62af82
4
- data.tar.gz: 5e038735011db9cb45948a95abe68ecf4696ae6252ca25f4ab4182f0be030d6a
3
+ metadata.gz: 10f9f36280dd83177937a3322e9e8dd0d132b7d8a0fea71b57e3d5c643488f62
4
+ data.tar.gz: 650bbf6c40432feb19d0b1488ec9f7bd5191fe583497456f7eb3e8e74960c480
5
5
  SHA512:
6
- metadata.gz: 0b68c379ce06ba515c548602dd8fb7073882ecd277b80ca4fd080749cdb4c16fe220e8523d39162b99f9f217c153d4615a6792454f500d1955cdb74ea55fab57
7
- data.tar.gz: ffa53f96c7b4ec84041311b3fc59b7869063013188320cb233343dc3ef9c399e5ef40524da1a73907998d82aedcf4e9e0b0c54c3ff2662f1cfc45e92c186fc7e
6
+ metadata.gz: 8f304f61ac02fcf7e9369c3b272a5a226865441f07aa8e3d93958a441d3603bb18d03a161053404109784983acc13b9d16e55341e72833ee7b4e429f31774e19
7
+ data.tar.gz: c193811d72686dccdef9da9b28abb97d1615543f822575ba6d547a652aafd400728502f6c6e0b9112c0b9645d8be687d676ee0490e883e490f3360fdfa554275
@@ -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/kb/order.do"
36
+ "https://3dsecure.gpwebpay.com/pgw/order.do"
36
37
  else
37
- "https://test.3dsecure.gpwebpay.com/kb/order.do"
38
+ "https://test.3dsecure.gpwebpay.com/pgw/order.do"
38
39
  end
39
40
  end
40
41
 
@@ -1,3 +1,3 @@
1
1
  module GpWebpay
2
- VERSION = "0.1.4"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -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.1.4
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: 2021-03-31 00:00:00.000000000 Z
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.0.8
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: []