Unique identifier of a transaction. RequiredThe details for some kinds of transactions cannot be retrieved with GetTransactionDetailsRequest. You cannot obtain details of bank transfer withdrawals, for example. Character length and limitations: 17 single-byte alphanumeric characters
Наследование: AbstractRequestType
        protected void Search_Submit(object sender, EventArgs e)
        {
            // Create request object
            GetTransactionDetailsRequestType request = new GetTransactionDetailsRequestType();
            // (Required) Unique identifier of a transaction.
            // Note: The details for some kinds of transactions cannot be retrieved with GetTransactionDetails. You cannot obtain details of bank transfer withdrawals, for example.
            request.TransactionID = transactionId.Value;

            // Invoke the API
            GetTransactionDetailsReq wrapper = new GetTransactionDetailsReq();
            wrapper.GetTransactionDetailsRequest = request;

            // Configuration map containing signature credentials and other required configuration.
            // For a full list of configuration parameters refer in wiki page
            // [https://github.com/paypal/sdk-core-dotnet/wiki/SDK-Configuration-Parameters]
            Dictionary<string, string> configurationMap = Configuration.GetAcctAndConfig();

            // Create the PayPalAPIInterfaceServiceService service object to make the API call
            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);

            // # API call
            // Invoke the GetTransactionDetails method in service wrapper object
            GetTransactionDetailsResponseType transactionDetails = service.GetTransactionDetails(wrapper);

            // Check for API return status
            processResponse(service, transactionDetails);
        }
Пример #2
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            GetTransactionDetailsReq request = new GetTransactionDetailsReq();
            GetTransactionDetailsRequestType requestType = new GetTransactionDetailsRequestType();
            requestType.TransactionID = transactionId.Value;
            request.GetTransactionDetailsRequest = requestType;

            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService();
            service.GetTransactionDetails(request);
        }
Пример #3
0
        protected void Search_Submit(object sender, EventArgs e)
        {
            // Create request object
            GetTransactionDetailsRequestType request = new GetTransactionDetailsRequestType();
            request.TransactionID = transactionId.Value;

            // Invoke the API
            GetTransactionDetailsReq wrapper = new GetTransactionDetailsReq();
            wrapper.GetTransactionDetailsRequest = request;
            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService();
            GetTransactionDetailsResponseType transactionDetails = service.GetTransactionDetails(wrapper);

            // Check for API return status
            processResponse(service, transactionDetails);
        }
    // # GetTransactionDetails API Operation
    // The GetTransactionDetails API operation obtains information about a specific transaction. 
    public GetTransactionDetailsResponseType GetTransactionDetailsAPIOperation()
    {
        // Create the GetTransactionDetailsResponseType object
        GetTransactionDetailsResponseType responseGetTransactionDetailsResponseType = new GetTransactionDetailsResponseType();

        try
        {
            // Create the GetTransactionDetailsReq object
            GetTransactionDetailsReq getTransactionDetails = new GetTransactionDetailsReq();
            GetTransactionDetailsRequestType getTransactionDetailsRequest = new GetTransactionDetailsRequestType();

            // Unique identifier of a transaction.
            // `Note:
            // The details for some kinds of transactions cannot be retrieved with
            // GetTransactionDetails. You cannot obtain details of bank transfer
            // withdrawals, for example.`
            getTransactionDetailsRequest.TransactionID = "5AT5731435011481X";
            getTransactionDetails.GetTransactionDetailsRequest = getTransactionDetailsRequest;

            // Create the service wrapper object to make the API call
            PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService();

            // # API call
            // Invoke the GetTransactionDetails method in service wrapper object
            responseGetTransactionDetailsResponseType = service.GetTransactionDetails(getTransactionDetails);

            if (responseGetTransactionDetailsResponseType != null)
            {
                // Response envelope acknowledgement
                string acknowledgement = "GetTransactionDetails API Operation - ";
                acknowledgement += responseGetTransactionDetailsResponseType.Ack.ToString();
                logger.Info(acknowledgement + "\n");
                Console.WriteLine(acknowledgement + "\n");

                // # Success values
                if (responseGetTransactionDetailsResponseType.Ack.ToString().Trim().ToUpper().Equals("SUCCESS"))
                {
                    // Unique PayPal Customer Account identification number
                    logger.Info("Payer ID : " + responseGetTransactionDetailsResponseType.PaymentTransactionDetails.PayerInfo.PayerID + "\n");
                    Console.WriteLine("Payer ID : " + responseGetTransactionDetailsResponseType.PaymentTransactionDetails.PayerInfo.PayerID + "\n");

                }
                // # Error Values             
                else
                {
                    List<ErrorType> errorMessages = responseGetTransactionDetailsResponseType.Errors;
                    foreach (ErrorType error in errorMessages)
                    {
                        logger.Debug("API Error Message : " + error.LongMessage);
                        Console.WriteLine("API Error Message : " + error.LongMessage + "\n");
                    }
                }
            }
        }
        // # Exception log    
        catch (System.Exception ex)
        {
            // Log the exception message       
            logger.Debug("Error Message : " + ex.Message);
            Console.WriteLine("Error Message : " + ex.Message);
        }
        return responseGetTransactionDetailsResponseType;
    }