drn5375 2016-03-24 00:37
浏览 36

自定义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.

  • 写回答

1条回答 默认 最新

  • dtp0760 2016-03-24 02:05
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端