检测到不受支持的 HTTP 请求方法
本文关键字:HTTP 请求 方法 支持 检测 | 更新日期: 2023-09-27 18:34:46
现在我正在使用quickpay
向我的网站付款,当我尝试进入需要通知我的付款的页面时,对于此错误:
Message Error Detected
An unrecoverable message error has been detected with the following information:
Unsupported HTTP request method detected - please use HTTP POST request
Please correct the problem and re-submit.
当我发送它以将信息发送到他们这边时,我喜欢这样:
目录
<asp:HiddenField ID="protocol" runat="server" Value="" />
<asp:HiddenField ID="msgtype" runat="server" />
<asp:HiddenField ID="merchant" runat="server" />
<asp:HiddenField ID="language" runat="server" />
<asp:HiddenField ID="ordernumber" runat="server" />
<asp:HiddenField ID="amount" runat="server" />
<asp:HiddenField ID="currency" runat="server" />
<asp:HiddenField ID="continueurl" runat="server" />
<asp:HiddenField ID="cancelurl" runat="server" />
<asp:HiddenField ID="callbackurl" runat="server" />
<asp:HiddenField ID="autocapture" runat="server" />
<asp:HiddenField ID="md5check" runat="server" />
<asp:Button ID="ButtonBuyNow" OnClick="ButtonBuyNow_Click" runat="server" CssClass="btn pi-btn-base pi-btn-wide pi-uppercase pi-weight-700 pi-letter-spacing" />
当你点击按钮时,我就是这样:
C#
protected void ButtonBuyNow_Click(object sender, EventArgs e)
{
if(CheckBoxGodkend_Handelsbetingelser.Checked)
{
Response.Redirect("https://secure.quickpay.dk/form/");
}
else
{
LabelErrorCheck.Text = "- Husk at acceptere vores handelsbetingelser";
}
}
进入我的隐藏 由 continueurl 和 cancelurl 和 callbackurl 我这样写它们:
string okpage_value = "/PayContinue";
string errorPage_value = "/PayError";
string resultpage_value = "/PayCallback";
Response.Redirect是一个get请求;你需要设置提交按钮的PostBackURL属性,该属性不会回发到你的网站,而是回发到Quickpay网站。 请参阅 MSDN 上的此参考。
<asp:button id="paybutton" runat="server"
text="Pay with QuickPay"
postbackurl="..url.." >
</asp:button>
看起来它应该有效:http://www.appetere.com/Blogs/SteveM/September-2010/Cross-site-posting-of-form-data-to-an-external-URL