2017-06-20 7 views
0

以下のPAYPAL生成ボタンコードを変更してphp varibleを使用して動的にする方法はありますか?これは元のコードです:メールアカウントのアドレスに基づく動的Paypalボタン

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> 
<input type="hidden" name="cmd" value="_s-xclick"> 
<input type="hidden" name="hosted_button_id" value="ZBA2RX3Q8L9V8"> 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
</form> 

これは私が後だロジックです:

<?PHP [email protected]; ?> 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> 
    <input type="hidden" name="cmd" value="_s-xclick"> 
    <input type="hidden" name="hosted_button_id" value="<?PHP echo $paypal_email ?>"> 
    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> 
    </form> 

これはよりダイナミック・フレンドリーで、ITが働い:

<form name="_xclick" action="https://www.paypal.com/ck/cgi-bin/webscr" method="post"> 
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="business" value="<?PHP ech VARIABLE HERE; ?>"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="item_name" value="ITEM NAME"> 
<input type="hidden" name="amount" value="1.00"> 
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> 
</form> 
+0

私はfollo PINGPALで生成されたコードは、よりダイナミックに対応しています。 – Davo

答えて

0

これはより動的です - フレンドリーで働きました:

<form name="_xclick" action="https://www.paypal.com/ck/cgi-bin/webscr" method="post"> 
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="business" value="<?PHP ech VARIABLE HERE; ?>"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="item_name" value="ITEM NAME"> 
<input type="hidden" name="amount" value="1.00"> 
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> 
</form> 
関連する問題