zarinpal 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/Guardfile +24 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/doc/Zarinpal.html +338 -0
- data/doc/Zarinpal/Configuration.html +445 -0
- data/doc/Zarinpal/Errors.html +149 -0
- data/doc/Zarinpal/PaymentRequest.html +805 -0
- data/doc/Zarinpal/PaymentVerification.html +540 -0
- data/doc/Zarinpal/Response.html +669 -0
- data/doc/Zarinpal/Response/ResponseError.html +123 -0
- data/doc/_index.html +184 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/doc/_index.html +88 -0
- data/doc/doc/class_list.html +54 -0
- data/doc/doc/css/common.css +1 -0
- data/doc/doc/css/full_list.css +57 -0
- data/doc/doc/css/style.css +338 -0
- data/doc/doc/file_list.html +53 -0
- data/doc/doc/frames.html +26 -0
- data/doc/doc/index.html +88 -0
- data/doc/doc/js/app.js +214 -0
- data/doc/doc/js/full_list.js +178 -0
- data/doc/doc/js/jquery.js +4 -0
- data/doc/doc/method_list.html +53 -0
- data/doc/doc/top-level-namespace.html +102 -0
- data/doc/file.README.html +105 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +105 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +191 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/zarinpal.rb +37 -0
- data/lib/zarinpal/errors.rb +17 -0
- data/lib/zarinpal/payment_request.rb +44 -0
- data/lib/zarinpal/payment_verification.rb +34 -0
- data/lib/zarinpal/response.rb +50 -0
- data/lib/zarinpal/version.rb +3 -0
- data/spec/lib/configuration_spec.rb +18 -0
- data/spec/lib/errors_spec.rb +7 -0
- data/spec/lib/payment_request_spec.rb +40 -0
- data/spec/lib/payment_verification_spec.rb +41 -0
- data/spec/lib/response_spec.rb +46 -0
- data/spec/lib/version_spec.rb +7 -0
- data/spec/spec_helper.rb +20 -0
- data/zarinpal.gemspec +29 -0
- metadata +206 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 037b80447fb14afde4afa4740e652e36be1cdb93
|
4
|
+
data.tar.gz: edc60e48e4f962688f86f85b1990c5a487441116
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c65a7b48349112b7baa7b1a7d577bfe94c21d0197c38e2ae8e7439c9781ab7331e4e92210c2a663baadc95cdd1dec10fcd002a1d3c053f4e5a418161d4e56c5b
|
7
|
+
data.tar.gz: bf178542c65b811c8b0cdcb636cd1e7c2a5db3ebe14495a1cbf43ddf0e6ce7866612c56d98d5a3a014a8fd3f87cb0a2f44afc9cd0d32122412f91c6873d482e4
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :rspec do
|
5
|
+
watch(%r{^spec/.+_spec\.rb$})
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
|
9
|
+
# Rails example
|
10
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
11
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
12
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
13
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
14
|
+
watch('config/routes.rb') { "spec/routing" }
|
15
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
16
|
+
|
17
|
+
# Capybara features specs
|
18
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
19
|
+
|
20
|
+
# Turnip features and steps
|
21
|
+
watch(%r{^spec/acceptance/(.+)\.feature$})
|
22
|
+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
23
|
+
end
|
24
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Arash Mousavi
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Zarinpal
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'zarinpal'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install zarinpal
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it ( http://github.com/<my-github-username>/zarinpal/fork )
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/doc/Zarinpal.html
ADDED
@@ -0,0 +1,338 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Module: Zarinpal
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.2
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '';
|
20
|
+
framesUrl = "frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="_index.html">Index (Z)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Zarinpal</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Module: Zarinpal
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<dt class="r1 last">Defined in:</dt>
|
82
|
+
<dd class="r1 last">lib/zarinpal.rb<span class="defines">,<br />
|
83
|
+
lib/zarinpal/errors.rb,<br /> lib/zarinpal/version.rb,<br /> lib/zarinpal/response.rb,<br /> lib/zarinpal/payment_request.rb,<br /> lib/zarinpal/payment_verification.rb</span>
|
84
|
+
</dd>
|
85
|
+
|
86
|
+
</dl>
|
87
|
+
<div class="clear"></div>
|
88
|
+
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
90
|
+
<div class="discussion">
|
91
|
+
|
92
|
+
<p>A library to send and verify transactions with Zaripal</p>
|
93
|
+
|
94
|
+
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
<div class="tags">
|
98
|
+
|
99
|
+
|
100
|
+
<p class="tag_title">See Also:</p>
|
101
|
+
<ul class="see">
|
102
|
+
|
103
|
+
<li><a href="http://zarinpal.com/" target="_parent" title="http://zarinpal.com/">http://zarinpal.com/</a></li>
|
104
|
+
|
105
|
+
</ul>
|
106
|
+
<p class="tag_title">Author:</p>
|
107
|
+
<ul class="author">
|
108
|
+
|
109
|
+
<li>
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<div class='inline'>
|
116
|
+
<p><a href="http://github.com/arashm" target="_parent" title="Arash Mousavi">Arash Mousavi</a></p>
|
117
|
+
</div>
|
118
|
+
|
119
|
+
</li>
|
120
|
+
|
121
|
+
</ul>
|
122
|
+
|
123
|
+
</div><h2>Defined Under Namespace</h2>
|
124
|
+
<p class="children">
|
125
|
+
|
126
|
+
|
127
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Zarinpal/Errors.html" title="Zarinpal::Errors (module)">Errors</a></span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Zarinpal/Configuration.html" title="Zarinpal::Configuration (class)">Configuration</a></span>, <span class='object_link'><a href="Zarinpal/PaymentRequest.html" title="Zarinpal::PaymentRequest (class)">PaymentRequest</a></span>, <span class='object_link'><a href="Zarinpal/PaymentVerification.html" title="Zarinpal::PaymentVerification (class)">PaymentVerification</a></span>, <span class='object_link'><a href="Zarinpal/Response.html" title="Zarinpal::Response (class)">Response</a></span>
|
132
|
+
|
133
|
+
|
134
|
+
</p>
|
135
|
+
|
136
|
+
<h2>Constant Summary</h2>
|
137
|
+
|
138
|
+
<dl class="constants">
|
139
|
+
|
140
|
+
<dt id="VERSION-constant" class="">VERSION =
|
141
|
+
|
142
|
+
</dt>
|
143
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>"</span></span></pre></dd>
|
144
|
+
|
145
|
+
</dl>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
152
|
+
<ul class="summary">
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#configuration-class_method" title="configuration (class method)">+ (Object) <strong>configuration</strong> </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<span class="summary_desc"><div class='inline'>
|
175
|
+
<p>Returns the value of attribute configuration.</p>
|
176
|
+
</div></span>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
|
181
|
+
</ul>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<h2>
|
188
|
+
Class Method Summary
|
189
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
190
|
+
</h2>
|
191
|
+
|
192
|
+
<ul class="summary">
|
193
|
+
|
194
|
+
<li class="public ">
|
195
|
+
<span class="summary_signature">
|
196
|
+
|
197
|
+
<a href="#configure-class_method" title="configure (class method)">+ (Object) <strong>configure</strong> {|configuration| ... }</a>
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
212
|
+
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
</ul>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
<div id="class_attr_details" class="attr_details">
|
221
|
+
<h2>Class Attribute Details</h2>
|
222
|
+
|
223
|
+
|
224
|
+
<span id="configuration=-class_method"></span>
|
225
|
+
<div class="method_details first">
|
226
|
+
<h3 class="signature first" id="configuration-class_method">
|
227
|
+
|
228
|
+
+ (<tt>Object</tt>) <strong>configuration</strong>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
</h3><div class="docstring">
|
235
|
+
<div class="discussion">
|
236
|
+
|
237
|
+
<p>Returns the value of attribute configuration</p>
|
238
|
+
|
239
|
+
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
<div class="tags">
|
243
|
+
|
244
|
+
|
245
|
+
</div><table class="source_code">
|
246
|
+
<tr>
|
247
|
+
<td>
|
248
|
+
<pre class="lines">
|
249
|
+
|
250
|
+
|
251
|
+
13
|
252
|
+
14
|
253
|
+
15</pre>
|
254
|
+
</td>
|
255
|
+
<td>
|
256
|
+
<pre class="code"><span class="info file"># File 'lib/zarinpal.rb', line 13</span>
|
257
|
+
|
258
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_configuration'>configuration</span>
|
259
|
+
<span class='ivar'>@configuration</span>
|
260
|
+
<span class='kw'>end</span></pre>
|
261
|
+
</td>
|
262
|
+
</tr>
|
263
|
+
</table>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
</div>
|
267
|
+
|
268
|
+
|
269
|
+
<div id="class_method_details" class="method_details_list">
|
270
|
+
<h2>Class Method Details</h2>
|
271
|
+
|
272
|
+
|
273
|
+
<div class="method_details first">
|
274
|
+
<h3 class="signature first" id="configure-class_method">
|
275
|
+
|
276
|
+
+ (<tt>Object</tt>) <strong>configure</strong> {|configuration| ... }
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
</h3><div class="docstring">
|
283
|
+
<div class="discussion">
|
284
|
+
|
285
|
+
|
286
|
+
</div>
|
287
|
+
</div>
|
288
|
+
<div class="tags">
|
289
|
+
|
290
|
+
<p class="tag_title">Yields:</p>
|
291
|
+
<ul class="yield">
|
292
|
+
|
293
|
+
<li>
|
294
|
+
|
295
|
+
|
296
|
+
<span class='type'>(<tt><span class='object_link'><a href="#configuration-class_method" title="Zarinpal.configuration (method)">configuration</a></span></tt>)</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
</ul>
|
303
|
+
|
304
|
+
</div><table class="source_code">
|
305
|
+
<tr>
|
306
|
+
<td>
|
307
|
+
<pre class="lines">
|
308
|
+
|
309
|
+
|
310
|
+
16
|
311
|
+
17
|
312
|
+
18
|
313
|
+
19</pre>
|
314
|
+
</td>
|
315
|
+
<td>
|
316
|
+
<pre class="code"><span class="info file"># File 'lib/zarinpal.rb', line 16</span>
|
317
|
+
|
318
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span>
|
319
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span> <span class='op'>||=</span> <span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
320
|
+
<span class='kw'>yield</span> <span class='id identifier rubyid_configuration'>configuration</span>
|
321
|
+
<span class='kw'>end</span></pre>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
</table>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div id="footer">
|
332
|
+
Generated on Sat Mar 1 21:03:59 2014 by
|
333
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
334
|
+
0.8.7.2 (ruby-2.1.0).
|
335
|
+
</div>
|
336
|
+
|
337
|
+
</body>
|
338
|
+
</html>
|