Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/job-board.corals.io/Corals/modules/Ecommerce/Classes/Shippings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/job-board.corals.io/Corals/modules/Ecommerce/Classes/Shippings/Free.php
<?php

namespace Corals\Modules\Ecommerce\Classes\Shippings;

use Corals\Modules\Ecommerce\Contracts\ShippingContract;

/**
 * Class Fixed.
 */
class Free implements ShippingContract
{


    public $rate;
    public $description;
    public $name;

    /**
     * Fixed constructor.
     *
     * @param $code
     * @param $value
     * @param array $options
     */
    public function __construct($options = [])
    {


    }

    public function providerName()
    {
        return "Free";
    }

    /**
     * Fixed constructor.
     *
     * @param $shipping_role
     * @param $value
     * @param array $options
     */
    public function initialize($options = [])
    {
        $this->name = $options['name'] ?? '';
        $this->rate = $options['rate'] ?? '';
        $this->description = $options['description'] ?? '';
    }

    /**
     * Gets the shipping Rates.
     *
     * @param $throwErrors boolean this allows us to capture errors in our code if we wish,
     * that way we can spit out why the coupon has failed
     *
     * @return array
     */
    public function getAvailableShipping($to_address, $shippable_items, $shipping_rule, $user = null)
    {

        $available_rates[$this->providerName() . '|' . $this->name] = [
            'provider' => $this->name,
            'description' => $this->description,
            'service' => '',
            'shipping_rule_id' => $shipping_rule->id,
            'currency' => \Payments::admin_currency_code(),
            'amount' => '0.0',
            'estimated_days' => ''
        ];

        return $available_rates;

    }


    public function createShippingTransaction($shipping_order_item)
    {

        $shipping = [];

        $shipping['status'] = 'pending';
        $shipping['label_url'] = '';
        $shipping['tracking_number'] = '';

        return $shipping;
    }


    public function track($order)
    {
        try {
            $tracking_status = [];
            return $tracking_status;
        } catch (\Exception $e) {
            throw new \Exception($e->getMessage());
        }
    }

}

Spamworldpro Mini