Paypal api, php, form


Paypal api, php, form

<?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!"; 

    } 
    }  
?> 

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

谢谢

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

请查看以下链接。

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