我有一个用于将支付网关集成到wordpress woocommerce中的插件。它工作正常,但是当响应来自网关时,我不知道如何在wordpress中获取和显示它。这是插件代码:
function sb_gtpay_init() {
if (!class_exists('WC_Payment_Gateway')) {
return;
}
class WC_GTPay extends WC_Payment_Gateway {
public function __construct() {
global $woocommerce;
$this->id = 'gtpay';
$this -> icon = plugins_url( 'GTPay.png' , __FILE__ );
$this->has_fields = false;
$this->liveurl = 'https://ibank.gtbank.com/GTPay/Tranx.aspx';
$this->method_title = __( 'GTPay', 'woocommerce' );
// Load the form fields.
$this->init_form_fields();
// Load the settings.
$this->init_settings();
// Define user set variables
$this->title = $this->settings['title'];
$this->description = $this->settings['description'];
$this->marchant_id = $this->settings['marchant_id'];
$this->hash_key = $this->settings['hash_key'];
$this->thanks_message = $this->settings['thanks_message'];
$this->error_message = $this->settings['error_message'];
$this->feedback_message …Run Code Online (Sandbox Code Playgroud)