我很困惑,为什么$_POST(gateway-id-card-number)
以及有效期和CVV没有从我的帐户页面的表单中发布?
$this->form
根据https://docs.woocommerce.com/wc-apidocs/class-WC_Payment_Gateway_CC.html生成结帐表格
相同的表格在我的帐户页面中,但不起作用。 该帖子发生在结帐页面上,但在我的帐户页面中却没有发生。
显示的错误是提交给帖子的所有字段均为空。请帮助
类似问题: https://wordpress.org/support/topic/problem-with-tokenization-developing-a-custom-gateway/
答案 0 :(得分:0)
如果有人对此有疑问
/**
* Output field name HTML
*
* Gateways which support tokenization do not require names - we don't want the data to post to the server.
*
* @since 2.6.0
* @param string $name Field name.
* @return string
*/
public function field_name( $name ) {
return $this->supports( 'tokenization' ) ? '' : ' name="' . esc_attr( $this->id . '-' . $name ) . '" ';
}