This is my custom Paypal payment with API REST I take file from https://github.com/paypal/PayPal-PHP-SDK with Composer...
PHP SDK for PayPal RESTful APIs https://developer.paypal.com/webapps/developer/docs/api
// Prerequisites: PHP 5.3 or above // cURL, json & openssl extensions must be enabled
composer require "paypal/rest-api-sdk-php:*"
composer update