Modify Paypal Fields Using Database Selected Item


B

bgreer5050

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="(e-mail address removed)">
<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>
 
Ad

Advertisements

A

Alexey Smirnov

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">
<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="(e-mail address removed)">
<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">

<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>

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top