Results 1 to 6 of 6

Thread: Strange secpay response string

  1. #1
    Join Date
    Aug 2007
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Strange secpay response string

    Hi to all..

    Strange secpay response string.

    After the payment is taken by secpay there server returns to my “http://www.oursite.com/response.asp”

    That is the URL I have supplied to secpay in my checkout screen.

    But the return string is;
    “Template:
    http://www.oursite.com/responce.asp”.

    Obviously with the “Template” part of the string we get the Http 500 error.

    Strangely when the site was with Fasthosts all worked fine.

    Any pointers on that one?

    best regards

    Mike

  2. #2
    Join Date
    Oct 2005
    Location
    Scotland
    Posts
    229
    Thanks
    7
    Thanked 12 Times in 8 Posts

    Default

    I've got a couple of sites on Redfox that use Secpay so there's definitly no problems with using it on here.

    2 of the sites in ASP.net use SOAP web services for doing the payments so it never leaves the site but I do have a classic asp site which I am rewriting that uses the form post method. Can you post up what variables you are posting to Secpay obiously leave out the security sensitive ones.

  3. #3
    Join Date
    Oct 2005
    Location
    Scotland
    Posts
    229
    Thanks
    7
    Thanked 12 Times in 8 Posts

    Default

    Just dug out the code for it, this is what I post to Secpay.

    Code:
    <form method="POST" action="https://www.secpay.com/java-bin/ValCard">
    <input type="hidden" name="digest" value="<%=DigestString%>">
    <input type="hidden" name="template" value="http://www.domain.com/SecpayTemplate.htm">
    <input type="hidden" name="options" value="req_cv2=true,cb_post=true,md_flds=trans_id:amount:callback">
    <input type="hidden" name="merchant" value="mearchnumb">
    <input type="hidden" name="trans_id" value="OrderID">
    <input type="hidden" name="amount" value="Amount">
    <input type="hidden" name="callback" value="http://www.domain.com/PaymentResponse.asp">
    </form>

  4. #4
    Join Date
    Aug 2007
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi, JohnnyW

    Whats strange: some Orders go true Ok and some do not.

    Code:
    Call writeVariables
    'submit form to secpay
    If not(debug) Then
    response.write "<form name='to_secpay' action='https://www.secpay.com/java-bin/ValCard' method='post'>"
    If request("bill_name") = "TestOrder" Then
    response.Write "<input type=""hidden"" name=""options"" value=""test_status=true,mail_merchants=m.franke@oursite.com"">" 'test_status=true value=""dups=false,mail_merchants=m.franke@oursite.com"">"
    Else
    response.Write "<input type=""hidden"" name=""options"" value=""mail_merchants=me@oursite.com"">" 'test_status=truevalue=""dups=false,mail_merchants=m.franke@oursite.com"">"
    End If
    response.Write "<input type=""hidden"" name=""order"" value=""" & strSecPayOrder & """>"
    if len(request("ship_addr_1")) > 0 then
    response.Write "<input type=""hidden"" name=""billing"" value=""bill_name=" & request("bill_name") & ",bill_addr_1=" & request("bill_addr_1") & ", " & request("bill_addr_2") & ",bill_city=" & request("bill_city") & ",bill_state=" & request("bill_state") & ",bill_post_code=" & uCase(request("bill_post_code")) & ",bill_country=" & left(request("bill_country"),2) & ",bill_phone=" & request("bill_phone") & ",bill_email=" & request("bill_email") & """>"
    response.Write "<input type=""hidden"" name=""shipping"" value=""ship_name=" & request("ship_name") & ",ship_addr_1=" & request("ship_addr_1") & ", " & request("ship_addr_2") & ",ship_city=" & request("ship_city") & ",ship_state=" & request("ship_state") & ",ship_post_code=" & uCase(request("ship_post_code")) & ",ship_country=" & left(request("ship_country"),2) & ",ship_email=" & request("bill_email") & """>"
    else
    response.Write "<input type=""hidden"" name=""billing"" value=""bill_name=" & request("bill_name") & ",bill_addr_1=" & request("bill_addr_1") & ", " & request("bill_addr_2") & ",bill_city=" & request("bill_city") & ",bill_state=" & request("bill_state") & ",bill_post_code=" & uCase(request("bill_post_code")) & ",bill_country=" & left(request("bill_country"),2) & ",bill_phone=" & request("bill_phone") & ",bill_email=" & request("bill_email") & """>"
    response.Write "<input type=""hidden"" name=""shipping"" value=""ship_name=" & request("bill_name") & ",ship_addr_1=" & request("bill_addr_1") & ", " & request("bill_addr_2") & ",ship_city=" & request("bill_city") & ",ship_state=" & request("bill_state") & ",ship_post_code=" & uCase(request("bill_post_code")) & ",ship_country=" & left(request("bill_country"),2) & ",ship_email=" & request("bill_email") & """>"
    end if
    response.Write "<input type=""hidden"" name=""merchant"" value=""MymerchantId"">" 
    dteNow = now()
    'trans_id = Year(dteNow) & Month(dteNow) & day(dteNow) & "-" & lOrderID
    response.write "<input type=""hidden"" name=""bill_tel"" value=""" & request("bill_tel") & """>"
    response.Write "<input type=""hidden"" name=""trans_id"" value=""" & trans_id & """>"
    response.Write "<input type=""hidden"" name=""amount"" value=""" & request("amount") & """>"
    response.Write "<input type=""hidden"" name=""callback"" value=""http://www.oursite.com/secpay_response.asp"">"
    response.Write "<input type=""hidden"" name=""bgcolor"" value=""FFFFFF"">"
    response.Write "<input type=""hidden"" name=""branding"" value=""oursite.com- This page is encrypted using SSL (Secure Socket Layer) security."">"
    response.write "</form>"
    'submit the form
    response.write "<SCRIPT LANGUAGE=JAVASCRIPT>"
    response.write "document.to_secpay.submit();"
    response.write "</SCRIPT>"
    End If
    The responce from Secpay is fine, all data is there;

    Order Id, Valid=True,Security Match..

    all there and all Ok.

    Just that out of 10 Orders we get 5 times the http://www.oursite.com/secpay_response.asp not found error.

    This original code has worked for 20.000 orders when hosted by Fasthosts.

    Now that we moved to RF it falls over

    best regards

    Mike
    Last edited by Warren Ashcroft; 8th December 2007 at 05:59 PM.

  5. #5
    Join Date
    Aug 2007
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Hi, again

    I am NOT saying that there is a problem with RF Hosting.

    All it needs is some times is a tick box not set in the web site settings for our site to stop the code running.

    Secondly; I do not intend to spend too much time on the Secpay code as we are moving the UK site to HSBC in the next few weeks anyway.

    Our US site is using HSBC as the payment gate way.

    But it is very annoying that Secpay has taken the money from our Customers and our database is not updated in the process.

    If there is something wrong with the code it should always fall over.

    But like I explained earlier, some times it works some times it does not.

    Also, it could be secpays server that gets hammered during these busy times (we had that before as well, when secpays response would come some several hours after the order was placed.)

    best regards

    Mike

  6. #6
    Join Date
    Jan 2006
    Posts
    419
    Thanks
    2
    Thanked 16 Times in 16 Posts

    Default

    would not recommend hsbc - ahhhhh.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL 5 Connection String
    By bracora.com in forum ASP.NET
    Replies: 1
    Last Post: 16th May 2006, 02:37 PM
  2. Strange JPG link not working problem
    By ShaneC in forum Technical Support
    Replies: 8
    Last Post: 9th April 2006, 08:37 PM
  3. Challenge / Response
    By Sol in forum Sales and Service Feature Enquiries
    Replies: 1
    Last Post: 30th June 2005, 01:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •