2017-09-26 90 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