简体   繁体   English

大脑加密支付的客户端加密

[英]Client side encryption for braintree payments

I am working on client side encryption for braintree payments. 我正在为Braintree付款进行客户端加密。 With out encryption the application runs fine, but when i encrypt the card number using client side encryption (braintree-1.1.0.min.js), card number encrypts (into a long string) but i get error as response saying 在没有加密的情况下,应用程序可以正常运行,但是当我使用客户端加密(braintree-1.1.0.min.js)对卡号进行加密时,卡号进行了加密(转换为长字符串),但是我得到了错误提示

(Credit card type is not accepted by this merchant account. Credit card number must be 12-19 digits. CVV must be 4 digits for American Express and 3 digits for other card types)` (此商家帐户不接受信用卡类型。信用卡号必须为12-19位数字。对于美国运通卡,CVV必须为4位数字,对于其他类型的信用卡,CVV必须为3位数字)`

I am using 4111111111111111 as card number provided on braintree site. 我使用4111111111111111作为Braintree网站上提供的卡号。

Brain Tree site. 脑树站点。 On server side i am usng Java. 在服务器端,我正在使用Java。 Thanks in advance for helping... 预先感谢您的帮助...

I work at Braintree. 我在Braintree工作。

Generally, this error indicates you've either used the wrong key, or you've somehow modified the encrypted strings before sending them to us. 通常,此错误表明您使用了错误的密钥,或者在将加密的字符串发送给我们之前以某种方式进行了修改。

Your javascript should look something like: 您的JavaScript看起来应该像这样:

var braintree = Braintree.create("MIIB...")

where the string is your client-side encryption key, which is very long -- much longer than your merchant id, public key, and private key. 该字符串是您的客户端加密密钥,它很长-比您的商家ID,公共密钥和私有密钥长得多。

If you include your code, both client-side javascript and server-side Java, I might be able to spot the specific issue you're having. 如果同时包含客户端javascript和服务器端Java的代码,我也许可以发现您遇到的特定问题。 Please don't include your private key if you add your server side code. 如果添加服务器端代码,请不要包括私钥。

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

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