id = 'appmaker_webview'; $this->method_title = __( 'Appmaker Webview', 'woocommerce' ); $this->method_description = __( 'Redirect to checkout page in webview page', 'woocommerce' ); $this->has_fields = false; // Load the settings $this->init_settings(); // Get settings $this->title = $this->get_option( 'title' ); $this->description = $this->get_option( 'description' ); $this->instructions = $this->get_option( 'instructions', $this->description ); $this->enable_for_methods = $this->get_option( 'enable_for_methods', array() ); $this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes' ? true : false; } /** * Check If The Gateway Is Available For Use. * * @return bool */ public function is_available() { return true; } /** * Process the payment and return the result. * * @param int $order_id * @return array */ public function process_payment( $order_id ) { $return['result']="success"; $order = New WC_Order($order_id); $return['redirect'] = add_query_arg( 'payment_from_app', '1', $order->get_checkout_payment_url() ); return $return; } }