Consulta de Pedido - Marjoel/redepay-sdk-php GitHub Wiki
Clique aqui para ver como importar e integrar a SDK em seu projeto.
Requisição
negrito: obrigatório
| PARÂMETRO | TIPO | DESCRIÇÃO |
|---|---|---|
| orderId | string | Id de um pedido. |
$order = $RedePay->order()->get("22b1a7d3-eab2-4121-81fd-22914a0e811d");
Resposta
| CAMPO | TIPO | EXEMPLO |
|---|---|---|
| id | string | $order->getId() |
| reference | string | $order->getReference() |
| status | string | $order->getStatus() |
| amount | string | $order->getAmount() |
| discount | string | $order->getDiscount() |
| customer | Customer | $order->getCustomer() |
| customer.name | string | $order->getCustomer()->getName() |
| customer.email | string | $order->getCustomer()->getEmail() |
| shipping | Shipping | $order->getShipping() |
| shipping.cost | string | $order->getShipping()->getCost() |
| shipping.address | Address | $order->getAddress() |
| shipping.address.street | string | $order->getAddress()->getStreet() |
| shipping.address.number | string | $order->getAddress()->getNumber() |
| shipping.address.complement | string | $order->getAddress()->getComplement() |
| shipping.address.zipCode | string | $order->getAddress()->getZipCode() |
| shipping.address.district | string | $order->getAddress()->getDistrict() |
| shipping.address.city | string | $order->getAddress()->getCity() |
| shipping.address.state | string | $order->getAddress()->getState() |
| items | Item[] | $order->getItems() |
| items.id | string | $order->getItems()[0]->getId() |
| items.description | string | $order->getItems()[0]->getDescription() |
| items.amount | string | $order->getItems()[0]->getAmount() |
| items.quantity | string | $order->getItems()[0]->getQuantity() |
| items.freight | string | $order->getItems()[0]->getFreight() |
| items.discount | string | $order->getItems()[0]->getDiscount() |
| statusHistory | History[] | $order->getStatusHistory() |
| statusHistory.status | string | $order->getStatusHistory()[0]->getStatus() |
| statusHistory.date | string | $order->getStatusHistory()[0]->getDate() |
| statusHistory.responsible | string | $order->getStatusHistory()[0]->getResponsible() |
| statusHistory.reason | string | $order->getStatusHistory()[0]->getReason() |
| transactionHistory | History[] | $order->getTransactionHistory() |
| transactionHistory.id | string | $order->getTransactionsHistory()[0]->getId() |
| transactionHistory.status | string | $order->getTransactionHistory()[0]->getStatus() |
| transactionHistory.date | string | $order->getTransactionHistory()[0]->getDate() |
| reversalHistory | History[] | $order->getReversalHistory() |
| reversalHistory.value | string | $order->getReversalHistory()[0]->getValue() |
| reversalHistory.date | string | $order->getReversalHistory()[0]->getDate() |