Paypal SDK Installed
This commit is contained in:
parent
1b1270111b
commit
ae863dcfef
|
|
@ -37,6 +37,7 @@
|
|||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^2.0",
|
||||
"maatwebsite/excel": "3.1.19",
|
||||
"paypal/paypal-checkout-sdk": "1.0.1",
|
||||
"prettus/l5-repository": "^2.6",
|
||||
"tymon/jwt-auth": "^1.0.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d666b5a314de775c8d05fb2f94aa9e01",
|
||||
"content-hash": "fc14e417d44f0efbc8d33e5ac654fba5",
|
||||
"packages": [
|
||||
{
|
||||
"name": "algolia/algoliasearch-client-php",
|
||||
|
|
@ -3311,6 +3311,94 @@
|
|||
],
|
||||
"time": "2020-10-11T21:42:15+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypal-checkout-sdk",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/Checkout-PHP-SDK.git",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/Checkout-PHP-SDK/zipball/ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"reference": "ed6a55075448308b87a8b59dcb7fedf04a048cb1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paypal/paypalhttp": "1.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PayPalCheckoutSdk\\": "lib/PayPalCheckoutSdk",
|
||||
"Sample\\": "samples/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"https://github.com/paypal/Checkout-PHP-SDK/blob/master/LICENSE"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PayPal",
|
||||
"homepage": "https://github.com/paypal/Checkout-PHP-SDK/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PayPal's PHP SDK for Checkout REST APIs",
|
||||
"homepage": "http://github.com/paypal/Checkout-PHP-SDK/",
|
||||
"keywords": [
|
||||
"checkout",
|
||||
"orders",
|
||||
"payments",
|
||||
"paypal",
|
||||
"rest",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2019-11-07T23:16:44+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paypal/paypalhttp",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paypal/paypalhttp_php.git",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paypal/paypalhttp_php/zipball/1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"reference": "1ad9b846a046f09d6135cbf2cbaa7701bbc630a3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"wiremock-php/wiremock-php": "1.43.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PayPalHttp\\": "lib/PayPalHttp"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PayPal",
|
||||
"homepage": "https://github.com/paypal/paypalhttp_php/contributors"
|
||||
}
|
||||
],
|
||||
"time": "2019-11-06T21:27:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phenx/php-font-lib",
|
||||
"version": "0.5.2",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Paypal;
|
||||
|
||||
use PayPalCheckoutSdk\Core\PayPalHttpClient;
|
||||
use PayPalCheckoutSdk\Core\SandboxEnvironment;
|
||||
|
||||
class PayPalClient
|
||||
{
|
||||
/**
|
||||
* Returns PayPal HTTP client instance with environment that has access
|
||||
* credentials context. Use this instance to invoke PayPal APIs, provided the
|
||||
* credentials have access.
|
||||
*/
|
||||
public static function client()
|
||||
{
|
||||
return new PayPalHttpClient(self::environment());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up and return PayPal PHP SDK environment with PayPal access credentials.
|
||||
* This sample uses SandboxEnvironment. In production, use LiveEnvironment.
|
||||
*/
|
||||
public static function environment()
|
||||
{
|
||||
$clientId = "Acr1C3OWYENmPT1ac0SpNvr5AFR_gMXI3pzcMnQzjV9ZW5E4M0A2teSUaipet384AotalP8KI-gwzbD0";
|
||||
$clientSecret = "EMeh5Ai8A216ygPrs5AfKty_DyY3RMDBAemgqnrWkgYi5O9tq5chXI-PXsldYtO5Do4pEYYeqB66Hsdw";
|
||||
return new SandboxEnvironment($clientId, $clientSecret);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue