File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 4
4
5
5
class PagSeguroController
6
6
{
7
+ /** @var \Artistas\PagSeguro\PagSeguroClient */
8
+ private $ pagseguro ;
9
+
10
+ /**
11
+ * Instancia as dependências.
12
+ */
13
+ public function __construct ()
14
+ {
15
+ $ this ->pagseguro = app ('pagseguro ' );
16
+ }
17
+
7
18
/**
8
19
* Gera um token de sessão para realizar transações.
9
20
*
10
21
* @return string
11
22
*/
12
23
public function session ()
13
24
{
14
- return PagSeguroFacade:: startSession ();
25
+ return $ this -> pagseguro -> startSession ();
15
26
}
16
27
17
28
/**
@@ -21,7 +32,7 @@ public function session()
21
32
*/
22
33
public function javascript ()
23
34
{
24
- $ scriptContent = file_get_contents (PagSeguroFacade:: getUrl ()['javascript ' ]);
35
+ $ scriptContent = file_get_contents ($ this -> pagseguro -> getUrl ()['javascript ' ]);
25
36
26
37
return response ()->make ($ scriptContent , '200 ' )
27
38
->header ('Content-Type ' , 'text/javascript ' );
You can’t perform that action at this time.
0 commit comments