0
Ich entwickle Payment Gateway für Woo und versuchen woocommerce_receipt_
Haken zu verwenden, um benutzerdefinierte Formular einreichen und Kunden dritten Teilbahn Zahlungsservice umleiten. Irgendjemand mit der Idee, warum Haken nicht funktioniert. Danke fürs Helfen!! Prost!WooCommerce Empfang Haken funktionieren nicht richtig
Dies ist meine Zahlung Klassencode:
class my_vpos extends WC_Payment_Gateway {
function __construct() {
// The global ID for this Payment method
$this->id = "my_vpos";
$this->method_title = __("my_vpos", 'my_vpos');
$ this->method_description = __("Payment Gateway Plug-in for
WooCommerce", 'my_vpos');
$this->title = __("my_vpos", 'my_vpos');
$this->has_fields = false;
// This basically defines your settings which are then loaded with
init_settings()
$this->init_form_fields();
$this->title = $this->get_option('title');
$this->init_settings();
$this->testurl = 'https://www.exaple-payment.com/pay-gw-t/vpos';
$this->liveurl = 'https://www.exaple-payment.com/pay-gw-t/vpos';
// Actions
add_action('woocommerce_receipt_' . $this->id, array($this,
'receipt_page'));
} // End __construct()
function receipt_page($order){
echo '<form action="' . $this->testurl . '" method="post"
id="submit_payment_form">
<input type="hidden" name="type" value="PAYLOGIN"/>
</form>';
}
}
ich Plugin-Struktur haben, aber 'woocommerce_receipt_my_vpos' nicht funktionieren. Thaks um zu helfen. – htmlbrewery
versuchen Sie diesen Code add_action ('woocommerce_receipt_my_vpos', Array (& $ this, 'receipt_page'), 10, 1); –
Kein Erfolg, nachdem ich 'Stelle Auftrag' Knopfweb site geklickt habe, gebe Fehler 'Internal Server Error' – htmlbrewery