1
<?php 
$action=$_REQUEST['action']; 
if ($action=="")   
{ 
?> 

<center>
<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="example@example.com">
<input type="hidden" name="currency_code" value="AUD">
<input type="hidden" name="item_name" value="Donation">
<input type="number" name="amount" value="10">
<br>
<input type="image" src="http://www.bgclubfc.org/donate-Now.gif" width="150px"     height="50px" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
</center>


    <?php 
    }  
else                
    { 
    $amount=$_REQUEST['amount']; 
    if (($amount==""))
        { 
        echo "All fields are required, please fill <a href=\"\">the form</a> again."; 
        } 
    else{         
        mail("example@example", "donation", $amount); 
        echo "Email sent!"; 


    } 
    }  
?> 

好的,这是我的代码。这是一个有效的贝宝捐赠按钮。但我想在收到捐款时收到并通过电子邮件发送捐款金额。因此,当他们提交表单或单击立即捐赠按钮时,我希望收到一封包含输入内容的电子邮件。

谢谢

4

1 回答 1

0

您的问题非常不清楚,我仍然从代码中了解到您正在尝试创建贝宝捐赠按钮。

请检查以下有用的链接。

https://developer.paypal.com/webapps/developer/docs/classic/paypal-payments-standard/integration-guide/donation_buttons/

于 2013-08-07T07:56:16.360 回答