Consulta de Transação - 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 |
|---|---|---|
| transactionId | string | Id de uma transação. |
$transaction = $RedePay->transaction()->get("11b4a7d6-eab7-4139-82fd-21714a0e811c");
Resposta
| CAMPO | TIPO | EXEMPLO |
|---|---|---|
| id | string | $transaction->getId() |
| reference | string | $transaction->getReference() |
| status | string | $transaction->getStatus() |
| amount | string | $transaction->getAmount() |
| discount | string | $transaction->getDiscount() |
| creationDate | string | $transaction->getCreationDate() |
| customer | Customer | $transaction->getCustomer() |
| customer.name | string | $transaction->getCustomer()->getName() |
| customer.email | string | $transaction->getCustomer()->getEmail() |
| payment | Payment | $transaction->getPayment() |
| payment.method | string | $transaction->getPayment()->getMethod() |
| payment.cardBrand | string | $transaction->getPayment()->getCardBrand() |
| payment.installments | string | $transaction->getPayment()->getInstallments() |
| shipping | Shipping | $transaction->getShipping() |
| shipping.cost | string | $transaction->getShipping()->getCost() |
| shipping.trackingNumber | string | $transaction->getShipping()->getTrackingNumber() |
| shipping.address | Address | $transaction->getAddress() |
| shipping.address.street | string | $transaction->getAddress()->getStreet() |
| shipping.address.number | string | $transaction->getAddress()->getNumber() |
| shipping.address.complement | string | $transaction->getAddress()->getComplement() |
| shipping.address.zipCode | string | $transaction->getAddress()->getZipCode() |
| shipping.address.district | string | $transaction->getAddress()->getDistrict() |
| shipping.address.city | string | $transaction->getAddress()->getCity() |
| shipping.address.state | string | $transaction->getAddress()->getState() |
| items | Item[] | $transaction->getItems() |
| items.id | string | $transaction->getItems()[0]->getId() |
| items.description | string | $transaction->getItems()[0]->getDescription() |
| items.amount | string | $transaction->getItems()[0]->getAmount() |
| items.quantity | string | $transaction->getItems()[0]->getQuantity() |
| items.freight | string | $transaction->getItems()[0]->getFreight() |
| items.discount | string | $transaction->getItems()[0]->getDiscount() |
| statusHistory | History[] | $transaction->getStatusHistory() |
| statusHistory.status | string | $transaction->getStatusHistory()[0]->getStatus() |
| statusHistory.date | string | $transaction->getStatusHistory()[0]->getDate() |