payments-pl 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1283 @@
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 name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: Payments::Pos</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (P)</a> &raquo;
27
+ <span class='title'><a href="../Payments.html" title="Payments (module)">Payments</a></span>
28
+ &raquo;
29
+ <span class="title">Pos</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Class: Payments::Pos
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+ <dt class="r1">Inherits:</dt>
55
+ <dd class="r1">
56
+ <span class="inheritName">Object</span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next">Payments::Pos</li>
62
+
63
+ </ul>
64
+ <a href="#" class="inheritanceTree">show all</a>
65
+
66
+ </dd>
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ <dt class="r2 last">Defined in:</dt>
77
+ <dd class="r2 last">lib/payments/pos.rb</dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+
83
+
84
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
85
+ <ul class="summary">
86
+
87
+ <li class="public ">
88
+ <span class="summary_signature">
89
+
90
+ <a href="#encoding-instance_method" title="#encoding (instance method)">- (Object) <strong>encoding</strong> </a>
91
+
92
+
93
+
94
+ </span>
95
+
96
+
97
+ <span class="note title readonly">readonly</span>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ <span class="summary_desc"><div class='inline'><p>
107
+ Returns the value of attribute encoding.
108
+ </p>
109
+ </div></span>
110
+
111
+ </li>
112
+
113
+
114
+ <li class="public ">
115
+ <span class="summary_signature">
116
+
117
+ <a href="#key1-instance_method" title="#key1 (instance method)">- (Object) <strong>key1</strong> </a>
118
+
119
+
120
+
121
+ </span>
122
+
123
+
124
+ <span class="note title readonly">readonly</span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'><p>
134
+ Returns the value of attribute key1.
135
+ </p>
136
+ </div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#key2-instance_method" title="#key2 (instance method)">- (Object) <strong>key2</strong> </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+ <span class="note title readonly">readonly</span>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+ <span class="summary_desc"><div class='inline'><p>
161
+ Returns the value of attribute key2.
162
+ </p>
163
+ </div></span>
164
+
165
+ </li>
166
+
167
+
168
+ <li class="public ">
169
+ <span class="summary_signature">
170
+
171
+ <a href="#pos_auth_key-instance_method" title="#pos_auth_key (instance method)">- (Object) <strong>pos_auth_key</strong> </a>
172
+
173
+
174
+
175
+ </span>
176
+
177
+
178
+ <span class="note title readonly">readonly</span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'><p>
188
+ Returns the value of attribute pos_auth_key.
189
+ </p>
190
+ </div></span>
191
+
192
+ </li>
193
+
194
+
195
+ <li class="public ">
196
+ <span class="summary_signature">
197
+
198
+ <a href="#pos_id-instance_method" title="#pos_id (instance method)">- (Object) <strong>pos_id</strong> </a>
199
+
200
+
201
+
202
+ </span>
203
+
204
+
205
+ <span class="note title readonly">readonly</span>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'><p>
215
+ Returns the value of attribute pos_id.
216
+ </p>
217
+ </div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+ <span class="note title readonly">readonly</span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+ <span class="summary_desc"><div class='inline'><p>
242
+ Returns the value of attribute type.
243
+ </p>
244
+ </div></span>
245
+
246
+ </li>
247
+
248
+
249
+ </ul>
250
+
251
+
252
+
253
+ <h2>
254
+ Instance Method Summary
255
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
256
+ </h2>
257
+
258
+ <ul class="summary">
259
+
260
+ <li class="public ">
261
+ <span class="summary_signature">
262
+
263
+ <a href="#cancel-instance_method" title="#cancel (instance method)">- (Object) <strong>cancel</strong>(session_id) </a>
264
+
265
+
266
+
267
+ </span>
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <span class="summary_desc"><div class='inline'></div></span>
277
+
278
+ </li>
279
+
280
+
281
+ <li class="public ">
282
+ <span class="summary_signature">
283
+
284
+ <a href="#confirm-instance_method" title="#confirm (instance method)">- (Object) <strong>confirm</strong>(session_id) </a>
285
+
286
+
287
+
288
+ </span>
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'></div></span>
298
+
299
+ </li>
300
+
301
+
302
+ <li class="public ">
303
+ <span class="summary_signature">
304
+
305
+ <a href="#encrypt-instance_method" title="#encrypt (instance method)">- (Object) <strong>encrypt</strong>(*params) </a>
306
+
307
+
308
+
309
+ </span>
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+ <span class="summary_desc"><div class='inline'></div></span>
319
+
320
+ </li>
321
+
322
+
323
+ <li class="public ">
324
+ <span class="summary_signature">
325
+
326
+ <a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong>(session_id) </a>
327
+
328
+
329
+
330
+ </span>
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+ <span class="summary_desc"><div class='inline'></div></span>
340
+
341
+ </li>
342
+
343
+
344
+ <li class="public ">
345
+ <span class="summary_signature">
346
+
347
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Pos) <strong>initialize</strong>(options) </a>
348
+
349
+
350
+
351
+ </span>
352
+
353
+ <span class="note title constructor">constructor</span>
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+ <span class="summary_desc"><div class='inline'><p>
363
+ A new instance of Pos.
364
+ </p>
365
+ </div></span>
366
+
367
+ </li>
368
+
369
+
370
+ <li class="public ">
371
+ <span class="summary_signature">
372
+
373
+ <a href="#new_transaction-instance_method" title="#new_transaction (instance method)">- (Object) <strong>new_transaction</strong>(options = {}) </a>
374
+
375
+
376
+
377
+ </span>
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ <span class="summary_desc"><div class='inline'></div></span>
387
+
388
+ </li>
389
+
390
+
391
+ <li class="public ">
392
+ <span class="summary_signature">
393
+
394
+ <a href="#new_transaction_url-instance_method" title="#new_transaction_url (instance method)">- (Object) <strong>new_transaction_url</strong> </a>
395
+
396
+
397
+
398
+ </span>
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+ <span class="summary_desc"><div class='inline'></div></span>
408
+
409
+ </li>
410
+
411
+
412
+ <li class="public ">
413
+ <span class="summary_signature">
414
+
415
+ <a href="#parse_response_body-instance_method" title="#parse_response_body (instance method)">- (Object) <strong>parse_response_body</strong>(body) </a>
416
+
417
+
418
+
419
+ </span>
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'></div></span>
429
+
430
+ </li>
431
+
432
+
433
+ <li class="public ">
434
+ <span class="summary_signature">
435
+
436
+ <a href="#path_for-instance_method" title="#path_for (instance method)">- (Object) <strong>path_for</strong>(method) </a>
437
+
438
+
439
+
440
+ </span>
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+ <span class="summary_desc"><div class='inline'></div></span>
450
+
451
+ </li>
452
+
453
+
454
+ <li class="public ">
455
+ <span class="summary_signature">
456
+
457
+ <a href="#prepare_data-instance_method" title="#prepare_data (instance method)">- (Object) <strong>prepare_data</strong>(session_id) </a>
458
+
459
+
460
+
461
+ </span>
462
+
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+ <span class="summary_desc"><div class='inline'></div></span>
471
+
472
+ </li>
473
+
474
+
475
+ <li class="public ">
476
+ <span class="summary_signature">
477
+
478
+ <a href="#send_request-instance_method" title="#send_request (instance method)">- (Object) <strong>send_request</strong>(method, session_id) </a>
479
+
480
+
481
+
482
+ </span>
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+ <span class="summary_desc"><div class='inline'></div></span>
492
+
493
+ </li>
494
+
495
+
496
+ <li class="public ">
497
+ <span class="summary_signature">
498
+
499
+ <a href="#verify-instance_method" title="#verify (instance method)">- (Object) <strong>verify</strong>(t) </a>
500
+
501
+
502
+
503
+ </span>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+ <span class="summary_desc"><div class='inline'></div></span>
513
+
514
+ </li>
515
+
516
+
517
+ </ul>
518
+
519
+
520
+ <div id="constructor_details" class="method_details_list">
521
+ <h2>Constructor Details</h2>
522
+
523
+ <div class="method_details first">
524
+ <p class="signature first" id="initialize-instance_method">
525
+
526
+ - (<tt><a href="" title="Payments::Pos (class)">Pos</a></tt>) <strong>initialize</strong>(options)
527
+
528
+
529
+
530
+ </p><div class="docstring">
531
+ <div class="discussion">
532
+ <p>
533
+ A new instance of Pos
534
+ </p>
535
+
536
+
537
+ </div>
538
+ </div>
539
+ <div class="tags">
540
+
541
+ </div><table class="source_code">
542
+ <tr>
543
+ <td>
544
+ <pre class="lines">
545
+
546
+
547
+ 7
548
+ 8
549
+ 9
550
+ 10
551
+ 11
552
+ 12
553
+ 13
554
+ 14
555
+ 15
556
+ 16</pre>
557
+ </td>
558
+ <td>
559
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 7</span>
560
+
561
+ <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
562
+ <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='symbolize_keys! fid id'>symbolize_keys!</span>
563
+
564
+ <span class='@pos_id ivar id'>@pos_id</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:pos_id</span><span class='rbrack token'>]</span>
565
+ <span class='@pos_auth_key ivar id'>@pos_auth_key</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:pos_auth_key</span><span class='rbrack token'>]</span>
566
+ <span class='@key1 ivar id'>@key1</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:key1</span><span class='rbrack token'>]</span>
567
+ <span class='@key2 ivar id'>@key2</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:key2</span><span class='rbrack token'>]</span>
568
+ <span class='@type ivar id'>@type</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:type</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='string val'>'express_gateway'</span>
569
+ <span class='@encoding ivar id'>@encoding</span> <span class='assign token'>=</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:encoding</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='string val'>'UTF'</span>
570
+ <span class='end end kw'>end</span>
571
+ </pre>
572
+ </td>
573
+ </tr>
574
+ </table>
575
+ </div>
576
+
577
+ </div>
578
+
579
+ <div id="instance_attr_details" class="attr_details">
580
+ <h2>Instance Attribute Details</h2>
581
+
582
+
583
+ <span id=""></span>
584
+ <span id="encoding-instance_method"></span>
585
+ <div class="method_details first">
586
+ <p class="signature first" id="encoding-instance_method">
587
+
588
+ - (<tt>Object</tt>) <strong>encoding</strong> <span class="extras">(readonly)</span>
589
+
590
+
591
+
592
+ </p><div class="docstring">
593
+ <div class="discussion">
594
+ <p>
595
+ Returns the value of attribute encoding
596
+ </p>
597
+
598
+
599
+ </div>
600
+ </div>
601
+ <div class="tags">
602
+
603
+ </div><table class="source_code">
604
+ <tr>
605
+ <td>
606
+ <pre class="lines">
607
+
608
+
609
+ 5
610
+ 6
611
+ 7</pre>
612
+ </td>
613
+ <td>
614
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
615
+
616
+ <span class='def def kw'>def</span> <span class='encoding identifier id'>encoding</span>
617
+ <span class='@encoding ivar id'>@encoding</span>
618
+ <span class='end end kw'>end</span>
619
+ </pre>
620
+ </td>
621
+ </tr>
622
+ </table>
623
+ </div>
624
+
625
+
626
+ <span id=""></span>
627
+ <span id="key1-instance_method"></span>
628
+ <div class="method_details ">
629
+ <p class="signature " id="key1-instance_method">
630
+
631
+ - (<tt>Object</tt>) <strong>key1</strong> <span class="extras">(readonly)</span>
632
+
633
+
634
+
635
+ </p><div class="docstring">
636
+ <div class="discussion">
637
+ <p>
638
+ Returns the value of attribute key1
639
+ </p>
640
+
641
+
642
+ </div>
643
+ </div>
644
+ <div class="tags">
645
+
646
+ </div><table class="source_code">
647
+ <tr>
648
+ <td>
649
+ <pre class="lines">
650
+
651
+
652
+ 5
653
+ 6
654
+ 7</pre>
655
+ </td>
656
+ <td>
657
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
658
+
659
+ <span class='def def kw'>def</span> <span class='key1 identifier id'>key1</span>
660
+ <span class='@key1 ivar id'>@key1</span>
661
+ <span class='end end kw'>end</span>
662
+ </pre>
663
+ </td>
664
+ </tr>
665
+ </table>
666
+ </div>
667
+
668
+
669
+ <span id=""></span>
670
+ <span id="key2-instance_method"></span>
671
+ <div class="method_details ">
672
+ <p class="signature " id="key2-instance_method">
673
+
674
+ - (<tt>Object</tt>) <strong>key2</strong> <span class="extras">(readonly)</span>
675
+
676
+
677
+
678
+ </p><div class="docstring">
679
+ <div class="discussion">
680
+ <p>
681
+ Returns the value of attribute key2
682
+ </p>
683
+
684
+
685
+ </div>
686
+ </div>
687
+ <div class="tags">
688
+
689
+ </div><table class="source_code">
690
+ <tr>
691
+ <td>
692
+ <pre class="lines">
693
+
694
+
695
+ 5
696
+ 6
697
+ 7</pre>
698
+ </td>
699
+ <td>
700
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
701
+
702
+ <span class='def def kw'>def</span> <span class='key2 identifier id'>key2</span>
703
+ <span class='@key2 ivar id'>@key2</span>
704
+ <span class='end end kw'>end</span>
705
+ </pre>
706
+ </td>
707
+ </tr>
708
+ </table>
709
+ </div>
710
+
711
+
712
+ <span id=""></span>
713
+ <span id="pos_auth_key-instance_method"></span>
714
+ <div class="method_details ">
715
+ <p class="signature " id="pos_auth_key-instance_method">
716
+
717
+ - (<tt>Object</tt>) <strong>pos_auth_key</strong> <span class="extras">(readonly)</span>
718
+
719
+
720
+
721
+ </p><div class="docstring">
722
+ <div class="discussion">
723
+ <p>
724
+ Returns the value of attribute pos_auth_key
725
+ </p>
726
+
727
+
728
+ </div>
729
+ </div>
730
+ <div class="tags">
731
+
732
+ </div><table class="source_code">
733
+ <tr>
734
+ <td>
735
+ <pre class="lines">
736
+
737
+
738
+ 5
739
+ 6
740
+ 7</pre>
741
+ </td>
742
+ <td>
743
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
744
+
745
+ <span class='def def kw'>def</span> <span class='pos_auth_key identifier id'>pos_auth_key</span>
746
+ <span class='@pos_auth_key ivar id'>@pos_auth_key</span>
747
+ <span class='end end kw'>end</span>
748
+ </pre>
749
+ </td>
750
+ </tr>
751
+ </table>
752
+ </div>
753
+
754
+
755
+ <span id=""></span>
756
+ <span id="pos_id-instance_method"></span>
757
+ <div class="method_details ">
758
+ <p class="signature " id="pos_id-instance_method">
759
+
760
+ - (<tt>Object</tt>) <strong>pos_id</strong> <span class="extras">(readonly)</span>
761
+
762
+
763
+
764
+ </p><div class="docstring">
765
+ <div class="discussion">
766
+ <p>
767
+ Returns the value of attribute pos_id
768
+ </p>
769
+
770
+
771
+ </div>
772
+ </div>
773
+ <div class="tags">
774
+
775
+ </div><table class="source_code">
776
+ <tr>
777
+ <td>
778
+ <pre class="lines">
779
+
780
+
781
+ 5
782
+ 6
783
+ 7</pre>
784
+ </td>
785
+ <td>
786
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
787
+
788
+ <span class='def def kw'>def</span> <span class='pos_id identifier id'>pos_id</span>
789
+ <span class='@pos_id ivar id'>@pos_id</span>
790
+ <span class='end end kw'>end</span>
791
+ </pre>
792
+ </td>
793
+ </tr>
794
+ </table>
795
+ </div>
796
+
797
+
798
+ <span id=""></span>
799
+ <span id="type-instance_method"></span>
800
+ <div class="method_details ">
801
+ <p class="signature " id="type-instance_method">
802
+
803
+ - (<tt>Object</tt>) <strong>type</strong> <span class="extras">(readonly)</span>
804
+
805
+
806
+
807
+ </p><div class="docstring">
808
+ <div class="discussion">
809
+ <p>
810
+ Returns the value of attribute type
811
+ </p>
812
+
813
+
814
+ </div>
815
+ </div>
816
+ <div class="tags">
817
+
818
+ </div><table class="source_code">
819
+ <tr>
820
+ <td>
821
+ <pre class="lines">
822
+
823
+
824
+ 5
825
+ 6
826
+ 7</pre>
827
+ </td>
828
+ <td>
829
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 5</span>
830
+
831
+ <span class='def def kw'>def</span> <span class='type identifier id'>type</span>
832
+ <span class='@type ivar id'>@type</span>
833
+ <span class='end end kw'>end</span>
834
+ </pre>
835
+ </td>
836
+ </tr>
837
+ </table>
838
+ </div>
839
+
840
+ </div>
841
+
842
+
843
+ <div id="instance_method_details" class="method_details_list">
844
+ <h2>Instance Method Details</h2>
845
+
846
+
847
+ <div class="method_details first">
848
+ <p class="signature first" id="cancel-instance_method">
849
+
850
+ - (<tt>Object</tt>) <strong>cancel</strong>(session_id)
851
+
852
+
853
+
854
+ </p><table class="source_code">
855
+ <tr>
856
+ <td>
857
+ <pre class="lines">
858
+
859
+
860
+ 69
861
+ 70
862
+ 71</pre>
863
+ </td>
864
+ <td>
865
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 69</span>
866
+
867
+ <span class='def def kw'>def</span> <span class='cancel identifier id'>cancel</span><span class='lparen token'>(</span><span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
868
+ <span class='send_request identifier id'>send_request</span><span class='lparen token'>(</span><span class='symbol val'>:cancel</span><span class='comma token'>,</span> <span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
869
+ <span class='end end kw'>end</span>
870
+ </pre>
871
+ </td>
872
+ </tr>
873
+ </table>
874
+ </div>
875
+
876
+ <div class="method_details ">
877
+ <p class="signature " id="confirm-instance_method">
878
+
879
+ - (<tt>Object</tt>) <strong>confirm</strong>(session_id)
880
+
881
+
882
+
883
+ </p><table class="source_code">
884
+ <tr>
885
+ <td>
886
+ <pre class="lines">
887
+
888
+
889
+ 65
890
+ 66
891
+ 67</pre>
892
+ </td>
893
+ <td>
894
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 65</span>
895
+
896
+ <span class='def def kw'>def</span> <span class='confirm identifier id'>confirm</span><span class='lparen token'>(</span><span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
897
+ <span class='send_request identifier id'>send_request</span><span class='lparen token'>(</span><span class='symbol val'>:confirm</span><span class='comma token'>,</span> <span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
898
+ <span class='end end kw'>end</span>
899
+ </pre>
900
+ </td>
901
+ </tr>
902
+ </table>
903
+ </div>
904
+
905
+ <div class="method_details ">
906
+ <p class="signature " id="encrypt-instance_method">
907
+
908
+ - (<tt>Object</tt>) <strong>encrypt</strong>(*params)
909
+
910
+
911
+
912
+ </p><table class="source_code">
913
+ <tr>
914
+ <td>
915
+ <pre class="lines">
916
+
917
+
918
+ 47
919
+ 48
920
+ 49</pre>
921
+ </td>
922
+ <td>
923
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 47</span>
924
+
925
+ <span class='def def kw'>def</span> <span class='encrypt identifier id'>encrypt</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='params identifier id'>params</span><span class='rparen token'>)</span>
926
+ <span class='Digest constant id'>Digest</span><span class='colon2 op'>::</span><span class='MD5 constant id'>MD5</span><span class='dot token'>.</span><span class='hexdigest identifier id'>hexdigest</span><span class='lparen token'>(</span><span class='params identifier id'>params</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='rparen token'>)</span>
927
+ <span class='end end kw'>end</span>
928
+ </pre>
929
+ </td>
930
+ </tr>
931
+ </table>
932
+ </div>
933
+
934
+ <div class="method_details ">
935
+ <p class="signature " id="get-instance_method">
936
+
937
+ - (<tt>Object</tt>) <strong>get</strong>(session_id)
938
+
939
+
940
+
941
+ </p><table class="source_code">
942
+ <tr>
943
+ <td>
944
+ <pre class="lines">
945
+
946
+
947
+ 61
948
+ 62
949
+ 63</pre>
950
+ </td>
951
+ <td>
952
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 61</span>
953
+
954
+ <span class='def def kw'>def</span> <span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
955
+ <span class='send_request identifier id'>send_request</span><span class='lparen token'>(</span><span class='symbol val'>:get</span><span class='comma token'>,</span> <span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
956
+ <span class='end end kw'>end</span>
957
+ </pre>
958
+ </td>
959
+ </tr>
960
+ </table>
961
+ </div>
962
+
963
+ <div class="method_details ">
964
+ <p class="signature " id="new_transaction-instance_method">
965
+
966
+ - (<tt>Object</tt>) <strong>new_transaction</strong>(options = {})
967
+
968
+
969
+
970
+ </p><table class="source_code">
971
+ <tr>
972
+ <td>
973
+ <pre class="lines">
974
+
975
+
976
+ 18
977
+ 19
978
+ 20
979
+ 21
980
+ 22
981
+ 23
982
+ 24
983
+ 25
984
+ 26</pre>
985
+ </td>
986
+ <td>
987
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 18</span>
988
+
989
+ <span class='def def kw'>def</span> <span class='new_transaction identifier id'>new_transaction</span><span class='lparen token'>(</span><span class='options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
990
+ <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='stringify_keys! fid id'>stringify_keys!</span>
991
+
992
+ <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:pos_id</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='@pos_id ivar id'>@pos_id</span>
993
+ <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:pos_auth_key</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='@pos_auth_key ivar id'>@pos_auth_key</span>
994
+ <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:session_id</span><span class='rbrack token'>]</span> <span class='opasgn op'>||=</span> <span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='mult op'>*</span> <span class='integer val'>100</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span>
995
+
996
+ <span class='Transaction constant id'>Transaction</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
997
+ <span class='end end kw'>end</span>
998
+ </pre>
999
+ </td>
1000
+ </tr>
1001
+ </table>
1002
+ </div>
1003
+
1004
+ <div class="method_details ">
1005
+ <p class="signature " id="new_transaction_url-instance_method">
1006
+
1007
+ - (<tt>Object</tt>) <strong>new_transaction_url</strong>
1008
+
1009
+
1010
+
1011
+ </p><table class="source_code">
1012
+ <tr>
1013
+ <td>
1014
+ <pre class="lines">
1015
+
1016
+
1017
+ 28
1018
+ 29
1019
+ 30
1020
+ 31
1021
+ 32
1022
+ 33
1023
+ 34
1024
+ 35
1025
+ 36</pre>
1026
+ </td>
1027
+ <td>
1028
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 28</span>
1029
+
1030
+ <span class='def def kw'>def</span> <span class='new_transaction_url identifier id'>new_transaction_url</span>
1031
+ <span class='if if kw'>if</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='string val'>'express_gateway'</span>
1032
+ <span class='return return kw'>return</span> <span class='dstring node'>&quot;https://www.platnosci.pl/paygw/#{@encoding}/NewPayment&quot;</span>
1033
+ <span class='elsif elsif kw'>elsif</span> <span class='@type ivar id'>@type</span> <span class='eq op'>==</span> <span class='string val'>'sms_premium'</span>
1034
+ <span class='return return kw'>return</span> <span class='dstring node'>&quot;https://www.platnosci.pl/paygw/#{@encoding}/NewSMS&quot;</span>
1035
+ <span class='else else kw'>else</span>
1036
+ <span class='return return kw'>return</span> <span class='nil nil kw'>nil</span>
1037
+ <span class='end end kw'>end</span>
1038
+ <span class='end end kw'>end</span>
1039
+ </pre>
1040
+ </td>
1041
+ </tr>
1042
+ </table>
1043
+ </div>
1044
+
1045
+ <div class="method_details ">
1046
+ <p class="signature " id="parse_response_body-instance_method">
1047
+
1048
+ - (<tt>Object</tt>) <strong>parse_response_body</strong>(body)
1049
+
1050
+
1051
+
1052
+ </p><table class="source_code">
1053
+ <tr>
1054
+ <td>
1055
+ <pre class="lines">
1056
+
1057
+
1058
+ 108
1059
+ 109
1060
+ 110
1061
+ 111
1062
+ 112
1063
+ 113</pre>
1064
+ </td>
1065
+ <td>
1066
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 108</span>
1067
+
1068
+ <span class='def def kw'>def</span> <span class='parse_response_body identifier id'>parse_response_body</span><span class='lparen token'>(</span><span class='body identifier id'>body</span><span class='rparen token'>)</span>
1069
+ <span class='body identifier id'>body</span><span class='dot token'>.</span><span class='gsub! fid id'>gsub!</span><span class='lparen token'>(</span><span class='string val'>&quot;\r&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;&quot;</span><span class='rparen token'>)</span>
1070
+ <span class='pattern identifier id'>pattern</span> <span class='assign token'>=</span> <span class='regexp val'>/^(\w+):(?:[ ])?(.*)$/</span>
1071
+ <span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='body identifier id'>body</span><span class='dot token'>.</span><span class='scan identifier id'>scan</span><span class='lparen token'>(</span><span class='pattern identifier id'>pattern</span><span class='rparen token'>)</span>
1072
+ <span class='OpenStruct constant id'>OpenStruct</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='rparen token'>)</span>
1073
+ <span class='end end kw'>end</span>
1074
+ </pre>
1075
+ </td>
1076
+ </tr>
1077
+ </table>
1078
+ </div>
1079
+
1080
+ <div class="method_details ">
1081
+ <p class="signature " id="path_for-instance_method">
1082
+
1083
+ - (<tt>Object</tt>) <strong>path_for</strong>(method)
1084
+
1085
+
1086
+
1087
+ </p><table class="source_code">
1088
+ <tr>
1089
+ <td>
1090
+ <pre class="lines">
1091
+
1092
+
1093
+ 38
1094
+ 39
1095
+ 40
1096
+ 41
1097
+ 42
1098
+ 43
1099
+ 44
1100
+ 45</pre>
1101
+ </td>
1102
+ <td>
1103
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 38</span>
1104
+
1105
+ <span class='def def kw'>def</span> <span class='path_for identifier id'>path_for</span><span class='lparen token'>(</span><span class='method identifier id'>method</span><span class='rparen token'>)</span>
1106
+ <span class='case case kw'>case</span> <span class='method identifier id'>method</span>
1107
+ <span class='when when kw'>when</span> <span class='symbol val'>:get</span> <span class='then then kw'>then</span> <span class='dstring node'>&quot;/paygw/#{@encoding}/Payment/get/txt&quot;</span>
1108
+ <span class='when when kw'>when</span> <span class='symbol val'>:confirm</span> <span class='then then kw'>then</span> <span class='dstring node'>&quot;/paygw/#{@encoding}/Payment/confirm/txt&quot;</span>
1109
+ <span class='when when kw'>when</span> <span class='symbol val'>:cancel</span> <span class='then then kw'>then</span> <span class='dstring node'>&quot;/paygw/#{@encoding}/Payment/cancel/txt&quot;</span>
1110
+ <span class='else else kw'>else</span> <span class='nil nil kw'>nil</span>
1111
+ <span class='end end kw'>end</span>
1112
+ <span class='end end kw'>end</span>
1113
+ </pre>
1114
+ </td>
1115
+ </tr>
1116
+ </table>
1117
+ </div>
1118
+
1119
+ <div class="method_details ">
1120
+ <p class="signature " id="prepare_data-instance_method">
1121
+
1122
+ - (<tt>Object</tt>) <strong>prepare_data</strong>(session_id)
1123
+
1124
+
1125
+
1126
+ </p><table class="source_code">
1127
+ <tr>
1128
+ <td>
1129
+ <pre class="lines">
1130
+
1131
+
1132
+ 96
1133
+ 97
1134
+ 98
1135
+ 99
1136
+ 100
1137
+ 101
1138
+ 102
1139
+ 103
1140
+ 104
1141
+ 105
1142
+ 106</pre>
1143
+ </td>
1144
+ <td>
1145
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 96</span>
1146
+
1147
+ <span class='def def kw'>def</span> <span class='prepare_data identifier id'>prepare_data</span><span class='lparen token'>(</span><span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
1148
+ <span class='ts identifier id'>ts</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='dot token'>.</span><span class='to_f identifier id'>to_f</span> <span class='mult op'>*</span> <span class='integer val'>1000</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span>
1149
+ <span class='sig identifier id'>sig</span> <span class='assign token'>=</span> <span class='encrypt identifier id'>encrypt</span><span class='lparen token'>(</span><span class='@pos_id ivar id'>@pos_id</span><span class='comma token'>,</span> <span class='session_id identifier id'>session_id</span><span class='comma token'>,</span> <span class='ts identifier id'>ts</span><span class='comma token'>,</span> <span class='@key1 ivar id'>@key1</span><span class='rparen token'>)</span>
1150
+
1151
+ <span class='lbrace token'>{</span>
1152
+ <span class='string val'>'pos_id'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='@pos_id ivar id'>@pos_id</span><span class='comma token'>,</span>
1153
+ <span class='string val'>'session_id'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='session_id identifier id'>session_id</span><span class='comma token'>,</span>
1154
+ <span class='string val'>'ts'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='ts identifier id'>ts</span><span class='comma token'>,</span>
1155
+ <span class='string val'>'sig'</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='sig identifier id'>sig</span>
1156
+ <span class='rbrace token'>}</span>
1157
+ <span class='end end kw'>end</span>
1158
+ </pre>
1159
+ </td>
1160
+ </tr>
1161
+ </table>
1162
+ </div>
1163
+
1164
+ <div class="method_details ">
1165
+ <p class="signature " id="send_request-instance_method">
1166
+
1167
+ - (<tt>Object</tt>) <strong>send_request</strong>(method, session_id)
1168
+
1169
+
1170
+
1171
+ </p><table class="source_code">
1172
+ <tr>
1173
+ <td>
1174
+ <pre class="lines">
1175
+
1176
+
1177
+ 73
1178
+ 74
1179
+ 75
1180
+ 76
1181
+ 77
1182
+ 78
1183
+ 79
1184
+ 80
1185
+ 81
1186
+ 82
1187
+ 83
1188
+ 84
1189
+ 85
1190
+ 86
1191
+ 87
1192
+ 88
1193
+ 89
1194
+ 90
1195
+ 91
1196
+ 92
1197
+ 93
1198
+ 94</pre>
1199
+ </td>
1200
+ <td>
1201
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 73</span>
1202
+
1203
+ <span class='def def kw'>def</span> <span class='send_request identifier id'>send_request</span><span class='lparen token'>(</span><span class='method identifier id'>method</span><span class='comma token'>,</span> <span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
1204
+ <span class='url identifier id'>url</span> <span class='assign token'>=</span> <span class='path_for identifier id'>path_for</span><span class='lparen token'>(</span><span class='method identifier id'>method</span><span class='rparen token'>)</span>
1205
+ <span class='data identifier id'>data</span> <span class='assign token'>=</span> <span class='prepare_data identifier id'>prepare_data</span><span class='lparen token'>(</span><span class='session_id identifier id'>session_id</span><span class='rparen token'>)</span>
1206
+ <span class='connection identifier id'>connection</span> <span class='assign token'>=</span> <span class='Net constant id'>Net</span><span class='colon2 op'>::</span><span class='HTTP constant id'>HTTP</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>'www.platnosci.pl'</span><span class='comma token'>,</span> <span class='integer val'>443</span><span class='rparen token'>)</span>
1207
+ <span class='connection identifier id'>connection</span><span class='dot token'>.</span><span class='use_ssl identifier id'>use_ssl</span> <span class='assign token'>=</span> <span class='true true kw'>true</span>
1208
+
1209
+ <span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='connection identifier id'>connection</span><span class='dot token'>.</span><span class='start identifier id'>start</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='http identifier id'>http</span><span class='bitor op'>|</span>
1210
+ <span class='post identifier id'>post</span> <span class='assign token'>=</span> <span class='Net constant id'>Net</span><span class='colon2 op'>::</span><span class='HTTP constant id'>HTTP</span><span class='colon2 op'>::</span><span class='Post constant id'>Post</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='rparen token'>)</span>
1211
+ <span class='post identifier id'>post</span><span class='dot token'>.</span><span class='set_form_data identifier id'>set_form_data</span><span class='lparen token'>(</span><span class='data identifier id'>data</span><span class='dot token'>.</span><span class='stringify_keys identifier id'>stringify_keys</span><span class='rparen token'>)</span>
1212
+ <span class='http identifier id'>http</span><span class='dot token'>.</span><span class='request identifier id'>request</span><span class='lparen token'>(</span><span class='post identifier id'>post</span><span class='rparen token'>)</span>
1213
+ <span class='end end kw'>end</span>
1214
+
1215
+ <span class='if if kw'>if</span> <span class='response identifier id'>response</span><span class='dot token'>.</span><span class='code identifier id'>code</span> <span class='eq op'>==</span> <span class='string val'>'200'</span>
1216
+ <span class='t identifier id'>t</span> <span class='assign token'>=</span> <span class='parse_response_body identifier id'>parse_response_body</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='dot token'>.</span><span class='body identifier id'>body</span><span class='rparen token'>)</span>
1217
+ <span class='if if kw'>if</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='status identifier id'>status</span> <span class='eq op'>==</span> <span class='string val'>'OK'</span>
1218
+ <span class='raise identifier id'>raise</span> <span class='SignatureInvalid constant id'>SignatureInvalid</span> <span class='unless unless_mod kw'>unless</span> <span class='verify identifier id'>verify</span><span class='lparen token'>(</span><span class='t identifier id'>t</span><span class='rparen token'>)</span>
1219
+ <span class='end end kw'>end</span>
1220
+ <span class='return return kw'>return</span> <span class='lbrack token'>[</span><span class='t identifier id'>t</span><span class='dot token'>.</span><span class='status identifier id'>status</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='rbrack token'>]</span>
1221
+ <span class='else else kw'>else</span>
1222
+ <span class='raise identifier id'>raise</span> <span class='RequestFailed constant id'>RequestFailed</span>
1223
+ <span class='end end kw'>end</span>
1224
+ <span class='end end kw'>end</span>
1225
+ </pre>
1226
+ </td>
1227
+ </tr>
1228
+ </table>
1229
+ </div>
1230
+
1231
+ <div class="method_details ">
1232
+ <p class="signature " id="verify-instance_method">
1233
+
1234
+ - (<tt>Object</tt>) <strong>verify</strong>(t)
1235
+
1236
+
1237
+
1238
+ </p><table class="source_code">
1239
+ <tr>
1240
+ <td>
1241
+ <pre class="lines">
1242
+
1243
+
1244
+ 51
1245
+ 52
1246
+ 53
1247
+ 54
1248
+ 55
1249
+ 56
1250
+ 57
1251
+ 58
1252
+ 59</pre>
1253
+ </td>
1254
+ <td>
1255
+ <pre class="code"><span class="info file"># File 'lib/payments/pos.rb', line 51</span>
1256
+
1257
+ <span class='def def kw'>def</span> <span class='verify identifier id'>verify</span><span class='lparen token'>(</span><span class='t identifier id'>t</span><span class='rparen token'>)</span>
1258
+ <span class='sig identifier id'>sig</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span>
1259
+ <span class='if if kw'>if</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_status identifier id'>trans_status</span>
1260
+ <span class='sig identifier id'>sig</span> <span class='assign token'>=</span> <span class='encrypt identifier id'>encrypt</span><span class='lparen token'>(</span><span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_pos_id identifier id'>trans_pos_id</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_session_id identifier id'>trans_session_id</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_order_id identifier id'>trans_order_id</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_status identifier id'>trans_status</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_amount identifier id'>trans_amount</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_desc identifier id'>trans_desc</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_ts identifier id'>trans_ts</span><span class='comma token'>,</span> <span class='@key2 ivar id'>@key2</span><span class='rparen token'>)</span>
1261
+ <span class='else else kw'>else</span>
1262
+ <span class='sig identifier id'>sig</span> <span class='assign token'>=</span> <span class='encrypt identifier id'>encrypt</span><span class='lparen token'>(</span><span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_pos_id identifier id'>trans_pos_id</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_session_id identifier id'>trans_session_id</span><span class='comma token'>,</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_ts identifier id'>trans_ts</span><span class='comma token'>,</span> <span class='@key2 ivar id'>@key2</span><span class='rparen token'>)</span>
1263
+ <span class='end end kw'>end</span>
1264
+ <span class='return return kw'>return</span> <span class='sig identifier id'>sig</span> <span class='eq op'>==</span> <span class='t identifier id'>t</span><span class='dot token'>.</span><span class='trans_sig identifier id'>trans_sig</span>
1265
+ <span class='end end kw'>end</span>
1266
+ </pre>
1267
+ </td>
1268
+ </tr>
1269
+ </table>
1270
+ </div>
1271
+
1272
+ </div>
1273
+
1274
+ </div>
1275
+
1276
+ <div id="footer">
1277
+ Generated on Tue Aug 17 16:13:28 2010 by
1278
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
1279
+ 0.5.8 (ruby-1.8.7).
1280
+ </div>
1281
+
1282
+ </body>
1283
+ </html>