AlaskanDad
Programmer
I've got a PayPal button that I'm trying to get to work on two of my ASP pages.
On one page, when the button is clicked, the user is taken to PayPal to give me money (a good thing
). On the other page, the button simply posts to the page it is on.
Here is the code for the function:
Function BasicBuyNow (MemID,Product,Amt)
Response.write "<form action=' method='post'>"
Response.write "<input type='hidden' name='cmd' value='_xclick'>"
Response.write "<input type='hidden' name='business' value='subscriptions@myrealdomain.com'>"
Response.write "<input type='hidden' name='item_name' value='" & Product & "'>"
Response.write "<input type='hidden' name='item_number' value='" & MemID & "'>"
Response.write "<input type='hidden' name='amount' value='" & Amt & "'>"
Response.write "<input type='image' src='images/PayPalBuyNow.gif' border='0' name='submit' alt='Make payments with PayPal - fast, free and secure!'>"
Response.write "</form>"
End Function
When I call it from the "good" page, I use this:
BasicBuyNow Session("MembersNumber"
,"Buy One Please",9.95
on the "bad" page, I use this:
BasicBuyNow Session("MembersNumber"
,"Bulk Update",3.95
In thinking through the differences between the two pages, I come up with this:
1. Both pages use <form method='Post'> and the called function makes a second form within it.
2. The button on the "good" page is in a <TD> by itself while the "bad" page has it in a <TD> with some text.
Any idea why one works and the other doesn't?
Thanks,
Rob
On one page, when the button is clicked, the user is taken to PayPal to give me money (a good thing
Here is the code for the function:
Function BasicBuyNow (MemID,Product,Amt)
Response.write "<form action=' method='post'>"
Response.write "<input type='hidden' name='cmd' value='_xclick'>"
Response.write "<input type='hidden' name='business' value='subscriptions@myrealdomain.com'>"
Response.write "<input type='hidden' name='item_name' value='" & Product & "'>"
Response.write "<input type='hidden' name='item_number' value='" & MemID & "'>"
Response.write "<input type='hidden' name='amount' value='" & Amt & "'>"
Response.write "<input type='image' src='images/PayPalBuyNow.gif' border='0' name='submit' alt='Make payments with PayPal - fast, free and secure!'>"
Response.write "</form>"
End Function
When I call it from the "good" page, I use this:
BasicBuyNow Session("MembersNumber"
on the "bad" page, I use this:
BasicBuyNow Session("MembersNumber"
In thinking through the differences between the two pages, I come up with this:
1. Both pages use <form method='Post'> and the called function makes a second form within it.
2. The button on the "good" page is in a <TD> by itself while the "bad" page has it in a <TD> with some text.
Any idea why one works and the other doesn't?
Thanks,
Rob