我正在开发一个插件来在 WooCommerce 中集成支付网关。我以前做过一个。
但在这一个中,我需要在网关设置中上传一个密钥文件,用于在向相关门户网站发出支付请求之前对数据进行哈希处理。
我有以下允许选择文件的代码,但我怀疑这在后端是否有效。
'sandbox_pvt_key' => array(
'title' => __( 'Test Private Key', 'woocommerce-custom-gateway' ),
'type' => 'file',
'desc_tip' => true,
'description' => __( 'Please upload the test private key file; this is needed in order to test payment.', 'woocommerce-custom-gateway' ),
'default' => '',
),
任何人都可以知道网关设置中是否支持此选项吗?如果没有,任何人都可以指导我如何通过一些钩子/过滤器或任何其他方式自定义它。