forked from ondrakoupil/csob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass-OndraKoupil.Csob.Config.html
661 lines (489 loc) · 16.6 KB
/
class-OndraKoupil.Csob.Config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class OndraKoupil\Csob\Config | ČSOB payment gate PHP client</title>
<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">
</head>
<body>
<div id="left">
<div id="menu">
<a href="index.html" title="Overview"><span>Overview</span></a>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li class="active">
<a href="namespace-OndraKoupil.html">
OndraKoupil<span></span>
</a>
<ul>
<li class="active main">
<a href="namespace-OndraKoupil.Csob.html">
Csob<span></span>
</a>
<ul>
<li class="main">
<a href="namespace-OndraKoupil.Csob.Extensions.html">
Extensions<span></span>
</a>
<ul>
<li class="main">
<a href="namespace-OndraKoupil.Csob.Extensions.EET.html">
EET </a>
</li>
</ul></li></ul></li></ul></li>
</ul>
</div>
<hr>
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-OndraKoupil.Csob.Client.html">Client</a></li>
<li class="active"><a href="class-OndraKoupil.Csob.Config.html">Config</a></li>
<li><a href="class-OndraKoupil.Csob.Crypto.html">Crypto</a></li>
<li><a href="class-OndraKoupil.Csob.Extension.html">Extension</a></li>
<li><a href="class-OndraKoupil.Csob.GatewayUrl.html">GatewayUrl</a></li>
<li><a href="class-OndraKoupil.Csob.Payment.html">Payment</a></li>
</ul>
<h3>Exceptions</h3>
<ul>
<li><a href="class-OndraKoupil.Csob.CryptoException.html">CryptoException</a></li>
<li><a href="class-OndraKoupil.Csob.Exception.html">Exception</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<form id="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="text" placeholder="Search">
</form>
<div id="navigation">
<ul>
<li>
<a href="index.html" title="Overview"><span>Overview</span></a>
</li>
<li>
<a href="namespace-OndraKoupil.Csob.html" title="Summary of OndraKoupil\Csob"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
<ul>
</ul>
<ul>
</ul>
</div>
<div id="content" class="class">
<h1>Class Config</h1>
<div class="description">
<p>Configuration for integrating your app to bank gateway.</p>
</div>
<div class="info">
<b>Namespace:</b> <a href="namespace-OndraKoupil.html">OndraKoupil</a>\<a href="namespace-OndraKoupil.Csob.html">Csob</a><br>
<b>Located at</b> <a href="source-class-OndraKoupil.Csob.Config.html#5-209" title="Go to source code">Config.php</a>
<br>
</div>
<table class="summary methods" id="methods">
<caption>Methods summary</caption>
<tr data-order="__construct" id="___construct">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#___construct">#</a>
<code><a href="source-class-OndraKoupil.Csob.Config.html#119-165" title="Go to source code">__construct</a>( <span>string <var>$merchantId</var></span>, <span>string <var>$privateKeyFile</var></span>, <span>string <var>$bankPublicKeyFile</var></span>, <span>string <var>$shopName</var></span>, <span>string|null <var>$returnUrl</var> = <span class="php-keyword1">null</span></span>, <span>string|null <var>$bankApiUrl</var> = <span class="php-keyword1">null</span></span>, <span>string|null <var>$privateKeyPassword</var> = <span class="php-keyword1">null</span></span>, <span>string|null <var>$sslCertificatePath</var> = <span class="php-keyword1">null</span></span>, <span>string|null <var>$apiVersion</var> = <span class="php-keyword1">null</span></span>, <span>integer|null <var>$hashMethod</var> = <span class="php-keyword1">null</span> </span> )</code>
<div class="description short">
<p>Create config with all mandatory values.</p>
</div>
<div class="description detailed hidden">
<p>Create config with all mandatory values.</p>
<p>See equally named properties of this class for more info.</p>
<p>To specify $bankApiUrl, you can use constants of GatewayUrl class.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$merchantId</var></dt>
<dd></dd>
<dt><var>$privateKeyFile</var></dt>
<dd></dd>
<dt><var>$bankPublicKeyFile</var></dt>
<dd></dd>
<dt><var>$shopName</var></dt>
<dd></dd>
<dt><var>$returnUrl</var></dt>
<dd></dd>
<dt><var>$bankApiUrl</var></dt>
<dd></dd>
<dt><var>$privateKeyPassword</var></dt>
<dd></dd>
<dt><var>$sslCertificatePath</var></dt>
<dd></dd>
<dt><var>$apiVersion</var></dt>
<dd>Leave null to autodetect from $bankApiUrl</dd>
<dt><var>$hashMethod</var></dt>
<dd>One of OPENSSL_HASH_* constants, leave null for auto detection from given $bankApiUrl. Read via getHashMethod();</dd>
</dl></div>
</div>
</div></td>
</tr>
<tr data-order="getVersion" id="_getVersion">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getVersion">#</a>
<code><a href="source-class-OndraKoupil.Csob.Config.html#167-180" title="Go to source code">getVersion</a>( )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="getHashMethod" id="_getHashMethod">
<td class="attributes"><code>
public
integer
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_getHashMethod">#</a>
<code><a href="source-class-OndraKoupil.Csob.Config.html#182-196" title="Go to source code">getHashMethod</a>( )</code>
<div class="description short">
<p>Return the set hashing method or deduce it from bank API's version.</p>
</div>
<div class="description detailed hidden">
<p>Return the set hashing method or deduce it from bank API's version.</p>
<h4>Returns</h4>
<div class="list">
integer
</div>
</div>
</div></td>
</tr>
<tr data-order="queryApiVersion" id="_queryApiVersion">
<td class="attributes"><code>
public
boolean
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_queryApiVersion">#</a>
<code><a href="source-class-OndraKoupil.Csob.Config.html#198-207" title="Go to source code">queryApiVersion</a>( <span>string <var>$version</var></span> )</code>
<div class="description short">
<p>Returns true if currently set API version is at least $version or greater.</p>
</div>
<div class="description detailed hidden">
<p>Returns true if currently set API version is at least $version or greater.</p>
<h4>Parameters</h4>
<div class="list"><dl>
<dt><var>$version</var></dt>
<dd></dd>
</dl></div>
<h4>Returns</h4>
<div class="list">
boolean
</div>
</div>
</div></td>
</tr>
</table>
<table class="summary properties" id="properties">
<caption>Properties summary</caption>
<tr data-order="url" id="$url">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#10-18" title="Go to source code"><var>$url</var></a>
<div class="description short">
<p>Bank API path. By default, this is the testing (playground) API.
Change that when you are ready to go to live environment.</p>
</div>
<div class="description detailed hidden">
<p>Bank API path. By default, this is the testing (playground) API.
Change that when you are ready to go to live environment.</p>
<h4>See</h4>
<div class="list">
<code><a href="class-OndraKoupil.Csob.GatewayUrl.html">OndraKoupil\Csob\GatewayUrl</a></code><br>
</div>
</div>
</td>
<td class="value">
<div>
<a href="#$url" class="anchor">#</a>
<code>GatewayUrl::TEST_LATEST</code>
</div>
</td>
</tr>
<tr data-order="apiVersion" id="$apiVersion">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#20-26" title="Go to source code"><var>$apiVersion</var></a>
<div class="description short">
<p>API Version. Version 1.8 brings some BC breaks, so the library needs to know which version you want to call.
Use this property to explicitly specify API version. Leave null to autodetect from endpoint URL.</p>
</div>
<div class="description detailed hidden">
<p>API Version. Version 1.8 brings some BC breaks, so the library needs to know which version you want to call.
Use this property to explicitly specify API version. Leave null to autodetect from endpoint URL.</p>
</div>
</td>
<td class="value">
<div>
<a href="#$apiVersion" class="anchor">#</a>
<code><span class="php-keyword1">null</span></code>
</div>
</td>
</tr>
<tr data-order="hashMethod" id="$hashMethod">
<td class="attributes"><code>
public
integer|null
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#28-31" title="Go to source code"><var>$hashMethod</var></a>
<div class="description short">
<p>One of OPENSSL_HASH_* constants or null for auto detection</p>
</div>
<div class="description detailed hidden">
<p>One of OPENSSL_HASH_* constants or null for auto detection</p>
</div>
</td>
<td class="value">
<div>
<a href="#$hashMethod" class="anchor">#</a>
<code><span class="php-keyword1">null</span></code>
</div>
</td>
</tr>
<tr data-order="bankPublicKeyFile" id="$bankPublicKeyFile">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#33-42" title="Go to source code"><var>$bankPublicKeyFile</var></a>
<div class="description short">
<p>Path to file where bank's public key is saved.</p>
</div>
<div class="description detailed hidden">
<p>Path to file where bank's public key is saved.</p>
<p>You can obtain the key from bank's app
https://iposman.iplatebnibrana.csob.cz/posmerchant
or from their package on GitHub)</p>
</div>
</td>
<td class="value">
<div>
<a href="#$bankPublicKeyFile" class="anchor">#</a>
<code><span class="php-quote">""</span></code>
</div>
</td>
</tr>
<tr data-order="merchantId" id="$merchantId">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#44-51" title="Go to source code"><var>$merchantId</var></a>
<div class="description short">
<p>Your Merchant ID.</p>
</div>
<div class="description detailed hidden">
<p>Your Merchant ID.</p>
<p>You obtain that from the bank or from https://iplatebnibrana.csob.cz/keygen/</p>
</div>
</td>
<td class="value">
<div>
<a href="#$merchantId" class="anchor">#</a>
<code><span class="php-quote">""</span></code>
</div>
</td>
</tr>
<tr data-order="privateKeyFile" id="$privateKeyFile">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#53-62" title="Go to source code"><var>$privateKeyFile</var></a>
<div class="description short">
<p>Path to file where your private key is saved.</p>
</div>
<div class="description detailed hidden">
<p>Path to file where your private key is saved.</p>
<p>You obtain that key from https://iplatebnibrana.csob.cz/keygen/ - it is
the .key file you download from the keygen.</p>
<p>Careful - that file MUST NOT BE publicly accessible on webserver!</p>
</div>
</td>
<td class="value">
<div>
<a href="#$privateKeyFile" class="anchor">#</a>
<code><span class="php-quote">""</span></code>
</div>
</td>
</tr>
<tr data-order="privateKeyPassword" id="$privateKeyPassword">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#64-71" title="Go to source code"><var>$privateKeyPassword</var></a>
<div class="description short">
<p>Password for your private key.</p>
</div>
<div class="description detailed hidden">
<p>Password for your private key.</p>
<p>You need to specify this only if your private key was not generated
using bank's keygen https://iplatebnibrana.csob.cz/keygen/</p>
</div>
</td>
<td class="value">
<div>
<a href="#$privateKeyPassword" class="anchor">#</a>
<code><span class="php-keyword1">null</span></code>
</div>
</td>
</tr>
<tr data-order="returnUrl" id="$returnUrl">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#73-78" title="Go to source code"><var>$returnUrl</var></a>
<div class="description short">
<p>A URL of your e-shop to return your customers after the have paid.</p>
</div>
<div class="description detailed hidden">
<p>A URL of your e-shop to return your customers after the have paid.</p>
</div>
</td>
<td class="value">
<div>
<a href="#$returnUrl" class="anchor">#</a>
<code></code>
</div>
</td>
</tr>
<tr data-order="returnMethod" id="$returnMethod">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#80-88" title="Go to source code"><var>$returnMethod</var></a>
<div class="description short">
<p>A method to return customers on $returnUrl.</p>
</div>
<div class="description detailed hidden">
<p>A method to return customers on $returnUrl.</p>
<p>Right now (api v1) it is not much significant, since (according to their doc)
you must support both GET and POST methods.</p>
</div>
</td>
<td class="value">
<div>
<a href="#$returnMethod" class="anchor">#</a>
<code><span class="php-quote">"POST"</span></code>
</div>
</td>
</tr>
<tr data-order="shopName" id="$shopName">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#91-97" title="Go to source code"><var>$shopName</var></a>
<div class="description short">
<p>Name of your e-shop or app - it will be used on some points of
creating payments.</p>
</div>
<div class="description detailed hidden">
<p>Name of your e-shop or app - it will be used on some points of
creating payments.</p>
</div>
</td>
<td class="value">
<div>
<a href="#$shopName" class="anchor">#</a>
<code></code>
</div>
</td>
</tr>
<tr data-order="closePayment" id="$closePayment">
<td class="attributes"><code>
public
boolean
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#99-105" title="Go to source code"><var>$closePayment</var></a>
<div class="description short">
<p>Should payments be created with closePayment = true by default?
See Wiki on ČSOB's github for more information.</p>
</div>
<div class="description detailed hidden">
<p>Should payments be created with closePayment = true by default?
See Wiki on ČSOB's github for more information.</p>
</div>
</td>
<td class="value">
<div>
<a href="#$closePayment" class="anchor">#</a>
<code><span class="php-keyword1">true</span></code>
</div>
</td>
</tr>
<tr data-order="sslCertificatePath" id="$sslCertificatePath">
<td class="attributes"><code>
public
string
</code></td>
<td class="name">
<a href="source-class-OndraKoupil.Csob.Config.html#107-117" title="Go to source code"><var>$sslCertificatePath</var></a>
<div class="description short">
<p>Path to a CA certificate chain or a directory containing certificates to verify
bank's certificate when initiating a HTTPS connection.</p>
</div>
<div class="description detailed hidden">
<p>Path to a CA certificate chain or a directory containing certificates to verify
bank's certificate when initiating a HTTPS connection.</p>
<p>Leave null to disable certificate validation.</p>
<h4>See</h4>
<div class="list">
CURLOPT_SSL_VERIFYPEER, CURLOPT_CAINFO, CURLOPT_CAPATH<br>
</div>
</div>
</td>
<td class="value">
<div>
<a href="#$sslCertificatePath" class="anchor">#</a>
<code><span class="php-keyword1">null</span></code>
</div>
</td>
</tr>
</table>
</div>
<div id="footer">
ČSOB payment gate PHP client API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
</div>
<script src="resources/combined.js?ad5a898ea233eeea64c8e17f31730d98b30d6afd"></script>
<script src="elementlist.js?c50a1b21d491f7974f91c53b65bb4818dc1ce2b5"></script>
</body>
</html>