Php “签出时返回付款错误,但邮件已发送”
我为woocommerce选择了一种使用twocheckout插件的付款方式,付款过程正常,我可以使用该插件通过沙盒制作paymanet。问题在于返回付款过程:Php “签出时返回付款错误,但邮件已发送”,php,wordpress,Php,Wordpress,我为woocommerce选择了一种使用twocheckout插件的付款方式,付款过程正常,我可以使用该插件通过沙盒制作paymanet。问题在于返回付款过程: Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp
Order properties should not be accessed directly.
Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'),
require_once('wp-config.php'), require_once('wp-settings.php'),
do_action('wp_loaded'), WP_Hook->do_action, WP_Hook->apply_filters,
call_user_func_array, WC_Form_Handler::checkout_action,
WC_Checkout->process_checkout, WC_Checkout->process_order_payment,
WC_Gateway_Twocheckout->process_payment, WC_Abstract_Legacy_Order->__get,
wc_doing_it_wrong
和wordpress删除一个错误
"Warning: Cannot modify header information - headers already sent"
但是付款还行,订单已经下了,甚至订单邮件也被发送了
在阅读了woocommerce的twocheckout函数插件的get方法后,我意识到对于订单属性的调用有未更新的方法,因此,要检查错误,请转到 并检查找零: twocheckout的“process\u payment”函数具有不推荐的调用账单地址信息的方法,因此更新如下:
if ( 'yes' == $this->debug && $this->notify_url !=='')
$this->log( 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: '. $this->notify_url );
// 2Checkout Args
$twocheckout_args = array(
'token' => $_POST['token'],
'sellerId' => $this->seller_id,
'currency' => get_woocommerce_currency(),
'total' => $order->get_total(),
// Order key
'merchantOrderId' => $order->get_order_number(),
// Billing Address info
"billingAddr" => array(
'name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(),
'addrLine1' => $order->get_billing_address_1(),
'addrLine2' => $order->get_billing_address_2(),
'city' => $order->get_billing_city(),
'state' => $order->get_billing_state(),
'zipCode' => $order->get_billing_postcode(),
'country' => $order->get_billing_country(),
'email' => $order->get_billing_email(),
'phoneNumber' => $order->get_billing_phone()
)
);
您还可以在forkedre上找到更新的方法
希望能尽快更新。在阅读woocommerce的twocheckout函数插件的get方法后,我意识到对于订单属性的调用存在未更新的方法,因此,要检查错误,请转到 并检查找零: twocheckout的“process\u payment”函数具有不推荐的调用账单地址信息的方法,因此更新如下:
if ( 'yes' == $this->debug && $this->notify_url !=='')
$this->log( 'Generating payment form for order ' . $order->get_order_number() . '. Notify URL: '. $this->notify_url );
// 2Checkout Args
$twocheckout_args = array(
'token' => $_POST['token'],
'sellerId' => $this->seller_id,
'currency' => get_woocommerce_currency(),
'total' => $order->get_total(),
// Order key
'merchantOrderId' => $order->get_order_number(),
// Billing Address info
"billingAddr" => array(
'name' => $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(),
'addrLine1' => $order->get_billing_address_1(),
'addrLine2' => $order->get_billing_address_2(),
'city' => $order->get_billing_city(),
'state' => $order->get_billing_state(),
'zipCode' => $order->get_billing_postcode(),
'country' => $order->get_billing_country(),
'email' => $order->get_billing_email(),
'phoneNumber' => $order->get_billing_phone()
)
);
您还可以在forkedre上找到更新的方法
希望这个能尽快更新