Woocommerce Stripe Payment Gateway无法在“产品详细信息”页面上使用

时间:2020-09-01 15:39:20

标签: php wordpress woocommerce

我想从WooCommerce的产品详细信息页面下订单(跳过购物车步骤)。

显示付款方式,但是当我单击信用卡(条形)时,payment_box详细信息没有打开。 payment_box是隐藏的(位于inspect元素上),当我尝试通过CSS进行显示时,卡号,卡代码(CVC)和有效日期未正确显示。

为了在产品详细信息页面中显示付款部分,我使用了以下代码:

<div id="payment" class="woocommerce-checkout-payment">
    <ul class="wc_payment_methods payment_methods methods">
        <?php
            if ( ! empty( $available_gateways ) ) {
                foreach ( $available_gateways as $gateway ) {
                    wc_get_template( 'checkout/payment-method.php', array( 'gateway' => $gateway ) );
                }
            } else {
                echo '<li class="woocommerce-notice woocommerce-notice--info woocommerce-info">' 
                . apply_filters( 'woocommerce_no_available_payment_methods_message', 
                WC()->customer->get_billing_country() ? 
                esc_html( 'Sorry, it seems that there are no available payment methods for your state. 
                Please contact us if you require assistance or wish to make alternate arrangements.', 'woocommerce' ) : 
                esc_html( 'Please fill in your details above to see available payment methods.', 'woocommerce' ) ) 
                . '</li>'; // @codingStandardsIgnoreLine
            }
        ?>
    </ul>
</div>

我找不到为什么它没有正确显示Stripe付款框。 但它在结帐页面上正常工作。 请给我可能的解决方法。

0 个答案:

没有答案