Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Paypal and File Library
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JJenson
Advanced Member

USA
2121 Posts

Posted - 27 September 2007 :  21:31:33  Show Profile  Visit JJenson's Homepage  Reply with Quote
Ok I have been researching this and I am not sure how I can do this. What I am looking for is if someone could tell me if this is possible what I am trying to do.

I have a paid section now in this section I need a button that will generate and send them to the correct product on paypal. now I have the code to connect to certain products on the site. This is the HTML paypal says to use to connect to their item.


<form action="web address" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="email.com">
<input type="hidden" name="buyer_credit_promo_code" value="">
<input type="hidden" name="buyer_credit_product_category" value="">
<input type="hidden" name="buyer_credit_shipping_method" value="">
<input type="hidden" name="buyer_credit_user_address_change" value="">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


NOw I need to know if anyone could tell me the logic for a way to generate a buy now on the files in the library that will direct them to the correct paypal target.

Then I am supposed to be able to pass values in those param that will let me send the proper information back so if successful then they can download the file.

My problem is I am not uploading all the files I am letting certain people upload their own plugins. I am not sure how to get correct buy now buttons in their for them to be able to purchase the product?

I hope this makes sense what I am trying to do I am just lost in my thinking of how to do this any ideas?<

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 28 September 2007 :  05:19:57  Show Profile  Reply with Quote
If you add the item_number field to your form, you could use it to pass the ID of the file through to PayPal, assuming all the files have a corresponding entry in the database.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 28 September 2007 :  09:40:28  Show Profile  Visit JJenson's Homepage  Reply with Quote
Hmm I will check and see if the file library has an id associate with each file. I am guessing it would have to. Then on the return use the id to associate with the link and have it redirect them to the link from the success page.

Now I guess if I am having the id pass in the button all I would need to include is something like this on the id name:

<input type="hidden" name="item_id" value="<% =ID %>">

I am guessing this is how I would pass that value across?


There is an ID associated with each file but curiosity how does it know which table to pull the id from or is my code above not enough code to show that?


Thanks for the idea

<

Edited by - JJenson on 28 September 2007 09:47:47
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 29 September 2007 :  23:36:55  Show Profile  Visit JJenson's Homepage  Reply with Quote
Ok I have been playing with this and I have a couple questions if someone can help me out. This is my first attempt ever at trying to actually write code from scratch and I keep running into issues go figure.

Now this is the page I have for the return page after paying at paypal this is where they get sent.


'sub DownloadTheFile
' strSql = "SELECT *"
' strSql = strSql & " FROM " & strTablePrefix & "FILEMANAGER "
' strSql = strSql & "WHERE ID = " & thisID
' Set rs = my_Conn.Execute (strSql)

' intID = rs("ID")
' intDate = rs("F_DATE")
' fileFileLink = rs("F_FILELINK")

' rs.Close

'if (objHttp.responseText = "INVALID") then
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ background=""" & strImageURL & strHeadCellBGImage & """ width=""100%"" height=""25"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine & _
" Payment Details" & vbNewLine & _
" </td></tr>"
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""#FFFFFF"" width=""100%"" align=""center""><p>" & vbNewLine & _
" Your transaction did not go through" & vbNewLine & _
" </p></td></tr></table>" & vbNewLine
'else if (objHttp.responseText = "VERIFIED") then
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ background=""" & strImageURL & strHeadCellBGImage & """ width=""100%"" height=""25"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine & _
" Payment Details" & vbNewLine & _
" </td></tr>"
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""#FFFFFF"" width=""100%"" align=""center""><p>" & vbNewLine & _
" Thank you for your purchase <br /><br /><a href=""file_library.asp?showmethefile=" & intID & "&FileName=" & fileFileLink & "&FileDate=" & intDate & "&download=1"" target=""_blank""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumLinkColor & """>Click Here TO Download Your File</font></a>" & vbNewLine & _
" </p></td></tr></table>" & vbNewLine


Now I am not sure the code that comes back across is called item_number.
I am not sure how I get the item number to call the ID number of the file then
to have that add in the proper link url.

I was thinking a strSql statement but not sure how I can make that make the proper
url to show up?

Thanks all <
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 30 September 2007 :  10:56:28  Show Profile  Visit JJenson's Homepage  Reply with Quote
Ok researching and working through this I just need to know if I am allowed to do something like the following statement.

' strSql = "SELECT *"
' strSql = strSql & " FROM " & strTablePrefix & "FILEMANAGER "
' strSql = strSql & "WHERE ID = " & intID
' Set rs = my_Conn.Execute (strSql)

' intID = rs("ID")
' intDate = rs("F_DATE")
' fileFileLink = rs("F_FILELINK")

' Request.Form("item_number") = intID

I basically need the item_number to be the same as the intID so that it will pull the proper data from the DB<
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 30 September 2007 :  12:22:54  Show Profile  Visit JJenson's Homepage  Reply with Quote
Ok nevermind I got it. All is working now :) at least for my test pages now to get the values passing through paypal <
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07