我正在尝试使用 datatrans-inline.js 生成 token 我在 Angular2 的 typescript 中实现它时遇到困难......
有人可以帮忙吗?
文档: https://docs.pci-proxy.com/inline-payment-frames.html
每当我实现代码
Inline.initTokenize( "1234567890", {
cardNumber: "1234567890123456",
cvv: "567"
});
最佳答案
我想解决您的问题,您需要根据文档更改 cardNumber
和 cvv
Initialize the Inline Mode with your merchantId and specify which DOM element containers should be used to inject the iframes
实际上cardNumber
和cvv
是dom元素的id
<form>
<div>
<div>
<label for="card-number-placeholder">Card Number</label>
<!-- card number container -->
<div id="card-number-placeholder" style="width: 250px; height: 38px;"></div>
</div>
<div>
<label for="cvv-placeholder">Cvv</label>
<!-- cvv container -->
<div id="cvv-placeholder" style="width: 90px; height: 38px;"></div>
</div>
<button type="button" id="go">Get Token!</button>
</div>
</form>
关于javascript - 使用 datatrans-inline.js 付款,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47222525/