自定义WooCommerce结帐表单

I'm trying to post form-data to the WooCommerce checkout and continue to PayPal using a form on a custom landing page.

The form uses jquery to add a product to the cart from the select box and when a user hits the checkout button after entering the billing information it should send the user to paypal and create the order as usual in WooCommerce.

I am using the standard form action below

<form id="msform" class="text-white" name="checkout" method="post" action="<?php echo esc_url( wc_get_checkout_url() ); ?>" enctype="multipart/form-data">

And have made sure I included <?php wp_nonce_field( 'woocommerce-pay' ); ?>

It will not send the user to paypal and returns to the shopping cart with "We were unable to process your order, please try again."

Page Link : Landing Page with Problem

JsFiddle : preview of form code

I've searched everywhere, please help.

You could authorize the payment with a Paypal gateway using a plugin like this.

Or you could use this plugin to add a pay with Paypal button.


I haven't actually used either of these plugins, so I don't know how to integrate them.