# e2pdf/1.32.15/classes/controller/frontend/e2pdf-rpc-v1.php

E2Pdf – Export Pdf Tool for WordPress, version 1.32.15. 88 lines.

- Page: https://pluginprobe.com/plugins/e2pdf/1.32.15/code/classes/controller/frontend/e2pdf-rpc-v1.php
- Raw: https://pluginprobe.com/plugins/e2pdf/1.32.15/raw/classes/controller/frontend/e2pdf-rpc-v1.php
- Modified: 2026-04-22T12:52:22+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/e2pdf/1.32.15/code/classes/controller/frontend/e2pdf-rpc-v1.php#L10-L20`.

```php
<?php

/**
 * File: /controller/frontend/e2pdf-rpc-v1.php
 *
 * @package  E2Pdf
 * @license  GPLv3
 * @link     https://e2pdf.com
 */
if (!defined('ABSPATH')) {
    die('Access denied.');
}

class Controller_Frontend_E2pdf_Rpc_V1 extends Helper_E2pdf_View {

    // zapier rpc service
    public function zapier($rpc) {
        if (is_a($rpc, 'Model_E2pdf_Rpc')) {
            switch ($rpc->get('action')) {
                case 'auth':
                    if ($rpc->get_arg('api_key') == get_option('e2pdf_zapier_api_key')) {
                        wp_send_json_success();
                    } else {
                        wp_send_json_error(null, 401);
                    }
                    break;
                default:
                    break;
            }
        }
    }

    // adobe rpc service
    public function adobe($rpc) {
        if (is_a($rpc, 'Model_E2pdf_Rpc')) {
            switch ($rpc->get('action')) {
                case 'auth':
                    if ($rpc->get_arg('api_key') == get_option('e2pdf_adobe_api_key')) {
                        if ($rpc->get_arg('code')) {
                            $this->redirect(
                                    $this->helper->get_url(
                                            [
                                                'page' => 'e2pdf-integrations',
                                                'action' => 'adobesign',
                                                'code' => $rpc->get_arg('code'),
                                                '_wpnonce' => wp_create_nonce('e2pdf_adobe'),
                                            ]
                                    )
                            );
                        }
                    }
                    break;
                default:
                    break;
            }
        }
    }

    // gdrive rpc service
    public function gdrive($rpc) {
        if (is_a($rpc, 'Model_E2pdf_Rpc')) {
            switch ($rpc->get('action')) {
                case 'auth':
                    if ($rpc->get_arg('api_key') == get_option('e2pdf_gdrive_api_key')) {
                        if ($rpc->get_arg('code') || $rpc->get_arg('error')) {
                            if ($rpc->get_arg('code')) {
                                (new Model_E2pdf_Gdrive())->get_token($rpc->get_arg('code'));
                            }
                            $this->redirect(
                                    $this->helper->get_url(
                                            [
                                                'page' => 'e2pdf-integrations',
                                                'action' => 'gdrive',
                                            ]
                                    )
                            );
                        }
                    } else {
                        wp_send_json_error(null, 401);
                    }
                    break;
                default:
                    break;
            }
        }
    }
}

```
