Paypal网格视图付款 [英] Paypal grid view payment

查看:106
本文介绍了Paypal网格视图付款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网格视图。我想使用网格视图进行付款。当我点击结账按钮。它将检索网格视图中的所有项目并发送到paypal站点。但目前它不起作用。任何人都知道该怎么做,我将不胜感激。



我的网格视图代码:

I have a grid view. I wanted to do payment using the grid view. When I click on check out button. It would retrieve all items in the grid view and send to the paypal site. But currently it is not working. Anyone know how to do, I would be greatly appreciated.

My grid view code:

<asp:GridView ID="gv_CartProduct" runat="server" AutoGenerateColumns="False" onRowCommand="gv_CartProduct_OnRowCommand">
  <Columns>
  <asp:TemplateField HeaderText="Title">
      <ItemTemplate>
          <asp:Label ID="lbl_title" Text='<%# Eval("title") %>' runat="server"></asp:Label>
      </ItemTemplate>
  </asp:TemplateField>
     <asp:TemplateField HeaderText="Image">
              <ItemTemplate>
                  <asp:Image ID="imgPreview" ImageUrl='<%# Eval("image")  %>' runat="server"

                      Height="80px" Width="80px" />
              </ItemTemplate>
          </asp:TemplateField>

  <asp:BoundField DataField="price" HeaderText="Price" />
 <asp:TemplateField HeaderText="Quantity">
 <ItemTemplate>
      <asp:TextBox ID="tb_quantity" runat="server"  CommandArgument='<%# Eval("title")%>' Text='<%# Eval("qty") %>' ></asp:TextBox>
  </ItemTemplate>
   </asp:TemplateField>
  <asp:TemplateField>
  <ItemTemplate>
  <asp:LinkButton ID="btn_delete" runat="server" Text="Delete" CommandName="deleterow" CommandArgument='<%# Eval("title") %>' OnClientClick="return confirm('Do you want to delete product?');"  ></asp:LinkButton>
  </ItemTemplate>
  </asp:TemplateField>
</Columns>
  </asp:GridView>





我的paypal按钮代码:



My paypal button code:

<asp:Button ID="btn_Checkout" runat="server" Text="Checkout" OnClick="btn_Checkout_Click" />





btn_Checkout代码落后:



Code behind for btn_Checkout:

protected void btn_Checkout_Click(object sender, EventArgs e)
        {
           //PAYPAL CODE HERE
        }





目前我已经删除了结帐按钮后面的代码,因为它一直给我错误。请帮忙!:D



Currently I have removed the code behind for checkout button as it has been giving me errors. Please help!:D

推荐答案

永远不要接受来自不安全网站的代码来处理任何与真钱有关的事情。

你不知道是谁给你代码,你不知道它做了什么,你不知道它将钱正确地放入适当的账户,而不将细节传递给任何第三方。



只从信誉良好的信用卡交易服务公司获得此类代码 - 否则欺诈范围太大。请记住,如果您的行为被视为疏忽,您本人可能要对任何损失承担责任 - 从公共论坛获取您的代码肯定会是!
Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.

Only get such code from reputable card transaction service companies - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!


这篇关于Paypal网格视图付款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆