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/vendor/xendit/xendit-php/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/job-board.corals.io/vendor/xendit/xendit-php/src/CardlessCredit.php
<?php

/**
 * CardlessCredit.php
 * php version 7.2.0
 *
 * @category Class
 * @package  Xendit
 * @author   Ellen <[email protected]>
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     https://api.xendit.co
 */

namespace Xendit;

/**
 * Class CardlessCredit
 *
 * @category Class
 * @package  Xendit
 * @author   Ellen <[email protected]>
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     https://api.xendit.co
 */
class CardlessCredit
{
    use ApiOperations\Request;
    use ApiOperations\Create;

    /**
     * Instantiate relative URL
     *
     * @return string
     */
    public static function classUrl()
    {
        return "/cardless-credit";
    }

    /**
     * Instantiate required params for Create
     *
     * @return array
     */
    public static function createReqParams()
    {
        return [
            'cardless_credit_type',
            'external_id',
            'amount',
            'payment_type',
            'items',
            'customer_details',
            'shipping_address',
            'redirect_url',
            'callback_url'
        ];
    }

    /**
     * Calculate payment types
     *
     * @param array $params user's parameters
     *
     * @return array
     *
     * @throws ApiException
     */
    public static function calculatePaymentTypes($params = [])
    {
        $requiredParams = [
            'cardless_credit_type',
            'amount',
            'items',
        ];

        self::validateParams($params, $requiredParams);

        $url = static::classUrl() . '/payment-types';

        return static::_request('POST', $url, $params);
    }
}

Spamworldpro Mini