forked from PrestaShopCorp/paypal
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #388 from 202ecommerce/release/x
Release 6.4.3
- Loading branch information
Showing
39 changed files
with
1,123 additions
and
1,215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
/* | ||
* Since 2007 PayPal | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License (AFL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/afl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@prestashop.com so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to http://www.prestashop.com for more information. | ||
* | ||
* @author Since 2007 PayPal | ||
* @author 202 ecommerce <tech@202-ecommerce.com> | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* @copyright PayPal | ||
* | ||
*/ | ||
|
||
namespace PaypalAddons\classes\API\ExtensionSDK; | ||
|
||
if (!defined('_PS_VERSION_')) { | ||
exit; | ||
} | ||
|
||
use PaypalAddons\classes\API\HttpAdoptedResponse; | ||
use PaypalAddons\classes\API\HttpResponse; | ||
use PaypalAddons\classes\API\Request\HttpRequestInterface; | ||
use PaypalAddons\classes\API\WrapperInterface; | ||
|
||
class GetCredentialsRequest implements HttpRequestInterface, WrapperInterface | ||
{ | ||
protected $headers = []; | ||
/** @var string */ | ||
protected $partnerId; | ||
|
||
public function __construct($partnerId) | ||
{ | ||
$this->partnerId = (string) $partnerId; | ||
} | ||
|
||
public function getPath() | ||
{ | ||
return sprintf('/v1/customer/partners/%s/merchant-integrations/credentials', $this->partnerId); | ||
} | ||
|
||
/** @return array*/ | ||
public function getHeaders() | ||
{ | ||
return $this->headers; | ||
} | ||
|
||
/** | ||
* @param array $headers | ||
* | ||
* @return self | ||
*/ | ||
public function setHeaders($headers) | ||
{ | ||
if (is_array($headers)) { | ||
$this->headers = $headers; | ||
} | ||
|
||
return $this; | ||
} | ||
|
||
public function getMethod() | ||
{ | ||
return 'GET'; | ||
} | ||
|
||
public function wrap($object) | ||
{ | ||
if ($object instanceof HttpResponse) { | ||
return new HttpAdoptedResponse($object); | ||
} | ||
|
||
return $object; | ||
} | ||
|
||
public function getBody() | ||
{ | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.