src/Integracao/ControlPay/API/PedidoApi.php 1 location
|
@@ 35-41 (lines=7) @@
|
| 32 |
|
{ |
| 33 |
|
try{ |
| 34 |
|
|
| 35 |
|
foreach ($inserirRequest->getProdutosPedido() as $key => $produto) |
| 36 |
|
{ |
| 37 |
|
if(empty($produto->getId())) |
| 38 |
|
$inserirRequest->getProdutosPedido()[$key]->setId( |
| 39 |
|
$this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID) |
| 40 |
|
); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
$this->response = $this->_httpClient->post(__FUNCTION__,[ |
| 44 |
|
'body' => json_encode($inserirRequest), |
src/Integracao/ControlPay/API/VendaApi.php 1 location
|
@@ 64-70 (lines=7) @@
|
| 61 |
|
) |
| 62 |
|
); |
| 63 |
|
|
| 64 |
|
foreach ($venderRequest->getProdutosVendidos() as $key => $produto) |
| 65 |
|
{ |
| 66 |
|
if(empty($produto->getId())) |
| 67 |
|
$venderRequest->getProdutosVendidos()[$key]->setId( |
| 68 |
|
$this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID) |
| 69 |
|
); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
$this->response = $this->_httpClient->post(__FUNCTION__,[ |
| 73 |
|
'body' => json_encode($venderRequest), |