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 +4 -4
- data/CHANGELOG.md +3 -1
- data/LICENSE.txt +1 -1
- data/README.md +18 -16
- data/lib/paygate/rails/form_helper.rb +3 -0
- data/lib/paygate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 582cf643e186a710575161056933e2acf18bddab848e526c8e99ff9267a71074
|
4
|
+
data.tar.gz: 119afea7817bae85ef973d540e3b423c4c79cc3bb3d26688652d1e6bb18603e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66fcb7f94b75c4b4bd91c322d078575f20fdcbbb3ac9c6b5d6a5a5db5fa4f3f0428cf422fa553018f6e67aebddac704dcc18832c3922c86350243da460352241
|
7
|
+
data.tar.gz: 76d2ccb4a692fbeeef60dc1861ce0b07c068e7c5769da03eb0464b7f0f48455b8e0279a913a2992c8631078f9c3971dec02ad60eac06d7204b4dd5d966699a03
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c)
|
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
|
-
|
46
|
+
Add `Paygate::Rails::FormHelper` to your controller.
|
47
47
|
|
48
|
-
```
|
49
|
-
|
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
|
-
```
|
57
|
-
|
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
|
-
```
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
data/lib/paygate/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|