我正在开发一个自定义支付网关,一旦提交,所有表单布局将从支付网关api服务器iframe加载。我在javscript函数中获得成功状态,如何通过这些成功,transaction_id等信息来处理付款woocommerce。请指导我将付款详细信息存储在woocommerce中
//For example custom_pyament_gateway_plugin.php
public function payment_fields() {
echo '<script>
var success = function(response){
\\response.transaction_id
window.location = "redirection url to my function and process payment"
\\or
\\ using ajax to process the payment
}
echo </script>;
}