简体   繁体   English

BrainTree JavaScript Drop In API 和 Kount Device Data 未设置

[英]BrainTree JavaScript Drop In API and Kount Device Data not being set

I'm trying to add Kount Fraud protection to an existing BrainTree Drop In installation and according to the docs I should just be able to provide a data collector to start the flow:我正在尝试将 Kount Fraud 保护添加到现有的 BrainTree Drop In 安装中,根据文档,我应该能够提供一个数据收集器来启动流程:

braintree.dropin.create({
        authorization: clientToken,
        container: '#dropin-container',
        // add the data collector for Kount
        dataCollector: {
            kount: true
        },
        card: {
            amount: amount,
            currency: "USD"
        }      
    },
    function(createErr, instance) {
        button.on("click", function() {
            instance.requestPaymentMethod(function (err, payload) {
                   // payload.deviceData is 'undefined'
               });
            });
    });

The problem is that `payload.deviceData is always undefined.问题是 `payload.deviceData 总是未定义的。

The docs are not really clear what dependencies are required for the drop in component.文档并不清楚删除组件所需的依赖项。 It shows the scripts for the client component but not the drop in.它显示客户端组件的脚本,但不显示插入。

I'm using:我正在使用:

<!--  <script src="https://js.braintreegateway.com/web/3.57.0/js/client.min.js"></script> -->
<script src="https://js.braintreegateway.com/web/dropin/1.22.0/js/dropin.min.js"></script>
<script src="https://js.braintreegateway.com/web/3.57.0/js/data-collector.min.js"></script>

Is 1.22 the correct version to be using for the drop in? 1.22 是用于插入的正确版本吗? Is that the last version?是最后一个版本吗? I can't find an official way to check which versions should be used other than what's in the drop in docs which use 1.22?除了使用 1.22 的文档中的内容之外,我找不到检查应该使用哪些版本的官方方法?

Also tried adding the client.min.js in (in addition to drop because without dropin the code above won't find the braintree.dropin.create .还尝试添加client.min.js (除了 drop 因为没有braintree.dropin.create上面的代码将找不到braintree.dropin.create

Any idea what's missing here?知道这里缺少什么吗?

Full disclosure, I work at Braintree.完全披露,我在布伦特里工作。 If you have any further questions, I recommend contacting Support .如果您有任何其他问题,我建议您联系支持

You're definitely on the latest version (as of the post).您肯定使用的是最新版本(截至帖子)。 I like to check the CHANGELOG.md when needing to double-check the version.当需要仔细检查版本时,我喜欢检查CHANGELOG.md

In order for device data to be collected, you need to have Advanced Fraud Tools enabled in your gateway.为了收集设备数据,您需要在网关中启用高级欺诈工具 I'd start with checking this, as device data will be undefined when this is turned off.我首先检查这个,因为当它关闭时设备数据将是未定义的。 To enable Advanced Fraud Tools, follow these steps:要启用高级欺诈工具,请按照下列步骤操作:

  1. Log into the Control Panel (or sandbox Control Panel登录控制面板(或沙盒控制面板
  2. Click on the gear icon in the top right corner点击右上角的齿轮图标
  3. Click Fraud Management from the drop-down menu从下拉菜单中单击欺诈管理
  4. Next to Advanced Fraud Tools, click the toggle to turn it on在高级欺诈工具旁边,单击切换按钮将其打开

Additionally, the data collector should be included in the Drop-in UI script and you should not need to include the data collector script tag.此外,数据收集器应包含在 Drop-in UI 脚本中,您不需要包含数据收集器脚本标记。 The Drop-in should be ready to go without that. Drop-in 应该准备好了,没有那个。

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

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