我们正在使用Opayo drop-in checkout在Opayo iframe中获取卡的详细信息:https://developer-eu.elavon.com/docs/opayo/integrate-our-drop-checkout
iframe中的卡片过期日期字段仅接受MMYY格式的过期日期,且不能超过4个字符
如果用户从其Google Pay帐户中保存的卡中自动填充其卡详细信息,则Google Pay会自动使用/填充,从而导致输入的MM/Y无效
有没有人知道解决这个问题的办法?
发布于 2021-04-29 02:21:57
我会向Opayo提出一个bug/功能请求。
根据视图源代码,看起来他们正在尝试禁用自动填充(autocomplete="off"):
<form id="card-details-form">
<div class="form-group">
<div class="label-column">
<label>Name:</label>
</div>
<div class="input-column">
<input name="cardholder-name" placeholder="Cardholder Name" maxlength="50" autocomplete="off" pattern="^[a-zA-Z0-9àáâäãåąčćęèéêëėįìíîïłńòóôöõøùúûüųūÿýżźñçčšžÀÁÂÄÃÅĄĆČĖĘÈÉÊËÌÍÎÏĮŁŃÒÓÔÖÕØÙÚÛÜŲŪŸÝŻŹÑßÇŒÆČŠŽ∂ð /\\&-.']{1,50}$" required="">
</div>
</div>
<div class="form-group">
<div class="label-column">
<label>Card:</label>
</div>
<div class="input-column">
<input type="tel" name="card-number" inputmode="numeric" placeholder="0000 0000 0000 0000" maxlength="20" autocomplete="off" pattern="^\d{12,20}$" required="">
</div>
</div>
<div class="form-group">
<div class="label-column">
<label>Expiry:</label>
</div>
<div class="input-column">
<input type="tel" name="expiry-date" inputmode="numeric" placeholder="MMYY" maxlength="4" autocomplete="off" pattern="^(0[1-9]|1[012])\d{2}$" required="" title="This field is required" class="invalid">
</div>
</div>
<div class="form-group">
<div class="label-column">
<label>CVC:</label>
</div>
<div id="security-code-input-column" class="input-column">
<input type="tel" name="security-code" inputmode="numeric" placeholder="123" maxlength="4" autocomplete="off" pattern="^\d{3,4}$" required="">
</div>
<span id="cvc-help" class="icon-background" data-help-dialog-id="d2189a80-12f9-4a03-bd6a-d34b8ccb01a7"></span>
<div id="cvc-help-content" class="hidden">Card Verification Code, the 3-digit number printed on the back of your card. For American Express it's the 4-digit number on the front.</div>
</div>
</form>如果Opayo需要有关自动填充好处的详细信息,这里有一篇来自ebay的博客文章,可能会有所帮助:https://tech.ebayinc.com/engineering/autofill-deep-dive/
https://stackoverflow.com/questions/67297406
复制相似问题