PayPal Express Error v1.9

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 13 años
I'm getting the following error when using PayPal Express. The error occurs as soon as PayPal button is clicked.

The string '' is not a valid AllXsd value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: The string '' is not a valid AllXsd value.

Source Error:


Line 1307:        [return: System.Xml.Serialization.XmlElementAttribute("SetExpressCheckoutResponse", Namespace="urn:ebay:api:PayPalAPI")]
Line 1308:        public SetExpressCheckoutResponseType SetExpressCheckout([System.Xml.Serialization.XmlElementAttribute(Namespace="urn:ebay:api:PayPalAPI")] SetExpressCheckoutReq SetExpressCheckoutReq) {
Line 1309:            object[] results = this.Invoke("SetExpressCheckout", new object[] {
Line 1310:                        SetExpressCheckoutReq});
Line 1311:            return ((SetExpressCheckoutResponseType)(results[0]));


Source File: C:\VisualStudioProjects\AMark-AmericaTheBeautiful\Payment\Nop.Payment.PayPal\Web References\PayPalSvc\Reference.cs    Line: 1309

Stack Trace:


[FormatException: The string '' is not a valid AllXsd value.]
   System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags kinds) +4028927
   System.Xml.XmlConvert.ToDateTime(String s, XmlDateTimeSerializationMode dateTimeOption) +41
   System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String value) +73
   Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPayPalAPIAASoapBinding.Read87_SetExpressCheckoutResponseType(Boolean isNullable, Boolean checkType) +587
   Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderPayPalAPIAASoapBinding.Read343_SetExpressCheckoutResponse() +175
   Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer104.Deserialize(XmlSerializationReader reader) +40
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +130

[InvalidOperationException: There is an error in XML document (1, 1422).]
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +630
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) +33
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1007
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +221
   NopSolutions.NopCommerce.Payment.Methods.PayPal.PayPalSvc.PayPalAPIAASoapBinding.SetExpressCheckout(SetExpressCheckoutReq SetExpressCheckoutReq) in C:\VisualStudioProjects\AMark-AmericaTheBeautiful\Payment\Nop.Payment.PayPal\Web References\PayPalSvc\Reference.cs:1309
   NopSolutions.NopCommerce.Payment.Methods.PayPal.PayPalExpressPaymentProcessor.SetExpressCheckout(Decimal OrderTotal, String ReturnURL, String CancelURL) in C:\VisualStudioProjects\AMark-AmericaTheBeautiful\Payment\Nop.Payment.PayPal\PayPalExpressPaymentProcessor.cs:196
   NopSolutions.NopCommerce.Web.Modules.PaypalExpressButton.btnPaypalExpress_Click(Object sender, EventArgs e) in C:\VisualStudioProjects\AMark-AmericaTheBeautiful\NopCommerceStore\Modules\PaypalExpressButton.ascx.cs:136
   System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Hace 13 años
I'm also getting this issue. I've started trying to debug it but its proving difficult because I can't load the symbols for the Nop.Payment.PayPal Library.
Hace 13 años
Hi, I managed to figure it out. Turns out, as expected, it was the human part that was the problem!

I had my live API details setup but had it ticked to use the sandbox. Simply make sure you have it set to sandbox and use the API details from https://developer.paypal.com/ or make sure its unticked and you use your live API details.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.