HEX
Server: LiteSpeed
System: Linux premium283.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: citaqlmd (746)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/citaqlmd/listing.lmskreators.com/wp-content/plugins/texty/includes/Gateways/Fake.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 [];
    }
}