问题描述
有没有办法同时传递和接收自定义变量(例如付款人的用户名)?我不能强迫我的用户使用与他们在我的网站上使用的相同的电子邮件地址(最初由贝宝返回).传递额外的用户名将有助于轻松检查付款人的身份.
Is there a way to also pass and receive the custom variable (for example payer's username)? I cant force my users to use the same email address for paypal (which is originally returned by paypal) as they use on my site. Passing an additional username would be a great help for easily checking the payer's identity.
推荐答案
您可以在发布到 PayPal 的表单中包含自定义隐藏字段,如下所示:
You can include a custom hidden field in the form that is posted to PayPal, like this:
<input type="hidden" name="custom" value="<?php echo $user_name; ?>"> // I don't know php well, so correct that part if it's wrong
然后,PayPal 会将该值与其余的 IPN 数据一起传回给您.请注意,此字段允许的最大字符数为 256.
PayPal will then pass that value back to you with the rest of the IPN data. Note that the maximum number of characters permitted for this field is 256.
此外,您不能只定义任何字段 - 您只能使用 PayPal 指定的字段 此处(即输入 name 是自定义",因为 PayPal 特别允许 - 如果您有将 name 设置为 'username' 它将被忽略).
Also, you can't define just any field - you can only use the ones that PayPal specifies here (i.e. the input name is 'custom' because PayPal specifically allows it - if you had set the name to 'username' it would be ignored).
这篇关于Paypal 按钮 + IPN(通过付款人用户名)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)