# texty/1.1/includes/Gateways/Fake.php

Texty – SMS Notification for WordPress, WooCommerce, Dokan and more, version 1.1. 76 lines.

- Page: https://pluginprobe.com/plugins/texty/1.1/code/includes/Gateways/Fake.php
- Raw: https://pluginprobe.com/plugins/texty/1.1/raw/includes/Gateways/Fake.php
- Modified: 2021-01-18T10:49:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/texty/1.1/code/includes/Gateways/Fake.php#L10-L20`.

```php
<?php

namespace Texty\Gateways;

use WP_Error;

/**
 * Twilio Class
 *
 * @see https://www.twilio.com/docs/sms/api/message
 */
class Fake implements GatewayInterface {

    /**
     * Get the name
     *
     * @return string
     */
    public function name() {
        return __( 'Fake Gateway', 'texty' );
    }

    /**
     * Get the name
     *
     * @return string
     */
    public function description() {
        return __( 'This is a fake gateway that logs the messages to <code>debug.log</code> file without sending the actual SMS.', 'texty' );
    }

    /**
     * Get the logo
     *
     * @return string
     */
    public function logo() {
        return TEXTY_URL . '/assets/images/logo.svg';
    }

    /**
     * Get the settings
     *
     * @return array
     */
    public function get_settings() {
        return [];
    }

    /**
     * Send SMS
     *
     * @param string $to
     * @param string $message
     *
     * @return WP_Error|true
     */
    public function send( $to, $message ) {
        $message = sprintf( 'To: %s; Message: %s', $to, $message );
        error_log( $message );

        return true;
    }

    /**
     * Validate a REST API request
     *
     * @param WP_REST_Request $request
     *
     * @return WP_Error|true
     */
    public function validate( $request ) {
        return [];
    }
}

```
