我想使用paypal创建动态结算按钮
当我在paypal.com上使用创建按钮时,它会为我生成一个按钮:
<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='BFKATLSGW6CTW'>
<input type='image' src='https://www.paypalobjects.com/en_US/i/btn/btn_buynow_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>
但它的价格是静态的
我尝试添加隐藏的输入
<input type="hidden" name="amount" value="5.95">
但价格仍然是静止的
我尝试了自动计费抛出paypal.com 但我得到了
您需要拥有PayPal Business帐户和Enhanced Recurring Payments包才能创建自动结算或分期付款计划按钮
我查看了我的个人资料并为其创建了一个商业应用,但消息仍然相同
我上次尝试使用此表单
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can bill for payments. -->
<input type="hidden" name="business" value="BLWHUxxxxxx"> <!-- I put my merchant id---->
<!-- Specify an Automatic Billing button. -->
<input type="hidden" name="cmd" value="_xclick-auto-billing">
<!-- Specify details about the automatic billing plan. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Regular House Cleaning">
<input type="hidden" name="max_text" value="Regular House Cleaning">
<input type="hidden" name="set_customer_limit" value="max_limit_own">
<input type="hidden" name="min_amount" value="1.00">
<!-- Make sure you get the buyer's address during checkout. -- >
<input type="hidden" name="no_shipping" value="2">
<!-- Display the description and a text box to enter the maximum. -->
<table>
<tr>
<td><strong> </strong></td></tr>
<tr><td>
</td></tr>
<tr><td>$
<input type="hidden" name="amount" value="5.95">
<input type="text" name="max_amount" value="1000"> USD</td></tr>
<!-- Inform buyers of the monthly minimum payment -->
<tr><td> </td></tr>
</table>
<!-- Display the Automatic Billing button -->
<table>
<tr><td><input type="image" border="0" name="submit" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif"
alt="PayPal - The safer, easier way to pay online!"></td></tr>
</table>
<img alt="" border="0" width="1" height="1" src="http://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" />
</form>
但结果是
此商家不再有权提供此自动结算计划。请与商家联系或选择其他产品。
任何建议都要有一个脚本,从数据库中获取价格让客户为服务付费!
答案 0 :(得分:0)
您正在使用“托管”按钮。无法在Hosted Button
中覆盖金额值。您可以清除文本按钮以覆盖金额变量。
在Paypal中创建按钮时,请确保在步骤2中取消选中“在PayPal上保存按钮”选项。这使按钮“清除文本”并提供使用自定义逻辑覆盖任何变量的选项。自动结算,分期付款按钮仅在Enhanced Recurring Payments
ERP