我正在登录条纹,但显示付款选项中没有付款

时间:2019-03-01 08:11:39

标签: php stripe-payments

我正在进行条带连接,并且正在获取数据日志,它表示200正在命中api,但是我没有获得付款,并且条带的付款optino中未显示该付款 我正在使用的代码是

<button id="customButton" class="submit_btn">Make Appointment</button>
                    <script src="https://checkout.stripe.com/checkout.js"></script>
                    <input type="hidden" id="stripeToken" name="stripeToken" />
                    <script>
                       var handler = StripeCheckout.configure({
                            key: 'TOKEN',
                            image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
                            locale: 'auto',
                            token: function(token) {
                                jQuery(function ($) {
                                    console.log("testing12");
                                    $('#stripeToken').val(token.id);

                                });
                            }
                        });
                        jQuery(function ($) {
                            document.getElementById('customButton').addEventListener('click', function (e) {
                                var amount =  0;
                                $('input:checkbox:checked').each(function(){
                                    amount  += isNaN(parseInt($(this).val())) ? 0 : parseInt($(this).val());
                                    $('#total').text(amount); 
                                });
                                handler.open({
                                    name: 'Sports Solution',
                                    description: '',
                                    amount: amount
                                });
                                e.preventDefault();
                            });
                        });
                        // Close Checkout on page navigation:
                        window.addEventListener('popstate', function() {
                            handler.close();
                        });

我不知道我在哪里做错了。

0 个答案:

没有答案
相关问题