我正在尝试在我的网站上放置一个 PayPal 表单,但我也想在上面放置自定义字段。
我的意思是,我想收到可能与 PayPal 详细信息不同的详细信息。
也许有人进行了付款,但想使用具有不同电子邮件的 PayPal 帐户,所以我想知道这两个电子邮件。
我想创建一个包含这些字段的表单:
- 名字
- 姓氏
- 个人邮箱(非 Paypal 邮箱)
我希望在收到付款时能够看到这些信息。
这是我的表格:
<div id="paynow" class="contact_form_invoice_payment">
<div class="invoice_payment_title">Pay your invoice here</div>
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input value="_xclick" name="cmd" type="hidden">
<input value="nessa@stressless.ie" name="business" type="hidden">
<input value="http://www.matrix-test.com/stressless/" name="return" type="hidden">
<input value="0" name="no_shipping" type="hidden">
<input value="1" name="no_note" type="hidden">
<input value="EUR" name="currency_code" type="hidden">
<input value="IE" name="lc" type="hidden">
<input value="PP-BuyNowBF" name="bn" type="hidden">
<input value="0" name="tax" type="hidden">
<input value="Online Payment" name="item_name" type="hidden">
<input value="OP" name="item_number" type="hidden">
<div class="first_name_invoice_payment">
First name (requiered) <br />
<input value="" name="first_name">
</div>
<div class="last_name_invoice_payment">
Last name (requiered)<br />
<input value="" name="last_name">
</div>
<div class="email_invoice_payment">
Email (requiered)<br />
<input value="" name="email">
</div>
<div class="first_name_invoice_payment">
Invoice Number (requiered)<br />
<input id="inv" value="" name="item_number">
</div>
<div class="last_name_invoice_payment">
Amount - Euro Only (requiered)<br />
<input id="amt" value="" name="amount">
</div>
<div class="job_title_invoice_payment">
<input alt="PayPal - The safer, easier way to pay online!" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" type="image" class="no-width image" style="width:auto !important; border:none; margin-top:20px;">
<img height="1" width="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" border="0" alt="">
</div>
</form>
</div>
我试着把这些字段:
- 姓名="名字"
- 姓名="姓氏"
- 姓名="邮箱"
但我在 PayPal 电子邮件中甚至在 PayPal 后台都看不到它们。
最佳答案
尝试使用以下变量来收集您正在寻找的信息:
on0 = 客户名称
os0 = "输入名字和姓氏"
on1 = 客户邮箱
os1 = "输入电子邮件地址"
您更新后的代码将与此类似:
<input value="CustomerName" name="on0" type="hidden">
<input value="CustomerEmail" name="on1" type="hidden">
<div class="first_name_invoice_payment">
First/Last name (requiered) <br />
<input value="" name="os0">
</div>
<div class="email_invoice_payment">
Email (requiered)<br />
<input value="" name="os1">
</div>
关于forms - Paypal 支付标准自定义字段的 HTML 表单基础,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46154237/