2017-09-26 68 views
4

嗨 - 我正在寻找一个简单的脚本,我可以复制&粘贴到我的网站,所以我可以开始销售BlueSnap的HPF字段。 表单应该包含获取令牌并为购物者收费所需的最基本元素,我不寻找任何设计,只是功能。使用BlueSnap托管支付字段轻松启动;

我有基础 - 但我需要看看这个看起来一样,如果它做:

<form id="checkoutForm"> 

      <div> 
       <label>Full Name:</label> 
       <input type="text" id="fullName"> 
      </div> 

      <div> 
       <label>Card Number:</label> 
       <input type="text" id="cardNumber" data-bluesnap="ccn"> 
      </div> 

      <div> 
       <label>Security Code:</label> 
       <input type="text" id="securityCode" data-bluesnap="cvv"> 
      </div> 

      <div> 
      <label>Expiration Date (MM/YYYY):</label> 
       <input type="text" id="expirationDate" data-bluesnap="exp"> 
      </div> 

      <button type="submit" id="buynowButton">Buy Now</button> 

    </form> 

谁能帮助我吗?

回答

5

为了实现BlueSnap托管支付领域所有你需要做的是

plnkr simple example link

  1. Obtain the Hosted Payment Field token for the session
  2. Add the BlueSnap JavaScript file to your checkout form

    <script type="text/javascript" src="BLUESNAPDOMAINPATH/services/hosted-payment-fields/v2.0/bluesnap.hpf.min.js"></script>

  3. Add the Hosted Payment Fields to your checkout form

    <div data-bluesnap="ccn"></div>

    <div data-bluesnap="exp"></div>

    <div data-bluesnap="cvv"></div>

  4. Add a script to initiate the Hosted Payment Fields with your Hosted Fields token

  5. Add a script to submit credit card, expiration date and CVV data