【发布时间】:2017-10-29 16:55:34
【问题描述】:
连接WC_Gateway_PayPal_Pro checkout 信用卡表单以在自定义主题上实现 jquery.payment 功能的正确方法是什么?
env 是最新的,使用:
- WooCommerce v3.0.7
- WooCommerce PayPal Pro(经典版和 PayFlow 版)网关 v4.4.6
jquery.payment 附带WooCommerce 并根据this article(...可能已过时)启用它是恢复到默认WC credit_card_form 的问题。
现在,我设法在“functions.php”中使用以下内容显示带有工作 jquery.payment 输入的表单:
function filter_woocommerce_payment_gateway_supports( $var, $feature, $instance ) {
$feature = 'default_credit_card_form';
return $feature;
}
add_filter( 'woocommerce_payment_gateway_supports', 'filter_woocommerce_payment_gateway_supports', 10, 3 )
但这远非有效(从未想过会那么容易),它只是无法验证。错误范围:
Payment error: There was a problem connecting to the payment gateway.
Payment error: Security header is not valid
Card expiration date is invalid
根据文章,我认为我缺少的是“修改您的表单处理程序......以确保网关正在寻找正确的发布数据”,但是如何?找不到有关以下操作的任何相关文档,因此非常感谢您的指点:
woocommerce_credit_card_form_args
woocommerce_credit_card_form_fields
woocommerce_credit_card_form_start
woocommerce_credit_card_form_end
【问题讨论】:
标签: paypal woocommerce hook-woocommerce