Newbie with worldpay

Discussion in 'ASP General' started by STEVE WARBURTON, May 27, 2005.

  1. I have recived a callback.asp from worlpay. I have set up the settings in my
    world pay account pointing to the script. I am presuming the transation from
    world pay fires the callback.asp.

    What do I have to do to extract the data that comes back from world pay.
    Idiot level instructions please.

    the script is as follows:

    <%@ LANGUAGE=vbscript %>
    <% Response.Expires = 0 %>
    <% Response.Buffer = TRUE %>
    <% Response.ExpiresAbsolute=#Jan 01, 1980 00:00:00# %>
    <% Response.CacheControl = "Private" %>


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Simple Callback Script</TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="Jamal Ahmed">
    <META NAME="Description" CONTENT="Simple callback script demonstration">
    </HEAD>

    <BODY BGColor="#FFF9D5">
    <!-- Please note this script is just an example. WorldPay doesn't guarantee
    that it will work on your system and we don't provide support for this
    script -->

    <%

    Response.Write "The number of variables sent in a QueryString => " &
    Request.QueryString.Count() & "<BR><BR>"
    Response.Write "The number of variables posted => " & Request.Form.Count()
    & "<BR><BR><BR><BR>"

    'You can set a callback password to check the callback is sent by WorldPay.
    If you set the password
    'we will send it back to you with every callback we send.
    'callbackPW = Request.Form("callbackPW")

    'If you are using callback to insert or get data from the database
    'set obj = Server.CreateObject("ADODB.Command")
    'obj.open "Your data source name"

    trans = Request.form("transStatus")

    ' if the transaction was successful
    If trans = "Y" then %>

    <CENTER><B><FONT SIZE="6" COLOR="#CC0000">The Transaction Was
    Successful</FONT></B><CENTER>

    <!-- WorldPay receipt information -->
    <WPDISPAY ITEM="banner">

    <P align="center">
    <%

    ' requesting the variables sent by WorldPay

    instId = Request.Form("instId") ' Installation ID
    cartId = Request.Form("cartId") ' Customer reference for the
    particular transaction
    amount = Request.Form("amount") ' The amount that was sent to
    WorldPay in the order form
    money = Request.Form("currency") ' The currency that was sent to
    WorldPay in the order form
    desc = Request.Form("desc") ' Description of the items purchsed
    callTime = Request.Form("transTime") 'Time of the transaction
    transId = Request.Form("transId") ' Transaction ID
    testMode = Request.Form("testMode") ' 100 if it was a test
    transaction and 0 for live
    name = Request.Form("name") ' Shopper Details
    address = Request.Form("address")
    postcode = Request.Form("postcode")
    country = Request.Form("country")
    tel = Request.Form("tel")
    email = Request.Form("email")
    lang = Request.Form("lang") ' The language used on the payment page
    cardType = Request.Form("cardType") ' The type of the card shopper
    paid with
    authCurrency = Request.Form("authCurrency") ' The currency that shopper
    choose on payment page
    authAmount = Request.Form("authAmount") ' The amount in currency the
    shopper choose on payment page
    authMode = Request.Form("authMode") ' Useful if you are using
    pre-auth. "A" for immediate "E" for pre-auth
    wafMerchMessage = Request.Form("wafMerchMessage") 'The message sent from
    WorldPay to alert if it was possibly a fradulant transaction
    AVS = Request.Form("AVS")' It is a four digit code for the
    various checks performed by the bank
    ' First digit is for security code comparison, second digit is
    for postcode comparison.
    ' third digit is for address comparison and fourth digit is for
    country comparison.

    'futurePayId = Request.Form("futurePayId") Agreement Id for FuturePay
    if it was FuturePay transaction


    ' If you have got your own custom variables.
    'M_variables = Request.Form("M_<variable name>")



    ' WorldPay will send an alert message in wafMerchMessage. It can have two
    values Caution or Warning.
    ' If there is no value in that variable then that means the transaction
    was OK

    if (wafMerchMessage = "Caution") then
    Response.Write "This transaction is flagged as Caution"
    elseif (wafMerchMessage = "Warning") then
    Response.Write "This transaction is flagged as Warning"
    elseif (wafMerchMessage = "") then
    Response.Write "This transaction is flagged as OK"
    else
    Response.Write "Invalid response for the WorldAlert"
    end if
    Response.Write "<BR><BR>"


    ' Each of the digit in AVS can have 5 possible values. "0" for not
    supported, "1" for not checked, "2" for matched
    ' "4" for not matched and "8" for partially matched.

    Dim avsR(3)
    avsR(0) = "Security code check: "
    avsR(1) = "Postcode check: "
    avsR(2) = "Address check: "
    avsR(3) = "Country check: "

    Response.Write "<H3 align=center>AVS Results</H3>"

    for i=0 to 3
    if MID(AVS,i+1,1) = "0" then
    Response.Write avsR(i) & " not supported"
    elseif MID(AVS,i+1,1) = "1" then
    Response.Write avsR(i) & " not checked"
    elseif MID(AVS,i+1,1) = "2" then
    Response.Write avsR(i) & " matched"
    elseif MID(AVS,i+1,1) = "4" then
    Response.Write avsR(i) & " not matched"
    elseif MID(AVS,i+1,1) = "8" then
    Response.Write avsR(i) & " partially matched"
    else
    Response.Write MID(AVS,i+1,1) & " : not a valid response for " & avsR(i)
    end If
    Response.Write "<BR><BR>"
    next
    Response.Write "<BR><BR>"


    ' In the callback transTime is returned as the number of milliseconds
    since the start of 1970 GMT.
    ' To change it to ASP format you can use dateAdd function

    transTime = callTime/1000
    transTime = dateAdd("s",transTime,#Jan 01, 1970 00:00:00#)

    Response.Write "<H3 align=center>Other Variables</H3>"

    Response.Write "Installation ID: " & instId & "<BR><BR>"
    Response.Write "Cart Id: " & cartId & "<BR><BR>"
    Response.Write "amount: " & amount & "<BR><BR>"
    Response.Write "currency: " & money & "<BR><BR>"
    Response.Write "desc: " & desc & "<BR><BR>"
    Response.Write "Transaction Time: " & transTime & "<BR><BR>"
    Response.Write "Transaction ID: " & transId & "<BR><BR>"
    Response.Write "testMode: " & testMode & "<BR><BR>"
    Response.Write "name: " & name & "<BR><BR>"
    Response.Write "address: " & address & "<BR><BR>"
    Response.Write "postcode: " & postcode & "<BR><BR>"
    Response.Write "country: " & country & "<BR><BR>"
    Response.Write "Phone: " & tel & "<BR><BR>"
    Response.Write "email: " & email & "<BR><BR>"
    Response.Write "Language: " & lang & "<BR><BR>"
    Response.Write "Card Type: " & cardType & "<BR><BR>"
    Response.Write "Auth Currency: " & authCurrency & "<BR><BR>"
    Response.Write "Auth Amount: " & authAmount & "<BR><BR>"
    Response.Write "Auth Mode: " & authMode & "<BR><BR>"
    'Response.Write "FuturePay Id: " & futurePayId & "<BR><BR>"
    %>
    </P>

    <!-- If you would like to display images on the response page please
    upload the images to WorldPay administration area
    and you can reference them like <img src="/i/<installation Id>/<image
    name> -->


    <!-- If you would like to send your shopper to a access the particular
    part of your web site after they have made the
    the payment then you can use WPDISPLAY tags to take your shopper to your
    selected portion

    <A href="http://www.mysite.com/mypage.asp?transId=<WPDISPLAY
    item=transId>&cartId=<WPDISPLAY item=cartId>">mysite</A>

    -->



    <% 'If the transaction was not successful
    elseif trans = "C" then %>

    <WPDISPLAY ITEM="banner">
    <CENTER><B><FONT SIZE="6" COLOR="#CC0000">The Transaction was
    cancelled</FONT></B><CENTER>

    <% ' If the value transStatus of is neither "Y" or "C"
    else %>

    <CENTER><B><FONT SIZE="6" COLOR="#CC0000">Transaction didn't return the
    correct value<BR>
    of transStatus that is it is neither "Y" or "C"</FONT></B><CENTER>

    <% end if %>



    </BODY>
    </HTML>
     
    STEVE WARBURTON, May 27, 2005
    #1
    1. Advertising

  2. STEVE WARBURTON

    McKirahan Guest

    "STEVE WARBURTON" <> wrote in message
    news:#...
    > I have recived a callback.asp from worlpay. I have set up the settings in

    my
    > world pay account pointing to the script. I am presuming the transation

    from
    > world pay fires the callback.asp.
    >
    > What do I have to do to extract the data that comes back from world pay.
    > Idiot level instructions please.
    >
    > the script is as follows:
    >


    [snip]

    The page stores values in variables; see this section of code:

    ' requesting the variables sent by WorldPay

    instId = Request.Form("instId") ' Installation ID
    cartId = Request.Form("cartId") ' Customer reference for the
    particular transaction
    amount = Request.Form("amount") ' The amount that was sent to
    WorldPay in the order form
    money = Request.Form("currency") ' The currency that was sent to
    WorldPay in the order form
    desc = Request.Form("desc") ' Description of the items purchsed
    callTime = Request.Form("transTime") 'Time of the transaction
    transId = Request.Form("transId") ' Transaction ID
    testMode = Request.Form("testMode") ' 100 if it was a test
    transaction and 0 for live
    name = Request.Form("name") ' Shopper Details
    address = Request.Form("address")
    postcode = Request.Form("postcode")
    country = Request.Form("country")
    tel = Request.Form("tel")
    email = Request.Form("email")
    lang = Request.Form("lang") ' The language used on the payment page
    cardType = Request.Form("cardType") ' The type of the card shopper
    paid with
    authCurrency = Request.Form("authCurrency") ' The currency that shopper
    choose on payment page
    authAmount = Request.Form("authAmount") ' The amount in currency the
    shopper choose on payment page
    authMode = Request.Form("authMode") ' Useful if you are using
    pre-auth. "A" for immediate "E" for pre-auth
    wafMerchMessage = Request.Form("wafMerchMessage") 'The message sent from
    WorldPay to alert if it was possibly a fradulant transaction
    AVS = Request.Form("AVS")' It is a four digit code for the
    various checks performed by the bank
    ' First digit is for security code comparison, second digit is
    for postcode comparison.
    ' third digit is for address comparison and fourth digit is for
    country comparison.


    What do you want to do -- store them in a database?
     
    McKirahan, May 27, 2005
    #2
    1. Advertising

  3. Initially into a text file would be fine. I could then import into the main
    database at a later time.
    The main database at the moment is paradox tables, but we will be
    converting to MSQL eventually over the next few weeks (or will that be
    months).

    I just need to grasp how asp works in this context without having to spend
    weeks learning the language.

    Cheers

    Steve




    "McKirahan" <> wrote in message
    news:D...
    > "STEVE WARBURTON" <> wrote in message
    > news:#...
    >> I have recived a callback.asp from worlpay. I have set up the settings in

    > my
    >> world pay account pointing to the script. I am presuming the transation

    > from
    >> world pay fires the callback.asp.
    >>
    >> What do I have to do to extract the data that comes back from world pay.
    >> Idiot level instructions please.
    >>
    >> the script is as follows:
    >>

    >
    > [snip]
    >
    > The page stores values in variables; see this section of code:
    >
    > ' requesting the variables sent by WorldPay
    >
    > instId = Request.Form("instId") ' Installation ID
    > cartId = Request.Form("cartId") ' Customer reference for the
    > particular transaction
    > amount = Request.Form("amount") ' The amount that was sent to
    > WorldPay in the order form
    > money = Request.Form("currency") ' The currency that was sent
    > to
    > WorldPay in the order form
    > desc = Request.Form("desc") ' Description of the items
    > purchsed
    > callTime = Request.Form("transTime") 'Time of the transaction
    > transId = Request.Form("transId") ' Transaction ID
    > testMode = Request.Form("testMode") ' 100 if it was a test
    > transaction and 0 for live
    > name = Request.Form("name") ' Shopper Details
    > address = Request.Form("address")
    > postcode = Request.Form("postcode")
    > country = Request.Form("country")
    > tel = Request.Form("tel")
    > email = Request.Form("email")
    > lang = Request.Form("lang") ' The language used on the payment
    > page
    > cardType = Request.Form("cardType") ' The type of the card shopper
    > paid with
    > authCurrency = Request.Form("authCurrency") ' The currency that
    > shopper
    > choose on payment page
    > authAmount = Request.Form("authAmount") ' The amount in currency the
    > shopper choose on payment page
    > authMode = Request.Form("authMode") ' Useful if you are using
    > pre-auth. "A" for immediate "E" for pre-auth
    > wafMerchMessage = Request.Form("wafMerchMessage") 'The message sent from
    > WorldPay to alert if it was possibly a fradulant transaction
    > AVS = Request.Form("AVS")' It is a four digit code for the
    > various checks performed by the bank
    > ' First digit is for security code comparison, second digit is
    > for postcode comparison.
    > ' third digit is for address comparison and fourth digit is for
    > country comparison.
    >
    >
    > What do you want to do -- store them in a database?
    >
    >
     
    STEVE WARBURTON, May 27, 2005
    #3
  4. STEVE WARBURTON

    McKirahan Guest

    "STEVE WARBURTON" <> wrote in message
    news:#...
    > Initially into a text file would be fine. I could then import into the

    main
    > database at a later time.
    > The main database at the moment is paradox tables, but we will be
    > converting to MSQL eventually over the next few weeks (or will that be
    > months).
    >
    > I just need to grasp how asp works in this context without having to spend
    > weeks learning the language.
    >
    > Cheers
    >
    > Steve


    [ Please don't top post. ]

    Try adding the following; watch for word-wrap.

    <% If Request.Form("instId") <> "" Then Form2File()

    Sub Form2File()
    '*
    '* Declare Constants
    '*
    Const cOTF ="callback.txt"
    '*
    '* Declare Variables
    '*
    Dim Field
    Dim strFSO
    strFSO = Server.MapPath(cOTF)
    Dim booOTF
    booOTF = False
    Dim strOTF
    strOTF = ""
    Dim strRFF
    '*
    '* Declare Objects
    '*
    Dim objFSO
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    If Not objFSO.FileExists(strFSO) Then booOTF = True
    Dim objOTF
    Set objOTF = objFSO.OpenTextFile(strFSO,8,True)
    '*
    '* Write Form Head
    '*
    If booOTF Then
    For Each Field in Request.Form
    If strOTF <> "" Then strOTF = strOTF & ","
    strOTF = strOTF & Field
    Next
    objOTF.WriteLine(strOTF)
    End If
    '*
    '* Append Form Data
    '*
    strOTF = ""
    For Each Field in Request.Form
    strRFF = Request.Form(Field)
    If InStr(strRFF,Chr(34)) > 0 Then strRFF =
    Replace(strRFF,Chr(34),"`")
    If InStr(strRFF,",") > 0 Then strRFF = Chr(34) & strRFF & Chr(34)
    If strOTF <> "" Then strOTF = strOTF & ","
    strOTF = strOTF & strRFF
    Next
    objOTF.WriteLine(strOTF)
    '*
    '* Destroy Objects
    '*
    Set objOTF = Nothing
    Set objFSO = Nothing
    End Sub
    %>

    This will append a record to a text file.
    If the file doesn't exist, then a header record will be added first.

    The filename could be changed to have a ".csv" extension which,
    when double-clicked, will open the file up in MS-Excel.
    If yopu do this then remember to Save As an MS-Excel file (".xls").


    Here's a link about Request.Form:
    http://www.aspwebpro.com/tutorials/asp/newwaytohandlevar.asp
     
    McKirahan, May 27, 2005
    #4
  5. [ Please don't bottom post. ]


    "McKirahan" <> wrote in message
    news:...
    > "STEVE WARBURTON" <> wrote in message
    > news:#...
    >> Initially into a text file would be fine. I could then import into the

    > main
    >> database at a later time.
    >> The main database at the moment is paradox tables, but we will be
    >> converting to MSQL eventually over the next few weeks (or will that be
    >> months).
    >>
    >> I just need to grasp how asp works in this context without having to
    >> spend
    >> weeks learning the language.
    >>
    >> Cheers
    >>
    >> Steve

    >
    > [ Please don't top post. ]
    >
    > Try adding the following; watch for word-wrap.
    >
    > <% If Request.Form("instId") <> "" Then Form2File()
    >
    > Sub Form2File()
    > '*
    > '* Declare Constants
    > '*
    > Const cOTF ="callback.txt"
    > '*
    > '* Declare Variables
    > '*
    > Dim Field
    > Dim strFSO
    > strFSO = Server.MapPath(cOTF)
    > Dim booOTF
    > booOTF = False
    > Dim strOTF
    > strOTF = ""
    > Dim strRFF
    > '*
    > '* Declare Objects
    > '*
    > Dim objFSO
    > Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    > If Not objFSO.FileExists(strFSO) Then booOTF = True
    > Dim objOTF
    > Set objOTF = objFSO.OpenTextFile(strFSO,8,True)
    > '*
    > '* Write Form Head
    > '*
    > If booOTF Then
    > For Each Field in Request.Form
    > If strOTF <> "" Then strOTF = strOTF & ","
    > strOTF = strOTF & Field
    > Next
    > objOTF.WriteLine(strOTF)
    > End If
    > '*
    > '* Append Form Data
    > '*
    > strOTF = ""
    > For Each Field in Request.Form
    > strRFF = Request.Form(Field)
    > If InStr(strRFF,Chr(34)) > 0 Then strRFF =
    > Replace(strRFF,Chr(34),"`")
    > If InStr(strRFF,",") > 0 Then strRFF = Chr(34) & strRFF & Chr(34)
    > If strOTF <> "" Then strOTF = strOTF & ","
    > strOTF = strOTF & strRFF
    > Next
    > objOTF.WriteLine(strOTF)
    > '*
    > '* Destroy Objects
    > '*
    > Set objOTF = Nothing
    > Set objFSO = Nothing
    > End Sub
    > %>
    >
    > This will append a record to a text file.
    > If the file doesn't exist, then a header record will be added first.
    >
    > The filename could be changed to have a ".csv" extension which,
    > when double-clicked, will open the file up in MS-Excel.
    > If yopu do this then remember to Save As an MS-Excel file (".xls").
    >
    >
    > Here's a link about Request.Form:
    > http://www.aspwebpro.com/tutorials/asp/newwaytohandlevar.asp
    >
    >
     
    Kyle Peterson, May 27, 2005
    #5
  6. STEVE WARBURTON

    McKirahan Guest

    "Kyle Peterson" <> wrote in message
    news:eeM#...
    > [ Please don't bottom post. ]


    Is that your contribution to this thread?

    Take a look at this link:

    Bottom vs. top posting and quotation style on Usenet
    http://www.cs.tut.fi/~jkorpela/usenet/brox.html
     
    McKirahan, May 28, 2005
    #6
  7. I'm quite aware of the whole issue and have read most of those articles, so
    your link means nothing to me.
    Why do poeple like you feel like you need to police the newgroups ?

    If someone asks a question help them.
    There is no reason to lecture people on how you think things should be.

    As you'll notice about 50% of the people in the newgroups bottom post and
    50% top post.
    Big deal.





    "McKirahan" <> wrote in message
    news:...
    > "Kyle Peterson" <> wrote in message
    > news:eeM#...
    >> [ Please don't bottom post. ]

    >
    > Is that your contribution to this thread?
    >
    > Take a look at this link:
    >
    > Bottom vs. top posting and quotation style on Usenet
    > http://www.cs.tut.fi/~jkorpela/usenet/brox.html
    >
    >
     
    Kyle Peterson, May 28, 2005
    #7
  8. STEVE WARBURTON

    McKirahan Guest

    "Kyle Peterson" <> wrote in message
    news:#...
    > I'm quite aware of the whole issue and have read most of those articles,

    so
    > your link means nothing to me.
    > Why do poeple like you feel like you need to police the newgroups ?


    Adding a parenthetical comment along with a solution is "policing"?

    > If someone asks a question help them.
    > There is no reason to lecture people on how you think things should be.


    So when you're parents said "Please clean up your room." they were
    lecturing?

    > As you'll notice about 50% of the people in the newgroups bottom post and
    > 50% top post.


    Most who use newsgroups regularly use bottom-posting.

    > Big deal.


    It just makes postings easier to follow, that's all.
     
    McKirahan, May 28, 2005
    #8
  9. STEVE WARBURTON

    Bob Lehmann Guest

    [top posted mostly to annoy McKirahan]

    Most who regularly use the Microsoft groups top-post.

    Most adapt their posting style to the norm for the group - top, bottom,
    sideways, whatever.

    Most mind their own business on off-topic matters.

    When my parents told me to clean up my room, they didn't specify the order
    in which to clean it up. Toys first, or make the bed the bed first? It
    didn't really matter, as long as I cleaned it up. Most parents behave the
    same way.

    Take a look at this link..
    http://www.ocfoundation.org/

    PS -
    (Most people know that these - [] - are square brackets (speaking
    parenthetically, of course), not parentheses.)

    Bob Lehmann

    "McKirahan" <> wrote in message
    news:...
    > "Kyle Peterson" <> wrote in message
    > news:#...
    > > I'm quite aware of the whole issue and have read most of those articles,

    > so
    > > your link means nothing to me.
    > > Why do poeple like you feel like you need to police the newgroups ?

    >
    > Adding a parenthetical comment along with a solution is "policing"?
    >
    > > If someone asks a question help them.
    > > There is no reason to lecture people on how you think things should be.

    >
    > So when you're parents said "Please clean up your room." they were
    > lecturing?
    >
    > > As you'll notice about 50% of the people in the newgroups bottom post

    and
    > > 50% top post.

    >
    > Most who use newsgroups regularly use bottom-posting.
    >
    > > Big deal.

    >
    > It just makes postings easier to follow, that's all.
    >
    >
     
    Bob Lehmann, May 30, 2005
    #9
  10. STEVE WARBURTON

    terje Guest

    Bob Lehmann wrote:

    > Most adapt their posting style to the norm for the group - top, bottom,
    > sideways, whatever.
    >
    > Most mind their own business on off-topic matters.


    If there is no "best practice" in a news group like this, I guess there
    is no best practice in coding either. I wonder if people posting in this
    sloppy manner also write sloppy code?

    I'm tired of having to scroll down 400 lines just to read the one line
    reply.

    Terje :)
     
    terje, May 30, 2005
    #10
  11. STEVE WARBURTON

    Bob Lehmann Guest

    OOOOOHHH! Plonked by adrienne!!! I feel so isolated now.

    Bob Lehmann

    "Adrienne" <> wrote in message
    news:Xns96665EA81A16Barbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed "Bob Lehmann"
    > <> writing in news:#I7pwgNZFHA.1384
    > @TK2MSFTNGP09.phx.gbl:
    >
    > > [top posted mostly to annoy McKirahan]
    > >

    >
    > Plonk! You annoy me as well.
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
     
    Bob Lehmann, May 30, 2005
    #11
  12. STEVE WARBURTON

    Bob Lehmann Guest

    Not sure what you're getting at, terje. For the most part, you sound like
    you agree with my point.

    I think it's kind of a stretch on your sloppy posting == slopping coding,
    though.

    Bob Lehmann

    "terje" <> wrote in message
    news:...
    > Bob Lehmann wrote:
    >
    > > Most adapt their posting style to the norm for the group - top, bottom,
    > > sideways, whatever.
    > >
    > > Most mind their own business on off-topic matters.

    >
    > If there is no "best practice" in a news group like this, I guess there
    > is no best practice in coding either. I wonder if people posting in this
    > sloppy manner also write sloppy code?
    >
    > I'm tired of having to scroll down 400 lines just to read the one line
    > reply.
    >
    > Terje :)
     
    Bob Lehmann, May 30, 2005
    #12
  13. STEVE WARBURTON

    Bob Lehmann Guest

    Yes, complaining (whining?) is an effective teaching tool.

    Especially when you are trying to inflict your not-neccessarily-correct
    opinions on people who don't give a shit what you think. The elitist,
    holier-than-thou attitude is a real plus too.

    Oops! I forgot that you plonked me, Adrienne, so I've ceased to exist as far
    as you're concerned. Thanks for the input anyway. It's very entertaining.

    Bob Lehmann

    "Adrienne" <> wrote in message
    news:Xns9666765A8BE94arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed terje <> writing in
    > news::
    >
    > > I'm tired of having to scroll down 400 lines just to read the one line
    > > reply.
    > >
    > >

    >
    > Then you need to complain about snipping, not bottom posting. And you
    > should complain, because these people will hopefully learn from that.
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
     
    Bob Lehmann, May 30, 2005
    #13
  14. STEVE WARBURTON

    Bob Lehmann Guest

    Yes, complaining (whining?) is an effective teaching tool.

    Especially when you are trying to inflict your not-neccessarily-correct
    opinions on people who don't give a s**t what you think. The elitist,
    holier-than-thou attitude is a real plus too.

    Oops! I forgot that you plonked me, Adrienne, so I've ceased to exist as far
    as you're concerned. Thanks for the input anyway. It's very entertaining.

    Bob Lehmann

    "Adrienne" <> wrote in message
    news:Xns9666765A8BE94arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed terje <> writing in
    > news::
    >
    > > I'm tired of having to scroll down 400 lines just to read the one line
    > > reply.
    > >
    > >

    >
    > Then you need to complain about snipping, not bottom posting. And you
    > should complain, because these people will hopefully learn from that.
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
     
    Bob Lehmann, May 30, 2005
    #14
  15. STEVE WARBURTON

    SteveW Guest

    Sorry for the dumb question, but where in the callback.asp file do I add the
    text.?




    "McKirahan" <> wrote in message
    news:...
    > "STEVE WARBURTON" <> wrote in message
    > news:#...
    >> Initially into a text file would be fine. I could then import into the

    > main
    >> database at a later time.
    >> The main database at the moment is paradox tables, but we will be
    >> converting to MSQL eventually over the next few weeks (or will that be
    >> months).
    >>
    >> I just need to grasp how asp works in this context without having to
    >> spend
    >> weeks learning the language.
    >>
    >> Cheers
    >>
    >> Steve

    >
    > [ Please don't top post. ]
    >
    > Try adding the following; watch for word-wrap.
    >
    > <% If Request.Form("instId") <> "" Then Form2File()
    >
    > Sub Form2File()
    > '*
    > '* Declare Constants
    > '*
    > Const cOTF ="callback.txt"
    > '*
    > '* Declare Variables
    > '*
    > Dim Field
    > Dim strFSO
    > strFSO = Server.MapPath(cOTF)
    > Dim booOTF
    > booOTF = False
    > Dim strOTF
    > strOTF = ""
    > Dim strRFF
    > '*
    > '* Declare Objects
    > '*
    > Dim objFSO
    > Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    > If Not objFSO.FileExists(strFSO) Then booOTF = True
    > Dim objOTF
    > Set objOTF = objFSO.OpenTextFile(strFSO,8,True)
    > '*
    > '* Write Form Head
    > '*
    > If booOTF Then
    > For Each Field in Request.Form
    > If strOTF <> "" Then strOTF = strOTF & ","
    > strOTF = strOTF & Field
    > Next
    > objOTF.WriteLine(strOTF)
    > End If
    > '*
    > '* Append Form Data
    > '*
    > strOTF = ""
    > For Each Field in Request.Form
    > strRFF = Request.Form(Field)
    > If InStr(strRFF,Chr(34)) > 0 Then strRFF =
    > Replace(strRFF,Chr(34),"`")
    > If InStr(strRFF,",") > 0 Then strRFF = Chr(34) & strRFF & Chr(34)
    > If strOTF <> "" Then strOTF = strOTF & ","
    > strOTF = strOTF & strRFF
    > Next
    > objOTF.WriteLine(strOTF)
    > '*
    > '* Destroy Objects
    > '*
    > Set objOTF = Nothing
    > Set objFSO = Nothing
    > End Sub
    > %>
    >
    > This will append a record to a text file.
    > If the file doesn't exist, then a header record will be added first.
    >
    > The filename could be changed to have a ".csv" extension which,
    > when double-clicked, will open the file up in MS-Excel.
    > If yopu do this then remember to Save As an MS-Excel file (".xls").
    >
    >
    > Here's a link about Request.Form:
    > http://www.aspwebpro.com/tutorials/asp/newwaytohandlevar.asp
    >
    >
     
    SteveW, May 31, 2005
    #15
  16. STEVE WARBURTON

    McKirahan Guest

    "SteveW" <> wrote in message
    news:#...
    > Sorry for the dumb question, but where in the callback.asp file do I add

    the
    > text.?


    [snip]

    Try adding it at the end -- after all of their code.
     
    McKirahan, May 31, 2005
    #16
  17. "Adrienne" <> wrote in message
    news:Xns9666765A8BE94arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed terje <> writing in
    > news::


    [snip]

    > Then you need to complain about snipping, not bottom posting.


    [snip]

    What's wrong with snipping out irrelevant chunks? Personally, I think some
    posts lend themselves to top posting, some to inline, some to bottom,
    calling any of them "best practice" for all posts across an entire NG seems
    artificially restrictive to me.

    -Mark
     
    Mark J. McGinty, May 31, 2005
    #17
  18. STEVE WARBURTON

    SteveW Guest

    No callback.txt is produced. Does the asp file have to be in a certain
    directory, are there any other requirments?

    Cheers

    SteveW


    "McKirahan" <> wrote in message
    news:...
    > "SteveW" <> wrote in message
    > news:#...
    >> Sorry for the dumb question, but where in the callback.asp file do I add

    > the
    >> text.?

    >
    > [snip]
    >
    > Try adding it at the end -- after all of their code.
    >
    >
     
    SteveW, May 31, 2005
    #18
  19. STEVE WARBURTON

    McKirahan Guest

    "SteveW" <> wrote in message
    news:...
    > No callback.txt is produced. Does the asp file have to be in a certain
    > directory, are there any other requirments?
    >
    > Cheers
    >
    > SteveW


    [snip]

    "Server.MapPath(cOTF)" will put it in the same folder as the page.

    Write permission must be set on the folder.
     
    McKirahan, May 31, 2005
    #19
  20. Mark J. McGinty wrote:
    > Personally, I think some posts lend themselves to top posting,
    > some to inline, some to bottom, calling any of them "best
    > practice" for all posts across an entire NG seems artificially
    > restrictive to me.


    While I generally agree with this, I think a small amount of paraphrasing
    can eliminate the need for top-post responses. For example,


    John Q. Contributor wrote:
    > [argument in favor of using something]


    While I agree with your reasoning, I still think you are ignoring
    the non-technical part of the argument. What does your solution
    utimately cost in developer hours?

    Etc.




    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, May 31, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rudi Ahlers

    Worldpay

    Rudi Ahlers, Mar 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    513
    Rudi Ahlers
    Mar 6, 2004
  2. Rudi Ahlers

    setting up worldpay

    Rudi Ahlers, Mar 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    402
    Rudi Ahlers
    Mar 7, 2004
  3. Andy Everett via .NET 247

    WorldPay Integration

    Andy Everett via .NET 247, Jun 7, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,297
    wordpa123
    Dec 12, 2008
  4. Anthony

    post form data to worldpay using c#

    Anthony, Oct 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    4,917
    Anthony
    Oct 21, 2004
  5. sajit
    Replies:
    0
    Views:
    388
    sajit
    Aug 4, 2008
Loading...

Share This Page