Guid merchantKey = Guid.Parse("00000000-0000-0000-0000-000000000000");
Guid orderKey = Guid.Parse("219d7581-78e2-4aa9-b708-b7c585780bfc");

// Cria o cliente para consultar o pedido no gateway.
IGatewayServiceClient client = new GatewayServiceClient(merchantKey, new Uri("https://sandbox.mundipaggone.com"));

// Consulta o pedido.
var httpResponse = client.Sale.QueryOrder(orderKey);

if (httpResponse.HttpStatusCode == HttpStatusCode.OK) {
    foreach (var sale in httpResponse.Response.SaleDataCollection) {
        Console.WriteLine("Número do pedido: {0}", sale.OrderData.OrderReference);
    }
}
<?php

try
{
    // Carrega dependências
    require_once(dirname(__FILE__) . '/vendor/autoload.php');

    // Define a URL a ser utilizada
    \Gateway\ApiClient::setBaseUrl("https://sandbox.mundipaggone.com");

    // Define a chave de loja a ser utilizada
    \Gateway\ApiClient::setMerchantKey("85328786-8BA6-420F-9948-5352F5A183EB");

    // Create new ApiClient object
    $client = new Gateway\ApiClient();

    // Make the call
    $response = $client->searchSaleByOrderKey("219d7581-78e2-4aa9-b708-b7c585780bfc");

}
catch (\Gateway\One\DataContract\Report\ApiError $error)
{
    $httpStatusCode = $error->errorCollection->ErrorItemCollection[0]->ErrorCode;
    $response = array("message" => $error->errorCollection->ErrorItemCollection[0]->Description);
}
catch (Exception $ex)
{
    $httpStatusCode = 500;
    $response = array("message" => "Ocorreu um erro inesperado.");
}
finally {
    header('Content-Type: application/json');
    print json_encode($response->getData());
}
require 'mundipagg_sdk'

# variable with merchant key
merchantKey = '85328786-8BA6-420F-9948-5352F5A183EB'

# instantiate class with request methods
# :sandbox for sandbox ambient 
# :production for production ambient
gateway = Gateway::Gateway.new(:sandbox, merchantKey)

# creates request object for transaction
querySaleRequest = Gateway::QuerySaleRequest.new

# fill with order key from the transaction you wish to seek
querySaleRequest.OrderKey = '219d7581-78e2-4aa9-b708-b7c585780bfc'

# the request must be made using the enumerator Gateway::QuerySaleRequest.QuerySaleRequestEnum[:OrderKey]
# make the request and returns a response hash
puts responseQuery = gateway.Query(Gateway::QuerySaleRequest.QuerySaleRequestEnum[:OrderKey], querySaleRequest.OrderKey)
from uuid import UUID
from mundipaggOnePython import GatewayServiceClient
from enum_types import PlatformEnvironment, HttpContentTypeEnum

merchant_key = UUID('85328786-8BA6-420F-9948-5352F5A183EB')
end_point = "https://sandbox.mundipaggone.com"

service_client = GatewayServiceClient(merchant_key, PlatformEnvironment.sandbox, HttpContentTypeEnum.json, end_point)

http_response = service_client.sale.query_order_with_key(order_key='219d7581-78e2-4aa9-b708-b7c585780bfc')

json_response = http_response.json()
// Define loja 
UUID merchantKey = UUID.fromString("85328786-8BA6-420F-9948-5352F5A183EB"); // Chave da Loja - MerchantKey

// Cria o cliente que vai efetuar a operação
GatewayServiceClient serviceClient = new GatewayServiceClient(merchantKey, "https://sandbox.mundipaggone.com");

// Define a chave do pedido
UUID orderKey = UUID.fromString("219d7581-78e2-4aa9-b708-b7c585780bfc"); // Chave do pedido

// Submete a requisição
HttpResponseGenericResponse<QuerySaleResponse> httpResponse
	= serviceClient.getSale().QueryOrder(orderKey);

Disponibilizamos um método para você pesquisar transações. Com ele você pode consultar o status além de outras informações importantes sobre ela.

Basta especificar na URL do GET o OrderKey o ou o OrderReference da transação. Os exemplos estão abaixo:

🚧

Limite de consulta

O método QueryOrder retorna apenas os últimos 5 pedidos associados a um OrderReference.

As consultas nessa rota possuem um limite de até 1.500 requisições por minuto. Caso o limite de requisições seja alcançado retornaremos HttpStatusCode: 429 com a mensagem de erro: "limite de requisições por minuto excedido para esse endpoint. Tente novamente em breve."

Language