2016-07-15 114 views
0

我第一次使用條紋。我已經創建了一個帳戶在條紋,我已經切換到測試模式。我正在使用其簡單的結帳功能,並使用我帳戶中的測試API密鑰。但是,當我使用其虛擬信用卡號碼進行收費時,它已成功收費,但沒有顯示在我的帳戶中。如何使用簡單的結賬方式進行條紋測試付款

<script src="https://checkout.stripe.com/checkout.js"></script> 

    <button id="customButton">Purchase</button> 

    <script> 
    var handler = StripeCheckout.configure({ 
    key: the_key, 
    image: '/img/documentation/checkout/marketplace.png', 
    locale: 'auto', 
    token: function(token) { 
    // You can access the token ID with `token.id`. 
    // Get the token ID to your server-side code for use. 
    } 
    }); 

    $('#customButton').on('click', function(e) { 
    // Open Checkout with further options: 
    handler.open({ 
    name: 'User1', 
    description: '2 widgets', 
    amount: 2000 
    }); 
    e.preventDefault(); 
    }); 

    // Close Checkout on page navigation: 
    $(window).on('popstate', function() { 
    handler.close(); 
    }); 
    </script> 

我不知道代碼有什麼問題,爲什麼我沒有將測試付款交給我的帳戶。幫助讚賞。

+0

如果付款成功,請查看您的餘額。 https://dashboard.stripe.com/test/balance –

+0

我已經處於測試模式並且沒有餘額變化 –

+0

驗證您的測試模式API密鑰並在成功付款後檢查Stripe響應 –

回答

0

正如我已經通過你的代碼片段,你需要點擊條紋簽出的服務器端方法。 我希望這會幫助你。讓我知道你是否面對任何事情。

+0

我沒有太多時間使用API​​,這就是爲什麼我使用簡單的結帳。所以請幫助我使用這種簡單的結帳方式 –

+1

Checkout安全地接受客戶的付款細節並直接將它們傳遞給Stripe的服務器,然後Stripes服務器返回可以提交給服務器的令牌。我建議你去這個鏈接https://stripe.com/docs/checkout#integration-simple –