Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modify Paypal Fields Using Database Selected Item

1 view
Skip to first unread message

bgree...@yahoo.com

unread,
Aug 15, 2007, 9:15:44 AM8/15/07
to

Is it possible to change the paypal cart items below:

item_name, item_number and amount values in the paypal form to match
the item_name, item_number and amount from the selected record of the
database paypal.mdb.

If you can help me write the code, I would be greatful.

The code:


<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="Default5.aspx.vb" Inherits="Default5" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<asp:AccessDataSource ID="AccessDataSource2" runat="server"
DataFile="App_Data\PayPal.mdb"
DeleteCommand="DELETE FROM `paypalitems` WHERE `ID` = ?"
InsertCommand="INSERT INTO `paypalitems` (`ID`, `item_name`,
`item_number`, `amount`) VALUES (?, ?, ?, ?)"
SelectCommand="SELECT `ID`, `item_name`, `item_number`,
`amount` FROM `paypalitems`"
UpdateCommand="UPDATE `paypalitems` SET `item_name` = ?,
`item_number` = ?, `amount` = ? WHERE `ID` = ?">
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="item_name" Type="String" />
<asp:Parameter Name="item_number" Type="String" />
<asp:Parameter Name="amount" Type="String" />
</InsertParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="item_name" Type="String" />
<asp:Parameter Name="item_number" Type="String" />
<asp:Parameter Name="amount" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
</asp:AccessDataSource>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
&nbsp;<br />
<br />


<br />
<br />
<br />
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but22.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">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="a...@abc.com.com">
<input type="hidden" name="item_name" value="Widget">
<input type="hidden" name="item_number" value="1550">
<input type="hidden" name="amount" value="50.00">
<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">
&nbsp;&nbsp;
<input type="hidden" name="bn" value="PP-ShopCartBF">
<br />
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="AccessDataSource2" EmptyDataText="There are no
data records to display."
Style="position: relative">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID"
ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="item_name"
HeaderText="item_name" SortExpression="item_name" />
<asp:BoundField DataField="item_number"
HeaderText="item_number" SortExpression="item_number" />
<asp:BoundField DataField="amount" HeaderText="amount"
SortExpression="amount" />
</Columns>
</asp:GridView>

</div>
</form>
</body>
</html>

Alexey Smirnov

unread,
Aug 16, 2007, 2:48:59 PM8/16/07
to
On Aug 15, 3:15 pm, "bgreer5...@yahoo.com" <bgreer5...@yahoo.com>
wrote:
> <br />
> <br />
>
> <br />
> <br />
> <br />
> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
> but22.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">
> <input type="hidden" name="add" value="1">
> <input type="hidden" name="cmd" value="_cart">
> <input type="hidden" name="business" value="a...@abc.com.com">
> <input type="hidden" name="item_name" value="Widget">
> <input type="hidden" name="item_number" value="1550">
> <input type="hidden" name="amount" value="50.00">
> <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">
>

Check this example: http://www.aspcode.net/Creating-a-simple-paypal-shop.aspx

0 new messages