This is the subroutine I use for generating the PayPal form on my catalogue/cart code
Code:
sub PayPal()
' paypal form code
with response
.write "<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>" & vbCrLf
.write "<input type='hidden' name='return' value='http://www.domain.com/thanks.asp'>" & vbCrLf
.write "<input type='hidden' name='cancel_return' value='http://www.domain.com/cancel.asp'>" & vbCrLf
.write "<input type='hidden' name='cmd' value='_xclick'>" & vbCrLf
.write "<input type='hidden' name='business' value='sales@domain.com'>" & vbCrLf
.write "<input type='hidden' name='item_name' value='"
.write scItemCode
.write " "
.write scProdInfo
.write "'>" & vbCrLf
.write "<input type='hidden' name='amount' value='"
.write FormatNumber(scItemprice * scItemQty,2)
.write "'>" & vbCrLf
.write "<input type='hidden' name='no_note' value='1'>" & vbCrLf
.write "<input type='hidden' name='currency_code' value='GBP'>" & vbCrLf
.write "<input type='image' src='/images/payment/x-click-but01.gif' border='0' name='submit'"
.write " alt='Make payments with PayPal - fast, free and secure!'"
.write " title='Make payments with PayPal - fast, free and secure!'>" & vbCrLf
.write "</form>" & vbCrLf
end with
end sub
scItemCode is from the recordset carrying the stock ref number
scProdInfo is the Item description (plus size, colour, etc)
scItemPrice & scItemQty are fairly self explanatory
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|