dqby43944 2012-03-14 15:19
浏览 70
已采纳

php基本付费现在按钮为贝宝

I'm going to attempt to integrate paypal with my php and html website and there seems to be loads of documentation out there on this topic, but some of it is confusing.

What I basically want to do, is have a shopping cart which i will make myself, display all the items a user wants to purchase and have just a single paynow button for these items that will send this info to paypal, and allow the user to login and return them to my site once it's done.

i dont need a cart or add to cart button etc just a button to pay for the goods which will hopefully display price and all relevant data about each item on the paypal page.

if anyone knows of any tutorials they could point me in the direction of for this type of thing i would be grateful.

  • 写回答

2条回答 默认 最新

  • doufei3152 2012-03-14 15:21
    关注

    Here is a very simple example of the buy now button:

    <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="me@mybusiness.com">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="item_name" value="Teddy Bear">
    <input type="hidden" name="amount" value="12.99">
    <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
    </form>
    

    You just need to change the business, the amount and the item_name

    If you need multiple items add them like this :

    <input type="hidden" name="item_name_1" value="Toy">
    <input type="hidden" name="amount_1" value="10">
    
    <input type="hidden" name="item_name_2" value="Bike">
    <input type="hidden" name="amount_2" value="20">
    

    Straight from the Paypal Docs here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?