views:

43

answers:

1

I'm trying to figure out now how to send the request. For example I see 3 proxy types:

SetExpressCheckoutDetails
SetExpressCheckoutReq
SetExpressCheckoutRequest
SetExpressCheckoutResponse

So I went ahead and created the following so far:

    SetExpressCheckoutRequestType checkoutRequest = new SetExpressCheckoutRequestType();
    SetExpressCheckoutRequestDetailsType checkoutRequestDetails = new SetExpressCheckoutRequestDetailsType();

    // Assign properties.
    checkoutRequestDetails.ReturnURL = returnURL;
    checkoutRequestDetails.CancelURL = cancelURL;

    // Set all parameters required for this transaction.
    checkoutRequestDetails.PaymentAction = PaymentActionCodeType.Sale;


    // Do not display any shipping address fields in Paypal payment screens.
    checkoutRequestDetails.NoShipping = "1";
    checkoutRequestDetails.LocaleCode = "en-US";

    checkoutRequest.SetExpressCheckoutRequestDetails = checkoutRequestDetails;

Now I want to execute the actual API call and retrieve the response data.. I don't see how to invoke/execute now at this point. We also have to attach with that call the PayPal X509 Certificate. I don't understand how to make the call. I'm using .NET 3.5 but using the old web services. WE don't plan on using WCF yet so I need to understand how to execute the call once all this is populated.

I also don't understand the difference between the following and what that type is for in the first place. Because these types don't have any sort of "call" logic attached to them, so what are they for?

SetExpressCheckoutReq
SetExpressCheckoutRequest

And no, we are not going to use the PayPal SDK. That's way outdated (.NET 1.1) before web services were even improved in 2.0 anyway.

+1  A: 

You will have a bunch of operations in your client proxy class (the one that inherits from SoapHttpClientProtocol - first class in your generated Reference.cs file), where you can pass the appropriate request into as a parameter.

Look for the class PayPalAPISoapBinding. That's your SOAP proxy client. Pick the method you want/need - and see what request object is required.

Wim Hollebrandse
I'm looking for that. Thanks. What about having to attach the certificate to the request?
CoffeeAddict
And why couldn't PayPal devs tell me this in their forum? All they say is "we don't know .NET" wtf
CoffeeAddict
If this is an object in their WSDL then they would hae to know that it exists right?
CoffeeAddict
How can you check whether a method inerits from SoapClientHttpProtocol? I've already looked at the Rerference.cs and Object Browser and it only shows my PayPal related proxy classes. I don't see any .NET inheritance here
CoffeeAddict
Can you paste the relevant methods on the generated SoapClientHttpProtocol class?
Wim Hollebrandse
No, the inheritance relates to the class.
Wim Hollebrandse
(Can you paste the relevant methods on the generated SoapClientHttpProtocol class? ) Sorry I don't understand what you are rquesting. Also, I guess I was trying to figure out what class is it. While searching through some other examples and looking through the proxy classes I found the following: PayPalAPIAAInterfaceClient and PayPalAPIInterfaceClient. I just did not understand the termonolgy you were asking about.
CoffeeAddict
I guess I was not familar with what SoapClientHttpProtocol is. So it's a class generated by whatever programming language (Java, .NET) that handles the low-level logic to actually send an Http Request. Now I get it. I didn't know what you were asking. I was trying to find instead a proxy class in object explorer that I thought inherited SoapClientHttpProtocol which is not even a .NET framework object. So looks like every language for the most part generates some class...that you use to send the request...this is something that I never knew or could just infer for a newbie
CoffeeAddict
Right, I've edited my answer after having added a web reference to: http://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl
Wim Hollebrandse
well it looks like it ended up being the PayPalAPIAAInterfaceClient and PayPalAPIInterfaceClient. I dno't see a PayPalAPISoapBinding in my proxy classes. Anyway I think this is what I needed.
CoffeeAddict
I think that you're just more experienced in web services and I just didn't get your top-level terms.
CoffeeAddict