PayPal problem
-
This post relates only to Express Checkout using web service and ASP.NET/C#. I downloaded great sample application from http://www.codeproject.com/KB/aspnet/paypal\_c\_aspnet.aspx. I reconfigured it so that it would use my own test accounts on developer.paypal.com and it worked perfectly. Cash was substracted from client's account and added into business account. The problem began, when I deleted the web service reference and added exactly the same reference afterwards (referencing the same address: https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl). This brought compile error in the following code snippet:
DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "10.00" } }, }
PaymentDetails is not of type PaymentDetailsType anymore. Now it became of type PaymentDetailsType[]. So I rewritten the code as follows:DoExpressCheckoutPaymentReq payReq = new DoExpressCheckoutPaymentReq() { DoExpressCheckoutPaymentRequest = new DoExpressCheckoutPaymentRequestType() { Version = UtilPayPalAPI.Version, DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType[]{ new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "1.00" },
-
This post relates only to Express Checkout using web service and ASP.NET/C#. I downloaded great sample application from http://www.codeproject.com/KB/aspnet/paypal\_c\_aspnet.aspx. I reconfigured it so that it would use my own test accounts on developer.paypal.com and it worked perfectly. Cash was substracted from client's account and added into business account. The problem began, when I deleted the web service reference and added exactly the same reference afterwards (referencing the same address: https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl). This brought compile error in the following code snippet:
DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "10.00" } }, }
PaymentDetails is not of type PaymentDetailsType anymore. Now it became of type PaymentDetailsType[]. So I rewritten the code as follows:DoExpressCheckoutPaymentReq payReq = new DoExpressCheckoutPaymentReq() { DoExpressCheckoutPaymentRequest = new DoExpressCheckoutPaymentRequestType() { Version = UtilPayPalAPI.Version, DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType[]{ new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "1.00" },
Don't know if you have seen this but here is the PayPal SOAP SDK https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_API_Reference.pdf[^] Here is the code samples from PayPal. https://cms.paypal.com/ca/cgi-bin/?&cmd=_render-content&content_ID=developer/library_code[^] Hopefuly this can help you out or point you in the right direction.
If at first you don't succeed ... post it on The Code Project and Pray.
-
This post relates only to Express Checkout using web service and ASP.NET/C#. I downloaded great sample application from http://www.codeproject.com/KB/aspnet/paypal\_c\_aspnet.aspx. I reconfigured it so that it would use my own test accounts on developer.paypal.com and it worked perfectly. Cash was substracted from client's account and added into business account. The problem began, when I deleted the web service reference and added exactly the same reference afterwards (referencing the same address: https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl). This brought compile error in the following code snippet:
DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "10.00" } }, }
PaymentDetails is not of type PaymentDetailsType anymore. Now it became of type PaymentDetailsType[]. So I rewritten the code as follows:DoExpressCheckoutPaymentReq payReq = new DoExpressCheckoutPaymentReq() { DoExpressCheckoutPaymentRequest = new DoExpressCheckoutPaymentRequestType() { Version = UtilPayPalAPI.Version, DoExpressCheckoutPaymentRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType() { Token = resp.GetExpressCheckoutDetailsResponseDetails.Token, PaymentAction = PaymentActionCodeType.Sale, PayerID = resp.GetExpressCheckoutDetailsResponseDetails.PayerInfo.PayerID, PaymentDetails = new PaymentDetailsType[]{ new PaymentDetailsType() { OrderTotal = new BasicAmountType() { currencyID = CurrencyCodeType.USD, Value = "1.00" },