Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8552643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:28:09+00:00 2026-06-11T14:28:09+00:00

I am currently working on a web project that includes implementing PayPal’s Express Checkout

  • 0

I am currently working on a web project that includes implementing PayPal’s Express Checkout as payment service. The project is in C#, I am using Visual Studio 2010 and the SOAP version of the PayPal API. The version of the API I am using is 91.0 (tried switching this to other versions but the problem remains) and I am working in the sandbox to do the development.

In the SOAP API developer guide I found the WSDL to import the service in my project as web reference. I can do every step of the Express Checkout payment flow. Making requests is a walk in the park, using the responses from the service however are not.

For some reason the data fields in the response are not filled in automatically as I would expect. All useful fields are null. Because of this I manually have to parse the XML-string in the response to get the data I need instead of just accessing the right objects. Needless to say, I do not want to work this way.

A quick example from the last step of the payment flow (DoExpressCheckout):

PayPalAPIAASoapBinding apiaa = new PayPalAPIAASoapBinding();
apiaa.RequesterCredentials = ... ;

DoExpressCheckoutPaymentReq decreq = new DoExpressCheckoutPaymentReq();
decreq.DoExpressCheckoutPaymentRequest = new DoExpressCheckoutPaymentRequestType();
/* Filling in all the fields required */

DoExpressCheckoutPaymentResponseType decres = apiaa.DoExpressCheckoutPayment(decreq);

The decres object normally has a field DoExpressCheckoutPaymentResponseDetails that contains all details I need. According to the manual and what I expect, I should be able to, for example, read the token returned in the reponse like this:

string token = decres.DoExpressCheckoutPaymentResponseDetails.Token;

Instead, the DoExpressCheckoutPaymentResponseDetails field is null and I have get the token like this:

string token = decres.Any.ChildNodes[0].InnerText;

I do not get any error codes from the PayPal service.

Even more strange is when I use the TransactionSearch function to find multiple transactions. Say the functions returns 50 transactions. 49 transactions are filled in the correct object where one would expect to find them after reading the API documentation. The first transaction however is not and has to be parsed manually from the Any field in the response.

Did anyone ever encoutered the same or similar problem?

Fyi: I am used to programming web applications PHP. On specific demand I am doing this in C#. Is this standard C# or Visual Studio behaviour (doubt it) or am I doing/configuring an aspect of the SOAP service the wrong way in Visual Studio?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:28:10+00:00Added an answer on June 11, 2026 at 2:28 pm

    SOLVED: The solution is to STOP USING THE LEGACY “WEB REFERENCE”, use the newer standard Service Reference instead.

    Most of my code worked just fine with the new Service Reference, I just had to setup the Web.config and change the way I create an instance of the service.

    return new PayPalAPIAAInterfaceClient(“PayPalAPIAA”);
    took the place of PayPalAPIAASoapBinding.

    Original Post Follows…….

    I second this question, it’s not a matter of invalid credentials, failed transaction, or mismatched API version. I’m doing everything right, the response DOES contain a Token, but it is going into the anyField variable rather than where it belongs.

    This bug reared it’s ugly head after I upgraded from VS 2008 .Net 3.5 to VS 2010 .Net 4. I suspect that the bug is not on the PayPal side, but rather a bug in .Net 4 XML Parsing.

    The Token should be going into the Token property here…

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:ebay:api:PayPalAPI")]
    public partial class SetExpressCheckoutResponseType : AbstractResponseType {
    
        private string tokenField;
    
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string Token {
            get {
                return this.tokenField;
            }
            set {
                this.tokenField = value;
            }
        }
    }
    

    Instead it ends up here….

    [System.Xml.Serialization.XmlAnyElementAttribute()]
            public System.Xml.XmlElement Any {
                get {
                    return this.anyField;
                }
                set {
                    this.anyField = value;
                }
            }
    

    I may be able to fix this inside the Reference.cs file, but my fix would be overwritten as soon as I update the web service reference.

    Here is someone else with the same problem, but their solution didn’t work for me.
    https://www.x.com/developers/paypal/forums/soap/paypal-api-aa-and-net-wcf-undeserialized-fields

    Help!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm working on Web project that is built using ASP.NET Web Forms. We
We’re currently working on a ASP.NET web project using Visual Studio 2010, and as
Hello Ruby/Rails/Merb developers! Im currently working on a web project that will have a
I currently started working on a maven web-app project that needs to be launched
I'm currently working on a project for a web application that may be installed
I am currently working on a web project that makes heavy use of twitter
I'm working on a web site project that is currently tracked in svn but
I am currently working on a Web API project with a Database-First method using
More than halfway through the web-service project I am currently working at, my customer
I'm currently working on a web project that involves several assemblies, structured something like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.