简体   繁体   English

使用Recurly JS如何设置需要的不同字段

[英]Using Recurly JS how do I set different fields to be required

I am using Recurly JS and trying to get the some extra fields to be required. 我正在使用Recurly JS,并尝试获取一些额外的字段。 The fields i can get with the required: [] settings are: Card number, month, year, cvv, first name, surname, address1, city 我可以使用以下required: []字段required: []设置为: Card number, month, year, cvv, first name, surname, address1, city

I cannot get the following: agency name, email, postcode, country, vat number 我无法获得以下信息: agency name, email, postcode, country, vat number

I also want to set the details for the month length. 我还想设置月份长度的详细信息。

I was trying to use the RecurlyState object, but Im not sure if it works or how to make it work with the recurly.configure({}); 我试图使用RecurlyState对象,但是我不确定它是否有效或如何与recurly.configure({})一起使用。

I could not find anything in the official documents on how to make certain fields required but I found it here on Git Hub 我在官方文档中找不到有关如何设置某些必填字段的任何内容,但我在Git Hub上找到了它

If your Required Address configuration is set to "Full Address" in the Site Settings>configuration window of the user interface, then validation will automatically check for first_name, last_name, address1, state, city, country, zip. 如果在用户界面的“站点设置”>“配置”窗口中将“必需地址”配置设置为“完整地址”,则验证将自动检查first_name,last_name,address1,州,城市,国家/地区,邮政编码。 It would not be required to declare these parameters in the required [] array. 不需要在必需的[]数组中声明这些参数。

The following the vat_number and cvv would be need to be declared in the required array as with this example: 如本例所示,需要在所需数组中声明以下vat_number和cvv:

required: ['cvv', 'vat_number'] 必填:['cvv','vat_number']

For parameters such as agency name, email, they would require a small customized validation script to check for these fields on submit of the form. 对于诸如代理商名称,电子邮件之类的参数,他们将需要一个小的自定义验证脚本来在提交表单时检查这些字段。 Recurly.js is designed to handle just PCI related data, so this is not included by default. Recurly.js旨在仅处理与PCI相关的数据,因此默认情况下不包括此数据。

The expiry month length is configured within the recurly.js library to accept either a 1 or 2 digit value 有效期长度在recurly.js库中配置为接受1或2位数的值

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM