paygate-ruby 0.2.2 → 0.2.3

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: b39137d4e1ac524c5a7a97e89c0619d70bf55a77ac236f0e5d3b07bc7a8628c4
4
- data.tar.gz: 811eeec4c2cde838b821e45316bb18709426414315b51cc1b2c322594257bac0
3
+ metadata.gz: 582cf643e186a710575161056933e2acf18bddab848e526c8e99ff9267a71074
4
+ data.tar.gz: 119afea7817bae85ef973d540e3b423c4c79cc3bb3d26688652d1e6bb18603e7
5
5
  SHA512:
6
- metadata.gz: 485d2199abb2a2bb5dd216e4b150c9f6a38e94de806465f8876bdb5f73086b9f85748f779479ffb3ab0d7f5a3eedc6a86c8884e7da8b4356293886d6e1c06723
7
- data.tar.gz: 4c9620b441fed34e1fe9d9989c2c73477f2b2a12179467d5e98f1422fe12c256e96c9f2790cb8cf0db40a71f6348ea534ed06d2952932ab7fcb0fd43ee949d48
6
+ metadata.gz: 66fcb7f94b75c4b4bd91c322d078575f20fdcbbb3ac9c6b5d6a5a5db5fa4f3f0428cf422fa553018f6e67aebddac704dcc18832c3922c86350243da460352241
7
+ data.tar.gz: 76d2ccb4a692fbeeef60dc1861ce0b07c068e7c5769da03eb0464b7f0f48455b8e0279a913a2992c8631078f9c3971dec02ad60eac06d7204b4dd5d966699a03
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
- ## Next
3
+ ## 0.2.3 - 2023-04-26
4
+
5
+ - [PR#13](https://github.com/tablecheck/paygate-ruby/pull/13) Make Rails helper functions as module_functions ([johnnyshields](https://github.com/johnnyshields))
4
6
 
5
7
  ## 0.2.2 - 2023-04-26
6
8
 
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Jagdeep Singh and TableCheck Inc.
3
+ Copyright (c) TableCheck Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -43,29 +43,35 @@ Contents:
43
43
 
44
44
  #### 1.1. Include JavaScript
45
45
 
46
- Include the _OpenPayAPI.js_ in `<head>` of your payment page.
46
+ Add `Paygate::Rails::FormHelper` to your controller.
47
47
 
48
- ```slim
49
- = javascript_include_tag paygate_open_pay_api_js_url
48
+ ```ruby
49
+ class ApplicationController < ActionController::Base
50
+ include Paygate::Rails::FormHelper
51
+ ```
52
+
53
+ Then include the _OpenPayAPI.js_ file in `<head>` of your payment page.
54
+
55
+ ```erb
56
+ <%= javascript_include_tag paygate_open_pay_api_js_url %>
50
57
  ```
51
58
 
52
59
  #### 1.2 Payment form
53
60
 
54
61
  Render the PayGate payment form in your view file.
55
62
 
56
- ```slim
57
- = paygate_open_pay_api_form
63
+ ```erb
64
+ <%= paygate_open_pay_api_form %>
58
65
  ```
59
66
 
60
67
  You will see a form with all the necessary fields for making payment with a credit card. Some of the fields have default values set. You can also set the value and placeholder for almost all the fields while rendering the form. See example below:
61
68
 
62
- ```slim
63
- / payment.html.slim
64
- = paygate_open_pay_api_form(\
65
- mid: { value: 'testmid', placeholder: 'Merchant ID' },
66
- currency: { value: 'USD' },
67
- amount: { value: 2000 }\
68
- )
69
+ ```erb
70
+ <%= paygate_open_pay_api_form(
71
+ mid: { value: 'testmid', placeholder: 'Merchant ID' },
72
+ currency: { value: 'USD' },
73
+ amount: { value: 2000 }
74
+ ) %>
69
75
  ```
70
76
 
71
77
  Here is a list of all the form fields which you can set:
@@ -321,7 +327,3 @@ response.json
321
327
  ## Contributing
322
328
 
323
329
  Bug reports and pull requests are welcome on GitHub at https://github.com/tablecheck/paygate-ruby.
324
-
325
- ## License
326
-
327
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -132,6 +132,7 @@ module Paygate
132
132
  'https://stgapi.paygate.net/ajax/common/OpenPayAPI.js'
133
133
  end
134
134
  end
135
+ module_function :paygate_open_pay_api_js_url
135
136
 
136
137
  def paygate_open_pay_api_form(options = {})
137
138
  form_tag({}, name: 'PGIOForm') do
@@ -150,10 +151,12 @@ module Paygate
150
151
  fields.join.html_safe
151
152
  end.html_safe
152
153
  end
154
+ module_function :paygate_open_pay_api_form
153
155
 
154
156
  def paygate_open_pay_api_screen
155
157
  content_tag(:div, nil, id: 'PGIOscreen')
156
158
  end
159
+ module_function :paygate_open_pay_api_screen
157
160
  end
158
161
  end
159
162
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paygate
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paygate-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jagdeepsingh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-26 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: