|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
require 'PagseguroController.php'; |
|
4
|
|
|
|
|
5
|
|
|
class PagamentoController |
|
6
|
|
|
{ |
|
7
|
|
|
|
|
8
|
|
|
private $gateway = ''; |
|
9
|
|
|
|
|
10
|
|
|
public function __construct($gateway) |
|
11
|
|
|
{ |
|
12
|
|
|
$this->gateway = new $gateway(); |
|
|
|
|
|
|
13
|
|
|
} |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* @return void |
|
17
|
|
|
* @param String $token |
|
18
|
|
|
**/ |
|
19
|
|
|
public function setToken($token) |
|
20
|
|
|
{ |
|
21
|
|
|
$this->gateway->setToken($token); |
|
|
|
|
|
|
22
|
|
|
} |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @return void |
|
26
|
|
|
* @param String $email |
|
27
|
|
|
**/ |
|
28
|
|
|
public function setEmail($email) |
|
29
|
|
|
{ |
|
30
|
|
|
$this->gateway->setEmail($email); |
|
|
|
|
|
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @return String $token |
|
35
|
|
|
**/ |
|
36
|
|
|
public function getToken() |
|
37
|
|
|
{ |
|
38
|
|
|
return $this->gateway->getToken(); |
|
|
|
|
|
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @return String $email |
|
43
|
|
|
**/ |
|
44
|
|
|
public function getEmail() |
|
45
|
|
|
{ |
|
46
|
|
|
return $this->gateway->getEmail(); |
|
|
|
|
|
|
47
|
|
|
} |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @return void |
|
51
|
|
|
* @param Array $produtos |
|
|
|
|
|
|
52
|
|
|
**/ |
|
53
|
|
|
public function setProdutos($produto) |
|
54
|
|
|
{ |
|
55
|
|
|
$this->gateway->setProdutos($produto); |
|
|
|
|
|
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @return Array $produto |
|
60
|
|
|
**/ |
|
61
|
|
|
public function getProdutos() |
|
62
|
|
|
{ |
|
63
|
|
|
return $this->gateway->getProdutos(); |
|
|
|
|
|
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
public function adicionarProdutosGateway() |
|
67
|
|
|
{ |
|
68
|
|
|
return $this->gateway->adicionarProdutosGateway(); |
|
|
|
|
|
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function setEndereco($endereco) |
|
72
|
|
|
{ |
|
73
|
|
|
$this->gateway->setEndereco($endereco); |
|
|
|
|
|
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
public function getEndereco() |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->gateway->getEndereco(); |
|
|
|
|
|
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
public function setEnderecoClienteGateway() |
|
82
|
|
|
{ |
|
83
|
|
|
return $this->gateway->setEnderecoClienteGateway(); |
|
|
|
|
|
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
public function setReference($reference) |
|
87
|
|
|
{ |
|
88
|
|
|
$this->gateway->setReference($reference); |
|
|
|
|
|
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
public function getReference() |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->gateway->getReference(); |
|
|
|
|
|
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
public function setValorFrete($valor_frete) |
|
97
|
|
|
{ |
|
98
|
|
|
$this->gateway->setValorFrete($valor_frete); |
|
|
|
|
|
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
public function getValorFrete() |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->gateway->getValorFrete(); |
|
|
|
|
|
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
public function setCliente($cliente) |
|
107
|
|
|
{ |
|
108
|
|
|
$this->gateway->setCliente($cliente); |
|
|
|
|
|
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
public function getCliente() |
|
112
|
|
|
{ |
|
113
|
|
|
return $this->gateway->getCliente(); |
|
|
|
|
|
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
public function setClienteGateway() |
|
117
|
|
|
{ |
|
118
|
|
|
return $this->gateway->setClienteGateway(); |
|
|
|
|
|
|
119
|
|
|
} |
|
120
|
|
|
|
|
121
|
|
|
public function finalizarPedido() |
|
122
|
|
|
{ |
|
123
|
|
|
return $this->gateway->finalizarPedido(); |
|
|
|
|
|
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
} |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..