Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google checkout 无法使用NotificationApi从google签出获取通知_Google Checkout - Fatal编程技术网

Google checkout 无法使用NotificationApi从google签出获取通知

Google checkout 无法使用NotificationApi从google签出获取通知,google-checkout,Google Checkout,我正在尝试使用通知Api实现google checkout,因为我想获取订单信息并将其存储在我自己的数据库中。谷歌结帐已实施,订单已下,付款已完成,但我无法从谷歌结帐获得通知。 我已经尝试了Google Checkout的商户账户中的所有设置 并完成了上述文章中列出的代码,但仍然无法获取通知。 我在我的商户帐户的集成控制台中得到的错误是: 我们在尝试访问您的服务器时遇到错误--我们得到的错误是 Send failed with code: 500. Response body was: <

我正在尝试使用通知Api实现google checkout,因为我想获取订单信息并将其存储在我自己的数据库中。谷歌结帐已实施,订单已下,付款已完成,但我无法从谷歌结帐获得通知。 我已经尝试了Google Checkout的商户账户中的所有设置 并完成了上述文章中列出的代码,但仍然无法获取通知。 我在我的商户帐户的集成控制台中得到的错误是:

我们在尝试访问您的服务器时遇到错误--我们得到的错误是

Send failed with code: 500. Response body was: <html>  <head>  <title>Data at the root level is invalid. Line 1, position 1.</title>  <style>  body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Lucida Console";font-size: .9em} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } </style>  </head>  <body bgcolor="white">  <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>  <h2> <i>Data at the root level is invalid. Line 1, position 1.</i> </h2></span>  <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">  <b> Description: </b>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. <br><br>  <b> Exception Details: </b>System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.<br><br>  <b>Source Error:</b> <br><br>  <table width=100% bgcolor="#ffffcc">  <tr>  <td>  <code><pre> Line 14: RequestStream.Close(); Line 15: // Act on the XML. <font color=red>Line 16: switch (EncodeHelper.GetTopElement(RequestXml)) { </font>Line 17: case &quot;new-order-notification&quot;: Line 18: NewOrderNotification N1 = (NewOrderNotification) EncodeHelper.Deserialize(RequestXml, typeof(NewOrderNotification));</pre></code>  </td>  </tr>  </table>  <br>  <b> Source File: </b> d:\Sites\tech2\Notifications.aspx<b> &nbsp;&nbsp; Line: </b> 16 <br><br>  <b>Stack Trace:</b> <br><br>  <table width=100% bgcolor="#ffffcc">  <tr>  <td>  <code><pre> [XmlException: Data at the root level is invalid. Line 1, position 1.] System.Xml.XmlTextReaderImpl.Throw(Exception e) +76 System.Xml.XmlTextReaderImpl.Throw(String res, String arg) +126 System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() +3975494 System.Xml.XmlTextReaderImpl.ParseDocumentContent() +187 System.Xml.XmlTextReaderImpl.Read() +151 System.Xml.XmlTextReader.Read() +15 GCheckout.Util.EncodeHelper.GetTopElement(Stream Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:148 GCheckout.Util.EncodeHelper.GetTopElement(Byte[] Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:88 GCheckout.Util.EncodeHelper.GetTopElement(String Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:114 ASP.notifications_aspx.Page_Load(Object sender, EventArgs e) in d:\Sites\tech2\Notifications.aspx:16 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 </pre></code>  </td>  </tr>  </table>  <br>  <hr width=100% size=1 color=silver>  <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.5053 </font>  </body> </html> <!-- [XmlException]: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at GCheckout.Util.EncodeHelper.GetTopElement(Stream Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:line 148 at GCheckout.Util.EncodeHelper.GetTopElement(Byte[] Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:line 88 at GCheckout.Util.EncodeHelper.GetTopElement(String Xml) in C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:line 114 at ASP.notifications_aspx.Page_Load(Object sender, EventArgs e) in d:\Sites\tech2\Notifications.aspx:line 16 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.notifications_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\d4056d14\8cf5e5c6\App_Web_sascrtij.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using &lt;customErrors mode="Off"/&gt;. Consider using &lt;customErrors mode="On"/&gt; or &lt;customErrors mode="RemoteOnly"/&gt; in production environments.-->
发送失败,代码为500。响应正文为:根级别的数据无效。第1行,位置1。正文{字体系列:“Verdana”;字体重量:正常;字体大小:.7em;颜色:黑色;}p{字体系列:“Verdana”;字体重量:正常;颜色:黑色;页边空白顶部:-5px}b{字体系列:“Verdana”;字体重量:粗体;颜色:黑色;页边空白顶部:-5px}H1{字体系列:“Verdana”;字体重量:正常;字体大小:18pt;颜色:红色}H2字体系列:“Verdana”;字体重量:正常;字体大小:14pt;颜色:褐红色}字体系列:Lucida控制台;字体大小:.9em}标记{字体重量:粗体;颜色:黑色;文本装饰:无;}.版本{颜色:灰色;}.错误{页边距底部:10px;}.可扩展{文本装饰:下划线;字体重量:粗体;颜色:海军蓝;光标:手;}“/”应用程序中出现服务器错误。
根级别的数据无效。第1行,位置1。描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

异常详细信息:System.Xml.XmlException:根级别的数据无效。第1行,位置1。源错误:

第14行:RequestStream.Close();第15行://对XML进行操作。第16行:开关(EncodeHelper.GetTopElement(RequestXml)){17行:大小写“新订单通知”:第18行:NewOrderNotification N1=(NewOrderNotification)EncodeHelper.Deserialize(RequestXml,typeof(NewOrderNotification))源文件:d:\Sites\tech2\Notifications.aspx行:16
堆栈跟踪:

[XmlException:根级别的数据无效。第1行,位置1.]System.Xml.xmlextreaderimpl.Throw(异常e)+76 System.Xml.xmlextreaderimpl.Throw(字符串res,字符串arg)+126 System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()+3975494 System.Xml.XmlTextReaderImpl.ParseDocumentContent()+187 System.Xml.XmlTextReaderImpl.Read()+151 System.Xml.XmlTextReader.Read()+15 GCheckout.Util.EncodeHelper.GetTopElement(流Xml)C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:148 gcheckout.Util.EncodeHelper.GetTopElement(字节[]Xml)C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:88 gcheckout.Util.EncodeHelper.GetTopElement(字符串Xml)C:\Work\googlecode\gcheckout\lib\Util\EncodeHelper.cs:114 ASP.notifications\u aspx.Page\u加载(Object sender,EventArgs e)位于d:\Sites\tech2\Notifications.aspx:16 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,Object o,Object t,EventArgs e)+14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,EventArgs e)+35 System.Web.UI.Control.OnLoad(EventArgs e)+99 System.Web.UI.Control.LoadRecursive()+50 System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)+627


版本信息:Microsoft.NET Framework版本:2.0.50727.3623;ASP.NET版本:2.0.50727.5053
集成控制台中的错误表明服务器未正确确认通知:

有些事情可以尝试:

  • 验证是否正确分析通知并正确发回确认

  • 验证XML响应的格式是否正确。与HTML不同,XML解析器通常对空格、大小写以及正确的语法非常挑剔


  • 非常感谢你的答复,但我没有什么疑问我应该如何以及在何处获取GoogleCheckout发送的序列号,它是否应该位于我的回拨url所在的同一通知页面中?我在集成控制台中看到GC发送的xml具有序列号,但也存在上述错误。2)如果我调试代码,我会知道Request.InputStream为空,这会造成问题。3)如何我应该访问我的回调url..通过直接键入url..这是有效的还是有任何其他方法…请帮助..我真的很困惑,从很多天起就一直在处理这个错误,所以我将APi回调url设置为http,回调内容设置为通知序列,版本为2.5。。