Commit 67a4913 1 parent e966da3 commit 67a4913 Copy full SHA for 67a4913
File tree 2 files changed +63
-1
lines changed
2 files changed +63
-1
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ public function loadConfiguration()
44
44
$ config = $ this ->createConfig ();
45
45
46
46
$ classesDefinition = [
47
- 'merchantConfig ' => 'Tp\MerchantConfig ' ,
47
+ 'merchantConfig ' => 'Tp\MerchantConfig ' ,
48
+ 'helper.dataApi ' => 'Trejjam\ThePay\Helper\DataApi ' ,
48
49
];
50
+
49
51
$ factoriesDefinition = [
50
52
'paymentFactory ' => 'Trejjam\ThePay\IPayment ' ,
51
53
'permanentPaymentFactory ' => 'Trejjam\ThePay\IPermanentPayment ' ,
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: jam
5
+ * Date: 24.9.15
6
+ * Time: 11:08
7
+ */
8
+
9
+ namespace Trejjam \ThePay \Helper ;
10
+
11
+ use Nette ,
12
+ App ,
13
+ Trejjam ,
14
+ Tp ;
15
+
16
+ class DataApi
17
+ {
18
+ protected $ config ;
19
+
20
+ function __construct (Tp \MerchantConfig $ config )
21
+ {
22
+ $ this ->config = $ config ;
23
+ }
24
+
25
+ /**
26
+ * @param bool $onlyActive
27
+ * @return Tp\DataApi\GetPaymentMethodsResponse
28
+ */
29
+ public function getPaymentMethods ($ onlyActive = TRUE )
30
+ {
31
+ return Tp \Helper \DataApi::getPaymentMethods ($ this ->config , $ onlyActive );
32
+ }
33
+
34
+ /**
35
+ * @param string $paymentId
36
+ * @return Tp\DataApi\GetPaymentResponse
37
+ */
38
+ public function getPayment ($ paymentId )
39
+ {
40
+ return Tp \Helper \DataApi::getPayment ($ this ->config , $ paymentId );
41
+ }
42
+
43
+ /**
44
+ * @param string $paymentId
45
+ * @return Tp\DataApi\GetPaymentInstructionsResponse
46
+ */
47
+ public function getPaymentInstructions ($ paymentId )
48
+ {
49
+ return Tp \Helper \DataApi::getPaymentInstructions ($ this ->config , $ paymentId );
50
+ }
51
+
52
+ /**
53
+ * @param string $paymentId
54
+ * @return Tp\DataApi\GetPaymentStateResponse
55
+ */
56
+ public function getPaymentState ($ paymentId )
57
+ {
58
+ return Tp \Helper \DataApi::getPaymentState ($ this ->config , $ paymentId );
59
+ }
60
+ }
You can’t perform that action at this time.
0 commit comments