Hej
Det er sådan at jeg er kommet ind i et problem med Quickpay som gøre at jeg netop ikke kan komme videre til at modtage onlinebetaling,
Jeg har snakket med Quickpay Support og de fortæller mig at formen skal se sådan her ud:
- <form action="https://secure.quickpay.dk/form/" method="post">
- <input type="hidden" name="protocol" value="7" />
- <input type="hidden" name="msgtype" value="authorize" />
- <input type="hidden" name="merchant" value="86189918" />
- <input type="hidden" name="language" value="da" />
- <input type="hidden" name="ordernumber" value="1420639584" />
- <input type="hidden" name="amount" value="100" />
- <input type="hidden" name="currency" value="DKK" />
- <input type="hidden" name="continueurl" value="http://whybo.pil.dk/~tj/qp/ok.php" />
- <input type="hidden" name="cancelurl" value="http://whybo.pil.dk/~tj/qp/error.php" />
- <input type="hidden" name="callbackurl" value="http://whybo.pil.dk/~tj/qp/callback.php" />
- <input type="hidden" name="md5check" value="620c375375898c863c161b5387bb5cc9" />
- <input type="submit" value="Pay" />
- </form>
men når jeg laver det så gøre jeg sådan her:
Handelsbetingelser.aspx.cs
- protected void Page_Load(object sender, EventArgs e)
- {
- var datoIdag = DateTime.Today.ToString("dd/MM/yyyy");
-
- var chars = "123456789";
- var randomA = new Random();
- var result = new string(
- Enumerable.Repeat(chars, 3)
- .Select(s => s[randomA.Next(s.Length)])
- .ToArray());
-
- var chars2 = "abcdefghijklmno";
- var randomA2 = new Random();
- var result2 = new string(
- Enumerable.Repeat(chars2, 2)
- .Select(s => s[randomA2.Next(s.Length)])
- .ToArray());
-
- Session["orderId"] = result2 + result + "-" + datoIdag;
-
- string protocol_value = "7";
- string msgtype_value = "authorize";
- string language_value = "da";
- string autocapture_value = "0";
- string ordernum_value = Session["orderId"].ToString();
- string merchant_value = "89898978";
- string amount_value = readerPriser["priser"].ToString();
- string qp_currency_value = "DKK";
- string okpage_value = "~/handelsbetingelserContinue.aspx";
- string errorPage_value = "~/handelsbetingelserCallback.aspx";
- string resultpage_value = "~/handelsbetingelserError.aspx";
- string md5secret_value = "29p61DveBZ79c3144LW61lVz1qrwk2gfAFCxPyi5sn49m3Y3IRK5M6SN5d8a68u7";
- string md5check_value = GenerateHash(string.Concat(protocol_value.ToString(), msgtype_value, merchant_value, language_value, ordernum_value, amount_value.ToString(), qp_currency_value, okpage_value, errorPage_value, resultpage_value,
- autocapture_value.ToString(), md5secret_value));
-
- protocol.Value = protocol_value;
- msgtype.Value = msgtype_value;
- language.Value = language_value;
- autocapture.Value = autocapture_value;
- ordernumber.Value = ordernum_value;
- merchant.Value = merchant_value;
- amount.Value = amount_value;
- currency.Value = qp_currency_value;
- continueurl.Value = okpage_value;
- cancelurl.Value = errorPage_value;
- callbackurl.Value = resultpage_value;
- md5check.Value = md5check_value;
-
-
- ButtonBuyNow.Text = "Køb Medlemskab - DKK 10 kr";
- }
Handelsbetingelser.aspx
ser det sådan her ud:
- <input id="protocol" type="hidden" name="protocol" runat="server" />
- <input id="msgtype" type="hidden" name="msgtype" runat="server" />
- <input id="merchant" type="hidden" name="merchant" runat="server" />
- <input id="language" type="hidden" name="language" runat="server" />
- <input id="ordernumber" type="hidden" name="ordernumber" runat="server" />
- <input id="amount" type="hidden" name="amount" runat="server" />
- <input id="currency" type="hidden" name="currency" runat="server" />
- <input id="continueurl" type="hidden" name="continueurl" runat="server" />
- <input id="cancelurl" type="hidden" name="cancelurl" runat="server" />
- <input id="callbackurl" type="hidden" name="callbackurl" runat="server" />
- <input id="autocapture" type="hidden" name="autocapture" runat="server" />
- <input id="md5check" type="hidden" name="md5check" runat="server" />
-
-
- <asp:Button ID="ButtonBuyNow" OnClick="ButtonBuyNow_Click" PostBackUrl="https://secure.quickpay.dk/form/" runat="server" CssClass="btn pi-btn-base pi-btn-wide pi-uppercase pi-weight-700 pi-letter-spacing" />