try {
$list = \PayPal\Api\WebProfile::get_list(
$apiContext);
-}
catch (\PayPal\
Exception\PPConnectionException
$ex) {
+}
catch (\PayPal\
Exception\PayPalConnectionException
$ex) {
ResultPrinter::printError(
"Get List of All Web Profiles",
"Web Profiles",
null,
null,
$ex);
exit(
1);
}
diff --git a/sample/lipp/GenerateAccessTokenFromRefreshToken.php b/sample/lipp/GenerateAccessTokenFromRefreshToken.php
index 711df11..2ee0100 100644
--- a/sample/lipp/GenerateAccessTokenFromRefreshToken.php
+++ b/sample/lipp/GenerateAccessTokenFromRefreshToken.php
@@ -3,14 +3,14 @@
// ### Obtain Access Token From Refresh Token
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
+use PayPal\Api\OpenIdTokeninfo;
// You can retrieve the refresh token by executing ObtainUserConsent.php and store the refresh token
$refreshToken = 'yzX4AkmMyBKR4on7vB5he-tDu38s24Zy-kTibhSuqA8kTdy0Yinxj7NpAyULx0bxqC5G8dbXOt0aVMlMmtpiVmSzhcjVZhYDM7WUQLC9KpaXGBHyltJPkLLQkXE';
try {
- $tokenInfo = new PPOpenIdTokeninfo();
+ $tokenInfo = new OpenIdTokeninfo();
$tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext);
} catch (Exception $ex) {
diff --git a/sample/lipp/GetUserInfo.php b/sample/lipp/GetUserInfo.php
index 45911ff..4e7140d 100644
--- a/sample/lipp/GetUserInfo.php
+++ b/sample/lipp/GetUserInfo.php
@@ -3,8 +3,8 @@
// ### Obtain Access Token From Refresh Token
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdUserinfo;
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
+use PayPal\Api\OpenIdUserinfo;
+use PayPal\Api\OpenIdTokeninfo;
// To obtain User Info, you have to follow three steps in general.
// First, you need to obtain user's consent to retrieve the information you want.
@@ -22,11 +22,11 @@ $refreshToken = 'yzX4AkmMyBKR4on7vB5he-tDu38s24Zy-kTibhSuqA8kTdy0Yinxj7NpAyULx0b
try {
- $tokenInfo = new PPOpenIdTokeninfo();
+ $tokenInfo = new OpenIdTokeninfo();
$tokenInfo = $tokenInfo->createFromRefreshToken(array('refresh_token' => $refreshToken), $apiContext);
$params = array('access_token' => $tokenInfo->getAccessToken());
- $userInfo = PPOpenIdUserinfo::getUserinfo($params, $apiContext);
+ $userInfo = OpenIdUserinfo::getUserinfo($params, $apiContext);
} catch (Exception $ex) {
ResultPrinter::printError("User Information", "User Info", null, $params, $ex);
diff --git a/sample/lipp/ObtainUserConsent.php b/sample/lipp/ObtainUserConsent.php
index f677e17..a6387c4 100644
--- a/sample/lipp/ObtainUserConsent.php
+++ b/sample/lipp/ObtainUserConsent.php
@@ -2,7 +2,7 @@
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdSession;
+use PayPal\Api\OpenIdSession;
$baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
@@ -10,7 +10,7 @@ $baseUrl = getBaseUrl() . '/UserConsentRedirect.php?success=true';
// The clientId is stored in the bootstrap file
//Get Authorization URL returns the redirect URL that could be used to get user's consent
-$redirectUrl = PPOpenIdSession::getAuthorizationUrl(
+$redirectUrl = OpenIdSession::getAuthorizationUrl(
$baseUrl,
array('profile', 'email', 'phone'),
null,
diff --git a/sample/lipp/UserConsentRedirect.php b/sample/lipp/UserConsentRedirect.php
index 8ff487f..c97768f 100644
--- a/sample/lipp/UserConsentRedirect.php
+++ b/sample/lipp/UserConsentRedirect.php
@@ -2,8 +2,8 @@
require __DIR__ . '/../bootstrap.php';
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Api\OpenIdTokeninfo;
+use PayPal\Exception\PayPalConnectionException;
session_start();
@@ -16,8 +16,8 @@ if (isset($_GET['success']) && $_GET['success'] == 'true') {
try {
// Obtain Authorization Code from Code, Client ID and Client Secret
- $accessToken = PPOpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
- } catch (PPConnectionException $ex) {
+ $accessToken = OpenIdTokeninfo::createFromAuthorizationCode(array('code' => $code), null, null, $apiContext);
+ } catch (PayPalConnectionException $ex) {
ResultPrinter::printError("Obtained Access Token", "Access Token", null, $_GET['code'], $ex);
exit(1);
}
diff --git a/sample/notifications/createWebhook.php b/sample/notifications/createWebhook.php
index af87d4c..b747e20 100644
--- a/sample/notifications/createWebhook.php
+++ b/sample/notifications/createWebhook.php
@@ -54,7 +54,7 @@ try {
$output = $webhook->create($apiContext);
} catch (Exception $ex) {
// ^ Ignore workflow code segment
- if ($ex instanceof \PayPal\Exception\PPConnectionException) {
+ if ($ex instanceof \PayPal\Exception\PayPalConnectionException) {
$data = $ex->getData();
ResultPrinter::printError("Created Webhook Failed. Checking if it is Webhook Number Limit Exceeded. Trying to delete all existing webhooks", "Webhook", "Please Use
Delete All Webhooks Sample to delete all existing webhooks in sample", $request, $ex);
if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) {
diff --git a/sample/payment-experience/CreateWebProfile.php b/sample/payment-experience/CreateWebProfile.php
index c2c769b..1b89adf 100644
--- a/sample/payment-experience/CreateWebProfile.php
+++ b/sample/payment-experience/CreateWebProfile.php
@@ -51,7 +51,7 @@ $request = clone $webProfile;
try {
// Use this call to create a profile.
$createProfileResponse = $webProfile->create($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Created Web Profile", "Web Profile", null, $request, $ex);
exit(1);
}
diff --git a/sample/payment-experience/DeleteWebProfile.php b/sample/payment-experience/DeleteWebProfile.php
index f1a3753..37b6a9e 100644
--- a/sample/payment-experience/DeleteWebProfile.php
+++ b/sample/payment-experience/DeleteWebProfile.php
@@ -18,7 +18,7 @@ $webProfile->setId($createProfileResponse->getId());
try {
// Execute the delete method
$webProfile->delete($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, $ex);
exit(1);
}
diff --git a/sample/payment-experience/GetWebProfile.php b/sample/payment-experience/GetWebProfile.php
index 23e9f07..4e1db6c 100644
--- a/sample/payment-experience/GetWebProfile.php
+++ b/sample/payment-experience/GetWebProfile.php
@@ -14,7 +14,7 @@ $createProfileResponse = require 'CreateWebProfile.php';
try {
// If your request is successful, the API returns a web_profile object response that contains the profile details.
$webProfile = \PayPal\Api\WebProfile::get($createProfileResponse->getId(), $apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Get Web Profile", "Web Profile", $webProfile->getId(), null, $ex);
exit(1);
}
diff --git a/sample/payment-experience/ListWebProfiles.php b/sample/payment-experience/ListWebProfiles.php
index eaaa96e..5f84198 100644
--- a/sample/payment-experience/ListWebProfiles.php
+++ b/sample/payment-experience/ListWebProfiles.php
@@ -10,7 +10,7 @@ $apiContext = require __DIR__ . '/../bootstrap.php';
// (See bootstrap.php for more on `ApiContext`)
try {
$list = \PayPal\Api\WebProfile::get_list($apiContext);
-} catch (\PayPal\Exception\PPConnectionException $ex) {
+} catch (\PayPal\Exception\PayPalConnectionException $ex) {
ResultPrinter::printError("Get List of All Web Profiles", "Web Profiles", null, null, $ex);
exit(1);
}
diff --git a/sample/sdk_config.ini b/sample/sdk_config.ini
index 54a6a5a..9199b36 100644
--- a/sample/sdk_config.ini
+++ b/sample/sdk_config.ini
@@ -38,7 +38,7 @@ log.LogLevel=FINE
;Validation Configuration
[validation]
-; If validation is set to strict, the PPModel would make sure that
+; If validation is set to strict, the PayPalModel would make sure that
; there are proper accessors (Getters and Setters) for each model
; objects. Accepted value is
; 'log' : logs the error message to logger only (default)
diff --git a/tests/PayPal/Test/Api/AddressTest.php b/tests/PayPal/Test/Api/AddressTest.php
index 39e1e39..5ff8132 100644
--- a/tests/PayPal/Test/Api/AddressTest.php
+++ b/tests/PayPal/Test/Api/AddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Address;
/**
diff --git a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
index 08e7a2c..c55a4c8 100644
--- a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
+++ b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementStateDescriptor;
/**
diff --git a/tests/PayPal/Test/Api/AgreementTest.php b/tests/PayPal/Test/Api/AgreementTest.php
index 5e9a63f..026404f 100644
--- a/tests/PayPal/Test/Api/AgreementTest.php
+++ b/tests/PayPal/Test/Api/AgreementTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\AgreementTransactions;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Agreement;
/**
@@ -162,17 +162,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -181,17 +181,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testExecute($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->execute("123123", $mockApiContext, $mockPPRestCall);
+ $result = $obj->execute("123123", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -200,17 +200,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
AgreementTest::getJson()
));
- $result = $obj->get("agreementId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("agreementId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -219,18 +219,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -239,18 +239,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testSuspend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->suspend($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->suspend($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -259,18 +259,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testReActivate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->reActivate($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->reActivate($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -279,18 +279,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testCancel($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->cancel($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->cancel($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -299,18 +299,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testBillBalance($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$agreementStateDescriptor = AgreementStateDescriptorTest::getObject();
- $result = $obj->billBalance($agreementStateDescriptor, $mockApiContext, $mockPPRestCall);
+ $result = $obj->billBalance($agreementStateDescriptor, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -319,18 +319,18 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testSetBalance($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$currency = CurrencyTest::getObject();
- $result = $obj->setBalance($currency, $mockApiContext, $mockPPRestCall);
+ $result = $obj->setBalance($currency, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -339,17 +339,17 @@ class AgreementTest extends \PHPUnit_Framework_TestCase
*/
public function testTransactions($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
AgreementTransactionsTest::getJson()
));
- $result = $obj->transactions("agreementId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->transactions("agreementId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/AgreementTransactionTest.php b/tests/PayPal/Test/Api/AgreementTransactionTest.php
index a59b61d..db10c5d 100644
--- a/tests/PayPal/Test/Api/AgreementTransactionTest.php
+++ b/tests/PayPal/Test/Api/AgreementTransactionTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementTransaction;
/**
diff --git a/tests/PayPal/Test/Api/AgreementTransactionsTest.php b/tests/PayPal/Test/Api/AgreementTransactionsTest.php
index 11457f0..71367f7 100644
--- a/tests/PayPal/Test/Api/AgreementTransactionsTest.php
+++ b/tests/PayPal/Test/Api/AgreementTransactionsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\AgreementTransactions;
/**
diff --git a/tests/PayPal/Test/Api/AuthorizationTest.php b/tests/PayPal/Test/Api/AuthorizationTest.php
index 111657c..2ba23c7 100644
--- a/tests/PayPal/Test/Api/AuthorizationTest.php
+++ b/tests/PayPal/Test/Api/AuthorizationTest.php
@@ -14,7 +14,7 @@ use PayPal\Api\CreditCard;
use PayPal\Api\Payment;
use PayPal\Api\FundingInstrument;
use PayPal\Api\Transaction;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
class AuthorizationTest extends \PHPUnit_Framework_TestCase
{
@@ -165,7 +165,7 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
} catch (\InvalidArgumentException $ex) {
$this->assertEquals($ex->getMessage(), "Id cannot be null");
}
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
$this->markTestSkipped(
'Tests failing because of intermittent failures in Paypal Sandbox environment.' . $ex->getMessage()
);
@@ -186,7 +186,7 @@ class AuthorizationTest extends \PHPUnit_Framework_TestCase
$authorization->setAmount($amount);
try {
$authorization->reauthorize();
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
//var_dump($ex->getMessage());
$this->assertEquals(strpos($ex->getMessage(), "500"), false);
}
diff --git a/tests/PayPal/Test/Api/BankAccountTest.php b/tests/PayPal/Test/Api/BankAccountTest.php
index dd8814b..1be51a7 100644
--- a/tests/PayPal/Test/Api/BankAccountTest.php
+++ b/tests/PayPal/Test/Api/BankAccountTest.php
@@ -2,10 +2,10 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\BankAccount;
/**
@@ -318,17 +318,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -337,17 +337,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
BankAccountTest::getJson()
));
- $result = $obj->get("bankAccountId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("bankAccountId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -356,17 +356,17 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -375,18 +375,18 @@ class BankAccountTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/BankAccountsListTest.php b/tests/PayPal/Test/Api/BankAccountsListTest.php
index 010498d..efc1889 100644
--- a/tests/PayPal/Test/Api/BankAccountsListTest.php
+++ b/tests/PayPal/Test/Api/BankAccountsListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BankAccountsList;
/**
diff --git a/tests/PayPal/Test/Api/BankTokenTest.php b/tests/PayPal/Test/Api/BankTokenTest.php
index e462af3..d26b158 100644
--- a/tests/PayPal/Test/Api/BankTokenTest.php
+++ b/tests/PayPal/Test/Api/BankTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BankToken;
/**
diff --git a/tests/PayPal/Test/Api/BillingInfoTest.php b/tests/PayPal/Test/Api/BillingInfoTest.php
index 2e02be2..6aeec9f 100644
--- a/tests/PayPal/Test/Api/BillingInfoTest.php
+++ b/tests/PayPal/Test/Api/BillingInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\BillingInfo;
/**
diff --git a/tests/PayPal/Test/Api/CancelNotificationTest.php b/tests/PayPal/Test/Api/CancelNotificationTest.php
index b3136e3..0c4590a 100644
--- a/tests/PayPal/Test/Api/CancelNotificationTest.php
+++ b/tests/PayPal/Test/Api/CancelNotificationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CancelNotification;
/**
diff --git a/tests/PayPal/Test/Api/CaptureTest.php b/tests/PayPal/Test/Api/CaptureTest.php
index 8cc8748..2a1fba3 100644
--- a/tests/PayPal/Test/Api/CaptureTest.php
+++ b/tests/PayPal/Test/Api/CaptureTest.php
@@ -5,7 +5,7 @@ use PayPal\Api\Capture;
use PayPal\Api\Refund;
use PayPal\Api\Authorization;
use PayPal\Api\Amount;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
use PayPal\Test\Constants;
class CaptureTest extends \PHPUnit_Framework_TestCase
@@ -91,7 +91,7 @@ class CaptureTest extends \PHPUnit_Framework_TestCase
$retund = $capture->refund($refund);
$this->assertNotNull($retund->getId());
- } catch (PPConnectionException $ex) {
+ } catch (PayPalConnectionException $ex) {
$this->markTestSkipped(
'Tests failing because of intermittent failures in Paypal Sandbox environment.' . $ex->getMessage()
);
diff --git a/tests/PayPal/Test/Api/ChargeModelTest.php b/tests/PayPal/Test/Api/ChargeModelTest.php
index be3e005..a20a625 100644
--- a/tests/PayPal/Test/Api/ChargeModelTest.php
+++ b/tests/PayPal/Test/Api/ChargeModelTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ChargeModel;
/**
diff --git a/tests/PayPal/Test/Api/CostTest.php b/tests/PayPal/Test/Api/CostTest.php
index dfd623c..6ca7228 100644
--- a/tests/PayPal/Test/Api/CostTest.php
+++ b/tests/PayPal/Test/Api/CostTest.php
@@ -2,8 +2,8 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\FormatConverter;
+use PayPal\Common\PayPalModel;
+use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
use PayPal\Api\Cost;
diff --git a/tests/PayPal/Test/Api/CreateProfileResponseTest.php b/tests/PayPal/Test/Api/CreateProfileResponseTest.php
index 5656eb6..7e8a51c 100644
--- a/tests/PayPal/Test/Api/CreateProfileResponseTest.php
+++ b/tests/PayPal/Test/Api/CreateProfileResponseTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreateProfileResponse;
/**
diff --git a/tests/PayPal/Test/Api/CreditCardListTest.php b/tests/PayPal/Test/Api/CreditCardListTest.php
index e3467cd..dd44684 100644
--- a/tests/PayPal/Test/Api/CreditCardListTest.php
+++ b/tests/PayPal/Test/Api/CreditCardListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreditCardList;
/**
diff --git a/tests/PayPal/Test/Api/CreditCardTest.php b/tests/PayPal/Test/Api/CreditCardTest.php
index a10b458..09adb7c 100644
--- a/tests/PayPal/Test/Api/CreditCardTest.php
+++ b/tests/PayPal/Test/Api/CreditCardTest.php
@@ -2,10 +2,10 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\CreditCard;
/**
@@ -192,17 +192,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -211,17 +211,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
CreditCardTest::getJson()
));
- $result = $obj->get("creditCardId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("creditCardId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -230,17 +230,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -249,17 +249,17 @@ class CreditCardTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/CreditCardTokenTest.php b/tests/PayPal/Test/Api/CreditCardTokenTest.php
index 24abf6e..de8facc 100644
--- a/tests/PayPal/Test/Api/CreditCardTokenTest.php
+++ b/tests/PayPal/Test/Api/CreditCardTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CreditCardToken;
/**
diff --git a/tests/PayPal/Test/Api/CreditTest.php b/tests/PayPal/Test/Api/CreditTest.php
index 419cb80..9aca208 100644
--- a/tests/PayPal/Test/Api/CreditTest.php
+++ b/tests/PayPal/Test/Api/CreditTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Credit;
/**
diff --git a/tests/PayPal/Test/Api/CurrencyTest.php b/tests/PayPal/Test/Api/CurrencyTest.php
index bb941d7..1b3254e 100644
--- a/tests/PayPal/Test/Api/CurrencyTest.php
+++ b/tests/PayPal/Test/Api/CurrencyTest.php
@@ -2,8 +2,8 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\FormatConverter;
+use PayPal\Common\PayPalModel;
+use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
use PayPal\Api\Currency;
diff --git a/tests/PayPal/Test/Api/CustomAmountTest.php b/tests/PayPal/Test/Api/CustomAmountTest.php
index a870479..7f971bc 100644
--- a/tests/PayPal/Test/Api/CustomAmountTest.php
+++ b/tests/PayPal/Test/Api/CustomAmountTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\CustomAmount;
/**
diff --git a/tests/PayPal/Test/Api/ErrorDetailsTest.php b/tests/PayPal/Test/Api/ErrorDetailsTest.php
index f49c199..aa7e678 100644
--- a/tests/PayPal/Test/Api/ErrorDetailsTest.php
+++ b/tests/PayPal/Test/Api/ErrorDetailsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ErrorDetails;
/**
diff --git a/tests/PayPal/Test/Api/ErrorTest.php b/tests/PayPal/Test/Api/ErrorTest.php
index 1270e27..744fa25 100644
--- a/tests/PayPal/Test/Api/ErrorTest.php
+++ b/tests/PayPal/Test/Api/ErrorTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Error;
/**
diff --git a/tests/PayPal/Test/Api/ExtendedBankAccountTest.php b/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
index 533006c..a2af11b 100644
--- a/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
+++ b/tests/PayPal/Test/Api/ExtendedBankAccountTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ExtendedBankAccount;
/**
diff --git a/tests/PayPal/Test/Api/FlowConfigTest.php b/tests/PayPal/Test/Api/FlowConfigTest.php
index 8df6953..50ca5d4 100644
--- a/tests/PayPal/Test/Api/FlowConfigTest.php
+++ b/tests/PayPal/Test/Api/FlowConfigTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\FlowConfig;
/**
diff --git a/tests/PayPal/Test/Api/FundingInstrumentTest.php b/tests/PayPal/Test/Api/FundingInstrumentTest.php
index 1844cd9..0e68360 100644
--- a/tests/PayPal/Test/Api/FundingInstrumentTest.php
+++ b/tests/PayPal/Test/Api/FundingInstrumentTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\FundingInstrument;
/**
diff --git a/tests/PayPal/Test/Api/HyperSchemaTest.php b/tests/PayPal/Test/Api/HyperSchemaTest.php
index 6a8a724..61dde52 100644
--- a/tests/PayPal/Test/Api/HyperSchemaTest.php
+++ b/tests/PayPal/Test/Api/HyperSchemaTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\HyperSchema;
/**
diff --git a/tests/PayPal/Test/Api/ImageTest.php b/tests/PayPal/Test/Api/ImageTest.php
index 7d93ad7..aa310f6 100644
--- a/tests/PayPal/Test/Api/ImageTest.php
+++ b/tests/PayPal/Test/Api/ImageTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Image;
/**
diff --git a/tests/PayPal/Test/Api/InputFieldsTest.php b/tests/PayPal/Test/Api/InputFieldsTest.php
index a19be98..8a84fa0 100644
--- a/tests/PayPal/Test/Api/InputFieldsTest.php
+++ b/tests/PayPal/Test/Api/InputFieldsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InputFields;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceAddressTest.php b/tests/PayPal/Test/Api/InvoiceAddressTest.php
index 109e08f..1e39684 100644
--- a/tests/PayPal/Test/Api/InvoiceAddressTest.php
+++ b/tests/PayPal/Test/Api/InvoiceAddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceAddress;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceItemTest.php b/tests/PayPal/Test/Api/InvoiceItemTest.php
index 28ee892..7daa1a5 100644
--- a/tests/PayPal/Test/Api/InvoiceItemTest.php
+++ b/tests/PayPal/Test/Api/InvoiceItemTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceItem;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php b/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
index d45effa..0d0365f 100644
--- a/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
+++ b/tests/PayPal/Test/Api/InvoiceSearchResponseTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\InvoiceSearchResponse;
/**
diff --git a/tests/PayPal/Test/Api/InvoiceTest.php b/tests/PayPal/Test/Api/InvoiceTest.php
index 41b1e3a..8d8c8e8 100644
--- a/tests/PayPal/Test/Api/InvoiceTest.php
+++ b/tests/PayPal/Test/Api/InvoiceTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\InvoiceSearchResponse;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Invoice;
/**
@@ -263,17 +263,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -282,18 +282,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testSearch($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceSearchResponseTest::getJson()
));
$search = SearchTest::getObject();
- $result = $obj->search($search, $mockApiContext, $mockPPRestCall);
+ $result = $obj->search($search, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -302,17 +302,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testSend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->send($mockApiContext, $mockPPRestCall);
+ $result = $obj->send($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -321,18 +321,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRemind($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$notification = NotificationTest::getObject();
- $result = $obj->remind($notification, $mockApiContext, $mockPPRestCall);
+ $result = $obj->remind($notification, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -341,18 +341,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testCancel($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$cancelNotification = CancelNotificationTest::getObject();
- $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPPRestCall);
+ $result = $obj->cancel($cancelNotification, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -361,18 +361,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRecordPayment($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$paymentDetail = PaymentDetailTest::getObject();
- $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPPRestCall);
+ $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -381,18 +381,18 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testRecordRefund($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$refundDetail = RefundDetailTest::getObject();
- $result = $obj->recordRefund($refundDetail, $mockApiContext, $mockPPRestCall);
+ $result = $obj->recordRefund($refundDetail, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -401,17 +401,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceTest::getJson()
));
- $result = $obj->get("invoiceId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("invoiceId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -420,17 +420,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
InvoiceSearchResponseTest::getJson()
));
- $result = $obj->getAll(array(), $mockApiContext, $mockPPRestCall);
+ $result = $obj->getAll(array(), $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -439,17 +439,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -458,17 +458,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -477,17 +477,17 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
*/
public function testQrCode($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
ImageTest::getJson()
));
- $result = $obj->qrCode("invoiceId", array(), $mockApiContext, $mockPPRestCall);
+ $result = $obj->qrCode("invoiceId", array(), $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/LinksTest.php b/tests/PayPal/Test/Api/LinksTest.php
index 793826e..07a5491 100644
--- a/tests/PayPal/Test/Api/LinksTest.php
+++ b/tests/PayPal/Test/Api/LinksTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Links;
/**
diff --git a/tests/PayPal/Test/Api/MerchantInfoTest.php b/tests/PayPal/Test/Api/MerchantInfoTest.php
index 11186e6..885577e 100644
--- a/tests/PayPal/Test/Api/MerchantInfoTest.php
+++ b/tests/PayPal/Test/Api/MerchantInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\MerchantInfo;
/**
diff --git a/tests/PayPal/Test/Api/MerchantPreferencesTest.php b/tests/PayPal/Test/Api/MerchantPreferencesTest.php
index f7b925e..0ae5987 100644
--- a/tests/PayPal/Test/Api/MerchantPreferencesTest.php
+++ b/tests/PayPal/Test/Api/MerchantPreferencesTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\MerchantPreferences;
/**
diff --git a/tests/PayPal/Test/Api/MetadataTest.php b/tests/PayPal/Test/Api/MetadataTest.php
index bce0d61..ff52a74 100644
--- a/tests/PayPal/Test/Api/MetadataTest.php
+++ b/tests/PayPal/Test/Api/MetadataTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Metadata;
/**
diff --git a/tests/PayPal/Test/Api/NotificationTest.php b/tests/PayPal/Test/Api/NotificationTest.php
index 8b9bebe..bc6fee1 100644
--- a/tests/PayPal/Test/Api/NotificationTest.php
+++ b/tests/PayPal/Test/Api/NotificationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Notification;
/**
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php b/tests/PayPal/Test/Api/OpenIdAddressTest.php
similarity index 77%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php
rename to tests/PayPal/Test/Api/OpenIdAddressTest.php
index 8875296..1079d34 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdAddressTest.php
+++ b/tests/PayPal/Test/Api/OpenIdAddressTest.php
@@ -1,14 +1,16 @@
setCountry("US")->setLocality("San Jose")
->setPostalCode("95112")->setRegion("CA")
->setStreetAddress("1, North 1'st street");
@@ -42,7 +44,7 @@ class PPOpenIdAddressTest extends \PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $addrCopy = new PPOpenIdAddress();
+ $addrCopy = new OpenIdAddress();
$addrCopy->fromJson($this->addr->toJson());
$this->assertEquals($this->addr, $addrCopy);
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php b/tests/PayPal/Test/Api/OpenIdErrorTest.php
similarity index 75%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php
rename to tests/PayPal/Test/Api/OpenIdErrorTest.php
index 635d329..1d938c3 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdErrorTest.php
+++ b/tests/PayPal/Test/Api/OpenIdErrorTest.php
@@ -1,15 +1,17 @@
error = new PPOpenIdError();
+ $this->error = new OpenIdError();
$this->error->setErrorDescription('error description')
->setErrorUri('http://developer.paypal.com/api/error')
->setError('VALIDATION_ERROR');
@@ -37,7 +39,7 @@ class PPOpenIdErrorTest extends PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $errorCopy = new PPOpenIdError();
+ $errorCopy = new OpenIdError();
$errorCopy->fromJson($this->error->toJson());
$this->assertEquals($this->error, $errorCopy);
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php b/tests/PayPal/Test/Api/OpenIdSessionTest.php
similarity index 75%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php
rename to tests/PayPal/Test/Api/OpenIdSessionTest.php
index 862a532..ee209f9 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdSessionTest.php
+++ b/tests/PayPal/Test/Api/OpenIdSessionTest.php
@@ -1,12 +1,15 @@
context = new \PayPal\Rest\ApiContext();
+ $this->context = new ApiContext();
$this->context->setConfig(
array(
'acct1.ClientId' => 'DummyId',
@@ -49,16 +52,16 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope");
$scope = array();
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid+profile+address+email+phone+" . urlencode("https://uri.paypal.com/services/paypalattributes") . "+" . urlencode('https://uri.paypal.com/services/expresscheckout') . "&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - default scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - default scope");
$scope = array('openid');
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - openid scope");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - openid scope");
}
/**
@@ -73,7 +76,7 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
$this->assertEquals($expectedBaseUrl . "?client_id=DummyId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
- PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config");
+ OpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config");
}
/**
@@ -88,6 +91,6 @@ class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession";
$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
- PPOpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
+ OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
}
}
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php b/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
similarity index 82%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php
rename to tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
index 54e90dc..e22f431 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdTokeninfoTest.php
+++ b/tests/PayPal/Test/Api/OpenIdTokeninfoTest.php
@@ -1,14 +1,16 @@
token = new PPOpenIdTokeninfo();
+ $this->token = new OpenIdTokeninfo();
$this->token->setAccessToken("Access token")
->setExpiresIn(900)
->setRefreshToken("Refresh token")
@@ -39,7 +41,7 @@ class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase
*/
public function testSerializationDeserialization()
{
- $tokenCopy = new PPOpenIdTokeninfo();
+ $tokenCopy = new OpenIdTokeninfo();
$tokenCopy->fromJson($this->token->toJson());
$this->assertEquals($this->token, $tokenCopy);
@@ -61,7 +63,7 @@ class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase
'client_id' => $clientId,
'client_secret' => $clientSecret
);
- $accessToken = PPOpenIdTokeninfo::createFromAuthorizationCode($params);
+ $accessToken = OpenIdTokeninfo::createFromAuthorizationCode($params);
$this->assertNotNull($accessToken);
$params = array(
diff --git a/tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php b/tests/PayPal/Test/Api/OpenIdUserinfoTest.php
similarity index 74%
rename from tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php
rename to tests/PayPal/Test/Api/OpenIdUserinfoTest.php
index 0775177..8c543b1 100644
--- a/tests/PayPal/Test/Auth/Openid/PPOpenIdUserinfoTest.php
+++ b/tests/PayPal/Test/Api/OpenIdUserinfoTest.php
@@ -1,11 +1,14 @@
setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01")
->setEmail("me@email.com")->setEmailVerified(true)
->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John")
@@ -41,9 +44,9 @@ class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase
->setSub("me@email.com")->setUserId("userId")
->setVerified(true)->setVerifiedAccount(true)
->setZoneinfo("America/PST")->setLanguage('en_US')
- ->setAddress(PPOpenIdAddressTest::getTestData());
+ ->setAddress(OpenIdAddressTest::getTestData());
- $userCopy = new PPOpenIdUserinfo();
+ $userCopy = new OpenIdUserinfo();
$userCopy->fromJson($user->toJSON());
$this->assertEquals($user, $userCopy);
@@ -54,7 +57,7 @@ class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase
*/
public function testInvalidParamUserInfoCall()
{
- $this->setExpectedException('PayPal\Exception\PPConnectionException');
- PPOpenIdUserinfo::getUserinfo(array('access_token' => 'accessToken'));
+ $this->setExpectedException('PayPal\Exception\PayPalConnectionException');
+ OpenIdUserinfo::getUserinfo(array('access_token' => 'accessToken'));
}
}
diff --git a/tests/PayPal/Test/Api/OverrideChargeModelTest.php b/tests/PayPal/Test/Api/OverrideChargeModelTest.php
index c12d22b..c2cd8e4 100644
--- a/tests/PayPal/Test/Api/OverrideChargeModelTest.php
+++ b/tests/PayPal/Test/Api/OverrideChargeModelTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\OverrideChargeModel;
/**
diff --git a/tests/PayPal/Test/Api/PatchRequestTest.php b/tests/PayPal/Test/Api/PatchRequestTest.php
index 6c40b6a..23decf7 100644
--- a/tests/PayPal/Test/Api/PatchRequestTest.php
+++ b/tests/PayPal/Test/Api/PatchRequestTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PatchRequest;
/**
diff --git a/tests/PayPal/Test/Api/PatchTest.php b/tests/PayPal/Test/Api/PatchTest.php
index b9f597c..633e726 100644
--- a/tests/PayPal/Test/Api/PatchTest.php
+++ b/tests/PayPal/Test/Api/PatchTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Patch;
/**
diff --git a/tests/PayPal/Test/Api/PayerInfoTest.php b/tests/PayPal/Test/Api/PayerInfoTest.php
index 49c00ef..2b9c765 100644
--- a/tests/PayPal/Test/Api/PayerInfoTest.php
+++ b/tests/PayPal/Test/Api/PayerInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PayerInfo;
/**
diff --git a/tests/PayPal/Test/Api/PayerTest.php b/tests/PayPal/Test/Api/PayerTest.php
index f56b32d..235583d 100644
--- a/tests/PayPal/Test/Api/PayerTest.php
+++ b/tests/PayPal/Test/Api/PayerTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Payer;
/**
diff --git a/tests/PayPal/Test/Api/PaymentCardTest.php b/tests/PayPal/Test/Api/PaymentCardTest.php
index 6317de8..564b7d2 100644
--- a/tests/PayPal/Test/Api/PaymentCardTest.php
+++ b/tests/PayPal/Test/Api/PaymentCardTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentCard;
/**
diff --git a/tests/PayPal/Test/Api/PaymentCardTokenTest.php b/tests/PayPal/Test/Api/PaymentCardTokenTest.php
index ffed8f5..132743a 100644
--- a/tests/PayPal/Test/Api/PaymentCardTokenTest.php
+++ b/tests/PayPal/Test/Api/PaymentCardTokenTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentCardToken;
/**
diff --git a/tests/PayPal/Test/Api/PaymentDefinitionTest.php b/tests/PayPal/Test/Api/PaymentDefinitionTest.php
index 3a05c76..74f0e89 100644
--- a/tests/PayPal/Test/Api/PaymentDefinitionTest.php
+++ b/tests/PayPal/Test/Api/PaymentDefinitionTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentDefinition;
/**
diff --git a/tests/PayPal/Test/Api/PaymentDetailTest.php b/tests/PayPal/Test/Api/PaymentDetailTest.php
index a01e533..f299c37 100644
--- a/tests/PayPal/Test/Api/PaymentDetailTest.php
+++ b/tests/PayPal/Test/Api/PaymentDetailTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentDetail;
/**
diff --git a/tests/PayPal/Test/Api/PaymentTermTest.php b/tests/PayPal/Test/Api/PaymentTermTest.php
index 0cd8e73..573af12 100644
--- a/tests/PayPal/Test/Api/PaymentTermTest.php
+++ b/tests/PayPal/Test/Api/PaymentTermTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PaymentTerm;
/**
diff --git a/tests/PayPal/Test/Api/PhoneTest.php b/tests/PayPal/Test/Api/PhoneTest.php
index 00ce876..9e7903c 100644
--- a/tests/PayPal/Test/Api/PhoneTest.php
+++ b/tests/PayPal/Test/Api/PhoneTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Phone;
/**
diff --git a/tests/PayPal/Test/Api/PlanListTest.php b/tests/PayPal/Test/Api/PlanListTest.php
index 7649bec..f0ca05f 100644
--- a/tests/PayPal/Test/Api/PlanListTest.php
+++ b/tests/PayPal/Test/Api/PlanListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\PlanList;
/**
diff --git a/tests/PayPal/Test/Api/PlanTest.php b/tests/PayPal/Test/Api/PlanTest.php
index d295086..e0edbbd 100644
--- a/tests/PayPal/Test/Api/PlanTest.php
+++ b/tests/PayPal/Test/Api/PlanTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Plan;
/**
@@ -140,17 +140,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanTest::getJson()
));
- $result = $obj->get("planId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("planId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -159,17 +159,17 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -178,18 +178,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -198,18 +198,18 @@ class PlanTest extends \PHPUnit_Framework_TestCase
*/
public function testList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
PlanListTest::getJson()
));
$params = ParamsTest::getObject();
- $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
+ $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/PresentationTest.php b/tests/PayPal/Test/Api/PresentationTest.php
index 26fdbd0..4603e20 100644
--- a/tests/PayPal/Test/Api/PresentationTest.php
+++ b/tests/PayPal/Test/Api/PresentationTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Presentation;
/**
diff --git a/tests/PayPal/Test/Api/RefundDetailTest.php b/tests/PayPal/Test/Api/RefundDetailTest.php
index 8de6252..3ff56b3 100644
--- a/tests/PayPal/Test/Api/RefundDetailTest.php
+++ b/tests/PayPal/Test/Api/RefundDetailTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\RefundDetail;
/**
diff --git a/tests/PayPal/Test/Api/SaleTest.php b/tests/PayPal/Test/Api/SaleTest.php
index c51e044..79972e0 100644
--- a/tests/PayPal/Test/Api/SaleTest.php
+++ b/tests/PayPal/Test/Api/SaleTest.php
@@ -7,7 +7,7 @@ use PayPal\Test\Constants;
use PayPal\Test\Api\AmountTest;
use PayPal\Test\Api\PaymentTest;
use PayPal\Test\Api\LinksTest;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConnectionException;
class SaleTest extends \PHPUnit_Framework_TestCase
{
diff --git a/tests/PayPal/Test/Api/SearchTest.php b/tests/PayPal/Test/Api/SearchTest.php
index 30aac6a..ce8ec2a 100644
--- a/tests/PayPal/Test/Api/SearchTest.php
+++ b/tests/PayPal/Test/Api/SearchTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Search;
/**
diff --git a/tests/PayPal/Test/Api/ShippingAddressTest.php b/tests/PayPal/Test/Api/ShippingAddressTest.php
index 7634bd8..37d729b 100644
--- a/tests/PayPal/Test/Api/ShippingAddressTest.php
+++ b/tests/PayPal/Test/Api/ShippingAddressTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingAddress;
/**
diff --git a/tests/PayPal/Test/Api/ShippingCostTest.php b/tests/PayPal/Test/Api/ShippingCostTest.php
index ed3fbf8..3dca5ff 100644
--- a/tests/PayPal/Test/Api/ShippingCostTest.php
+++ b/tests/PayPal/Test/Api/ShippingCostTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingCost;
/**
diff --git a/tests/PayPal/Test/Api/ShippingInfoTest.php b/tests/PayPal/Test/Api/ShippingInfoTest.php
index df3b72a..4d22b27 100644
--- a/tests/PayPal/Test/Api/ShippingInfoTest.php
+++ b/tests/PayPal/Test/Api/ShippingInfoTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\ShippingInfo;
/**
diff --git a/tests/PayPal/Test/Api/TaxTest.php b/tests/PayPal/Test/Api/TaxTest.php
index 48d62ed..8650b51 100644
--- a/tests/PayPal/Test/Api/TaxTest.php
+++ b/tests/PayPal/Test/Api/TaxTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Tax;
/**
diff --git a/tests/PayPal/Test/Api/TermsTest.php b/tests/PayPal/Test/Api/TermsTest.php
index 6ab14cb..f2ecd58 100644
--- a/tests/PayPal/Test/Api/TermsTest.php
+++ b/tests/PayPal/Test/Api/TermsTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\Terms;
/**
diff --git a/tests/PayPal/Test/Api/WebProfileTest.php b/tests/PayPal/Test/Api/WebProfileTest.php
index 9adf308..2383638 100644
--- a/tests/PayPal/Test/Api/WebProfileTest.php
+++ b/tests/PayPal/Test/Api/WebProfileTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\CreateProfileResponse;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -110,17 +110,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
CreateProfileResponseTest::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -129,17 +129,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->update($mockApiContext, $mockPPRestCall);
+ $result = $obj->update($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -148,18 +148,18 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testPartialUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
$patch = array(PatchTest::getObject());
- $result = $obj->partial_update($patch, $mockApiContext, $mockPPRestCall);
+ $result = $obj->partial_update($patch, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -168,17 +168,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebProfileTest::getJson()
));
- $result = $obj->get("profileId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("profileId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -187,17 +187,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
json_encode(array(json_decode(WebProfileTest::getJson())))
));
- $result = $obj->get_list($mockApiContext, $mockPPRestCall);
+ $result = $obj->get_list($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -206,17 +206,17 @@ class WebProfileTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookEventListTest.php b/tests/PayPal/Test/Api/WebhookEventListTest.php
index 759735b..82c5703 100644
--- a/tests/PayPal/Test/Api/WebhookEventListTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookEventList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookEventTest.php b/tests/PayPal/Test/Api/WebhookEventTest.php
index d009203..12212b5 100644
--- a/tests/PayPal/Test/Api/WebhookEventTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebhookEvent;
/**
@@ -123,17 +123,17 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTest::getJson()
));
- $result = $obj->get("eventId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -142,17 +142,17 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testResend($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->resend($mockApiContext, $mockPPRestCall);
+ $result = $obj->resend($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -161,18 +161,18 @@ class WebhookEventTest extends \PHPUnit_Framework_TestCase
*/
public function testList($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventListTest::getJson()
));
$params = array();
- $result = $obj->all($params, $mockApiContext, $mockPPRestCall);
+ $result = $obj->all($params, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookEventTypeListTest.php b/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
index b2cc342..9382c8f 100644
--- a/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTypeListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookEventTypeList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookEventTypeTest.php b/tests/PayPal/Test/Api/WebhookEventTypeTest.php
index c311f48..b1202fe 100644
--- a/tests/PayPal/Test/Api/WebhookEventTypeTest.php
+++ b/tests/PayPal/Test/Api/WebhookEventTypeTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebhookEventType;
/**
@@ -86,17 +86,17 @@ class WebhookEventTypeTest extends \PHPUnit_Framework_TestCase
*/
public function testSubscribedEventTypes($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTypeListTest::getJson()
));
- $result = $obj->subscribedEventTypes("webhookId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->subscribedEventTypes("webhookId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -105,17 +105,17 @@ class WebhookEventTypeTest extends \PHPUnit_Framework_TestCase
*/
public function testAvailableEventTypes($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookEventTypeListTest::getJson()
));
- $result = $obj->availableEventTypes($mockApiContext, $mockPPRestCall);
+ $result = $obj->availableEventTypes($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Api/WebhookListTest.php b/tests/PayPal/Test/Api/WebhookListTest.php
index 74ab8b6..ae94e15 100644
--- a/tests/PayPal/Test/Api/WebhookListTest.php
+++ b/tests/PayPal/Test/Api/WebhookListTest.php
@@ -2,7 +2,7 @@
namespace PayPal\Test\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Api\WebhookList;
/**
diff --git a/tests/PayPal/Test/Api/WebhookTest.php b/tests/PayPal/Test/Api/WebhookTest.php
index e849d77..35d9255 100644
--- a/tests/PayPal/Test/Api/WebhookTest.php
+++ b/tests/PayPal/Test/Api/WebhookTest.php
@@ -2,11 +2,11 @@
namespace PayPal\Test\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\Webhook;
/**
@@ -108,17 +108,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testCreate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
- $result = $obj->create($mockApiContext, $mockPPRestCall);
+ $result = $obj->create($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -127,17 +127,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookTest::getJson()
));
- $result = $obj->get("webhookId", $mockApiContext, $mockPPRestCall);
+ $result = $obj->get("webhookId", $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -146,17 +146,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
WebhookListTest::getJson()
));
- $result = $obj->getAll($mockApiContext, $mockPPRestCall);
+ $result = $obj->getAll($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -165,18 +165,18 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testUpdate($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
self::getJson()
));
$patchRequest = PatchRequestTest::getObject();
- $result = $obj->update($patchRequest, $mockApiContext, $mockPPRestCall);
+ $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
/**
@@ -185,17 +185,17 @@ class WebhookTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($obj, $mockApiContext)
{
- $mockPPRestCall = $this->getMockBuilder('\PayPal\Transport\PPRestCall')
+ $mockPayPalRestCall = $this->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $mockPPRestCall->expects($this->any())
+ $mockPayPalRestCall->expects($this->any())
->method('execute')
->will($this->returnValue(
true
));
- $result = $obj->delete($mockApiContext, $mockPPRestCall);
+ $result = $obj->delete($mockApiContext, $mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php b/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
index d28313e..b68fa7a 100644
--- a/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
+++ b/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
@@ -1,38 +1,38 @@
-getConfigHashmap();
- $token = $cred->getAccessToken($config);
- $this->assertNotNull($token);
-
- // Check that we get the same token when issuing a new call before token expiry
- $newToken = $cred->getAccessToken($config);
- $this->assertNotNull($newToken);
- $this->assertEquals($token, $newToken);
- }
-
- /**
- * @group integration
- */
- public function testInvalidCredentials()
- {
- $this->setExpectedException('PayPal\Exception\PPConnectionException');
- $cred = new OAuthTokenCredential('dummy', 'secret');
- $this->assertNull($cred->getAccessToken(PPConfigManager::getInstance()->getConfigHashmap()));
- }
-}
\ No newline at end of file
+getConfigHashmap();
+ $token = $cred->getAccessToken($config);
+ $this->assertNotNull($token);
+
+ // Check that we get the same token when issuing a new call before token expiry
+ $newToken = $cred->getAccessToken($config);
+ $this->assertNotNull($newToken);
+ $this->assertEquals($token, $newToken);
+ }
+
+ /**
+ * @group integration
+ */
+ public function testInvalidCredentials()
+ {
+ $this->setExpectedException('PayPal\Exception\PayPalConnectionException');
+ $cred = new OAuthTokenCredential('dummy', 'secret');
+ $this->assertNull($cred->getAccessToken(PayPalConfigManager::getInstance()->getConfigHashmap()));
+ }
+}
diff --git a/tests/PayPal/Test/Common/ArrayClass.php b/tests/PayPal/Test/Common/ArrayClass.php
index 1cada16..2b589c2 100644
--- a/tests/PayPal/Test/Common/ArrayClass.php
+++ b/tests/PayPal/Test/Common/ArrayClass.php
@@ -1,9 +1,9 @@
tags;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/ArrayUtilTest.php b/tests/PayPal/Test/Common/ArrayUtilTest.php
index 84926f2..0c353b0 100644
--- a/tests/PayPal/Test/Common/ArrayUtilTest.php
+++ b/tests/PayPal/Test/Common/ArrayUtilTest.php
@@ -1,24 +1,24 @@
-assertEquals(false, PPArrayUtil::isAssocArray($arr));
-
- $arr = array(
- 'name' => 'John Doe',
- 'City' => 'San Jose'
- );
- $this->assertEquals(true, PPArrayUtil::isAssocArray($arr));
-
- $arr[] = 'CA';
- $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));
- }
-}
+assertEquals(false, ArrayUtil::isAssocArray($arr));
+
+ $arr = array(
+ 'name' => 'John Doe',
+ 'City' => 'San Jose'
+ );
+ $this->assertEquals(true, ArrayUtil::isAssocArray($arr));
+
+ $arr[] = 'CA';
+ $this->assertEquals(false, ArrayUtil::isAssocArray($arr));
+ }
+}
diff --git a/tests/PayPal/Test/Common/ChildClass.php b/tests/PayPal/Test/Common/ChildClass.php
index d12e072..0443857 100644
--- a/tests/PayPal/Test/Common/ChildClass.php
+++ b/tests/PayPal/Test/Common/ChildClass.php
@@ -1,9 +1,9 @@
invalid = "value2";
$this->assertEquals($obj->invalid, "value2");
- if (PPConfigManager::getInstance()->get('validation.level') == 'strict') {
+ if (PayPalConfigManager::getInstance()->get('validation.level') == 'strict') {
$this->fail("It should have thrown a Notice Error");
}
} catch (\PHPUnit_Framework_Error_Notice $ex) {
@@ -100,7 +100,7 @@ class ModelTest extends \PHPUnit_Framework_TestCase
public function testInvalidMagicMethodWithDisabledValidation()
{
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'disabled'));
$obj = new SimpleClass();
try {
$obj->invalid = "value2";
@@ -108,16 +108,16 @@ class ModelTest extends \PHPUnit_Framework_TestCase
} catch (\PHPUnit_Framework_Error_Notice $ex) {
$this->fail("It should not have thrown a Notice Error as it is disabled.");
}
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
}
public function testInvalidMagicMethodWithValidationLevel()
{
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'log'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'log'));
$obj = new SimpleClass();
$obj->invalid2 = "value2";
$this->assertEquals($obj->invalid2, "value2");
- PPConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
+ PayPalConfigManager::getInstance()->addConfigs(array('validation.level' => 'strict'));
}
public function testArrayClassConversion()
diff --git a/tests/PayPal/Test/Common/NestedClass.php b/tests/PayPal/Test/Common/NestedClass.php
index ed9a0b4..01be928 100644
--- a/tests/PayPal/Test/Common/NestedClass.php
+++ b/tests/PayPal/Test/Common/NestedClass.php
@@ -1,9 +1,9 @@
info;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/PPModelTest.php b/tests/PayPal/Test/Common/PayPalModelTest.php
similarity index 94%
rename from tests/PayPal/Test/Common/PPModelTest.php
rename to tests/PayPal/Test/Common/PayPalModelTest.php
index d31b1bc..ccb20f6 100644
--- a/tests/PayPal/Test/Common/PPModelTest.php
+++ b/tests/PayPal/Test/Common/PayPalModelTest.php
@@ -1,8 +1,8 @@
assertEquals($parent, $parentCopy);
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/SimpleClass.php b/tests/PayPal/Test/Common/SimpleClass.php
index debb0e8..4eb49ff 100644
--- a/tests/PayPal/Test/Common/SimpleClass.php
+++ b/tests/PayPal/Test/Common/SimpleClass.php
@@ -1,9 +1,9 @@
description;
}
-}
\ No newline at end of file
+}
diff --git a/tests/PayPal/Test/Common/UserAgentTest.php b/tests/PayPal/Test/Common/UserAgentTest.php
index 1823249..a9f6566 100644
--- a/tests/PayPal/Test/Common/UserAgentTest.php
+++ b/tests/PayPal/Test/Common/UserAgentTest.php
@@ -1,28 +1,28 @@
-assertNotNull($id);
- $this->assertNotNull($version);
- $this->assertNotNull($features);
-
- $this->assertEquals("name", $id);
- $this->assertEquals("version", $version);
-
- // Check that we pass in these mininal features
- $this->assertThat($features, $this->stringContains("OS="));
- $this->assertThat($features, $this->stringContains("Bit="));
- $this->assertThat($features, $this->stringContains("Lang="));
- $this->assertThat($features, $this->stringContains("V="));
- $this->assertGreaterThan(5, count(explode(';', $features)));
- }
-}
\ No newline at end of file
+assertNotNull($id);
+ $this->assertNotNull($version);
+ $this->assertNotNull($features);
+
+ $this->assertEquals("name", $id);
+ $this->assertEquals("version", $version);
+
+ // Check that we pass in these mininal features
+ $this->assertThat($features, $this->stringContains("OS="));
+ $this->assertThat($features, $this->stringContains("Bit="));
+ $this->assertThat($features, $this->stringContains("Lang="));
+ $this->assertThat($features, $this->stringContains("V="));
+ $this->assertGreaterThan(5, count(explode(';', $features)));
+ }
+}
diff --git a/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped b/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
index fbada20..1f30eaf 100644
--- a/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
+++ b/tests/PayPal/Test/Core/PPConfigManagerTest.php.skipped
@@ -1,10 +1,10 @@
object = new \ReflectionClass('PayPal\Core\PPConfigManager');
+ $this->object = new \ReflectionClass('PayPal\Core\PayPalConfigManager');
runkit_constant_remove('PP_CONFIG_PATH');
}
@@ -32,10 +32,10 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGetInstance()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$instance = $this->object->getInstance();
$instance2 = $this->object->getInstance();
- $this->assertTrue($instance instanceof PPConfigManager);
+ $this->assertTrue($instance instanceof PayPalConfigManager);
$this->assertSame($instance, $instance2);
}
@@ -43,7 +43,7 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGet()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$ret = $this->object->get('acct2');
$this->assertConfiguration(
array('acct2.ClientId' => 'TestClientId', 'acct2.ClientSecret' => 'TestClientSecret'),
@@ -57,7 +57,7 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testGetIniPrefix()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
$ret = $this->object->getIniPrefix();
$this->assertContains('acct1', $ret);
@@ -71,10 +71,10 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testConfigByDefault()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
// Test file based config params and defaults
- $config = PPConfigManager::getInstance()->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->getConfigHashmap();
$this->assertConfiguration(array('mode' => 'sandbox', 'http.ConnectionTimeOut' => '60'), $config);
}
@@ -82,25 +82,25 @@ class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
public function testConfigByCustom()
{
define("PP_CONFIG_PATH", dirname(dirname(dirname(__DIR__))));
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
// Test custom config params and defaults
- $config = PPConfigManager::getInstance()->addConfigs(array('mode' => 'custom', 'http.ConnectionTimeOut' => 900))->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->addConfigs(array('mode' => 'custom', 'http.ConnectionTimeOut' => 900))->getConfigHashmap();
$this->assertConfiguration(array('mode' => 'custom', 'http.ConnectionTimeOut' => '900'), $config);
}
public function testConfigByFileAndCustom() {
define("PP_CONFIG_PATH", __DIR__. '/non_existent/');
- $this->object = PPConfigManager::getInstance();
+ $this->object = PayPalConfigManager::getInstance();
- $config = PPConfigManager::getInstance()->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->getConfigHashmap();
$this->assertArrayHasKey('http.ConnectionTimeOut', $config);
$this->assertEquals('30', $config['http.ConnectionTimeOut']);
$this->assertEquals('5', $config['http.Retry']);
//Add more configs
- $config = PPConfigManager::getInstance()->addConfigs(array('http.Retry' => "10", 'mode' => 'sandbox'))->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->addConfigs(array('http.Retry' => "10", 'mode' => 'sandbox'))->getConfigHashmap();
$this->assertConfiguration(array('http.ConnectionTimeOut' => "30", 'http.Retry' => "10", 'mode' => 'sandbox'), $config);
}
diff --git a/tests/PayPal/Test/Core/PPCredentialManagerTest.php b/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
similarity index 86%
rename from tests/PayPal/Test/Core/PPCredentialManagerTest.php
rename to tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
index 4d32045..6c93cc1 100644
--- a/tests/PayPal/Test/Core/PPCredentialManagerTest.php
+++ b/tests/PayPal/Test/Core/PayPalCredentialManagerTest.php
@@ -1,15 +1,15 @@
object = PPCredentialManager::getInstance($this->config);
+ $this->object = PayPalCredentialManager::getInstance($this->config);
}
/**
@@ -51,7 +51,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
public function testGetInstance()
{
$instance = $this->object->getInstance($this->config);
- $this->assertTrue($instance instanceof PPCredentialManager);
+ $this->assertTrue($instance instanceof PayPalCredentialManager);
}
/**
@@ -68,7 +68,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObject()
{
@@ -84,7 +84,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObjectWithUserId()
{
@@ -99,7 +99,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
/**
* @after testGetDefaultCredentialObject
*
- * @throws \PayPal\Exception\PPInvalidCredentialException
+ * @throws \PayPal\Exception\PayPalInvalidCredentialException
*/
public function testSetCredentialObjectWithoutDefault()
{
@@ -117,7 +117,7 @@ class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
*/
public function testGetInvalidCredentialObject()
{
- $this->setExpectedException('PayPal\Exception\PPInvalidCredentialException');
+ $this->setExpectedException('PayPal\Exception\PayPalInvalidCredentialException');
$cred = $this->object->getCredentialObject('invalid_biz_api1.gmail.com');
}
diff --git a/tests/PayPal/Test/Core/PPHttpConfigTest.php b/tests/PayPal/Test/Core/PayPalHttpConfigTest.php
similarity index 86%
rename from tests/PayPal/Test/Core/PPHttpConfigTest.php
rename to tests/PayPal/Test/Core/PayPalHttpConfigTest.php
index e55d160..44b0eeb 100644
--- a/tests/PayPal/Test/Core/PPHttpConfigTest.php
+++ b/tests/PayPal/Test/Core/PayPalHttpConfigTest.php
@@ -2,13 +2,13 @@
namespace PayPal\Test\Core;
-use PayPal\Core\PPHttpConfig;
+use PayPal\Core\PayPalHttpConfig;
/**
- * Test class for PPAPIService.
+ * Test class for PayPalHttpConfigTest.
*
*/
-class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
+class PayPalHttpConfigTest extends \PHPUnit_Framework_TestCase
{
protected $object;
@@ -40,7 +40,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
*/
public function testHeaderFunctions()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->addHeader('key1', 'value1');
$o->addHeader('key2', 'value');
$o->addHeader('key2', 'overwritten');
@@ -49,7 +49,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('overwritten', $o->getHeader('key2'));
$this->assertNull($o->getHeader('key3'));
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->addHeader('key1', 'value1');
$o->addHeader('key2', 'value');
$o->addHeader('key2', 'and more', false);
@@ -67,7 +67,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
*/
public function testCurlOpts()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setCurlOptions(array('k' => 'v'));
$curlOpts = $o->getCurlOptions();
@@ -77,7 +77,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
public function testRemoveCurlOpts()
{
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setCurlOptions(array('k' => 'v'));
$curlOpts = $o->getCurlOptions();
$this->assertEquals(1, count($curlOpts));
@@ -94,7 +94,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
public function testUserAgent()
{
$ua = 'UAString';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setUserAgent($ua);
$curlOpts = $o->getCurlOptions();
@@ -109,7 +109,7 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
$sslCert = '../cacert.pem';
$sslPass = 'passPhrase';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setSSLCert($sslCert, $sslPass);
$curlOpts = $o->getCurlOptions();
@@ -124,14 +124,14 @@ class PPHttpConfigTest extends \PHPUnit_Framework_TestCase
{
$proxy = 'http://me:secret@hostname:8081';
- $o = new PPHttpConfig();
+ $o = new PayPalHttpConfig();
$o->setHttpProxy($proxy);
$curlOpts = $o->getCurlOptions();
$this->assertEquals('hostname:8081', $curlOpts[CURLOPT_PROXY]);
$this->assertEquals('me:secret', $curlOpts[CURLOPT_PROXYUSERPWD]);
- $this->setExpectedException('PayPal\Exception\PPConfigurationException');
+ $this->setExpectedException('PayPal\Exception\PayPalConfigurationException');
$o->setHttpProxy('invalid string');
}
}
diff --git a/tests/PayPal/Test/Core/PPLoggingManagerTest.php b/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
similarity index 78%
rename from tests/PayPal/Test/Core/PPLoggingManagerTest.php
rename to tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
index 28b2084..e5a83db 100644
--- a/tests/PayPal/Test/Core/PPLoggingManagerTest.php
+++ b/tests/PayPal/Test/Core/PayPalLoggingManagerTest.php
@@ -1,14 +1,14 @@
object = PPLoggingManager::getInstance('InvoiceTest');
+ $this->object = PayPalLoggingManager::getInstance('InvoiceTest');
}
/**
diff --git a/tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php b/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
similarity index 55%
rename from tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
index 36bd2d2..c6067af 100644
--- a/tests/PayPal/Test/Exception/PPConfigurationExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalConfigurationExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPConfigurationException('Test PPConfigurationException');
+ $this->object = new PayPalConfigurationException('Test PayPalConfigurationException');
}
/**
@@ -31,7 +31,7 @@ class PPConfigurationExceptionTest extends \PHPUnit_Framework_TestCase
public function testPPConfigurationException()
{
- $this->assertEquals('Test PPConfigurationException', $this->object->getMessage());
+ $this->assertEquals('Test PayPalConfigurationException', $this->object->getMessage());
}
}
diff --git a/tests/PayPal/Test/Exception/PPConnectionExceptionTest.php b/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
similarity index 73%
rename from tests/PayPal/Test/Exception/PPConnectionExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
index 79b7264..f64470a 100644
--- a/tests/PayPal/Test/Exception/PPConnectionExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalConnectionExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPConnectionException('http://testURL', 'test message');
+ $this->object = new PayPalConnectionException('http://testURL', 'test message');
$this->object->setData('response payload for connection');
}
diff --git a/tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php b/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
similarity index 67%
rename from tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
index 2b352a0..93d51e1 100644
--- a/tests/PayPal/Test/Exception/PPMissingCredentialExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalInvalidCredentialExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPMissingCredentialException;
+ $this->object = new PayPalInvalidCredentialException;
}
/**
diff --git a/tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php b/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
similarity index 67%
rename from tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php
rename to tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
index 9e45ed2..6892f20 100644
--- a/tests/PayPal/Test/Exception/PPInvalidCredentialExceptionTest.php
+++ b/tests/PayPal/Test/Exception/PayPalMissingCredentialExceptionTest.php
@@ -1,14 +1,14 @@
object = new PPInvalidCredentialException;
+ $this->object = new PayPalMissingCredentialException;
}
/**
diff --git a/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php b/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
index 15a1106..ca41177 100644
--- a/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/BillingAgreementsFunctionalTest.php
@@ -8,12 +8,12 @@ use PayPal\Api\Currency;
use PayPal\Api\Patch;
use PayPal\Api\PatchRequest;
use PayPal\Api\Plan;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -28,7 +28,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -67,7 +67,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$agreement = new Agreement($request);
// Update the Schema to use a working Plan
$agreement->getPlan()->setId($plan->getId());
- $result = $agreement->create(null, $this->mockPPRestCall);
+ $result = $agreement->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -88,7 +88,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$paymentToken = $result['token'];
$this->assertNotNull($paymentToken);
$this->assertNotEmpty($paymentToken);
- $result = $agreement->execute($paymentToken, null, $this->mockPPRestCall);
+ $result = $agreement->execute($paymentToken, null, $this->mockPayPalRestCall);
return $result;
}
@@ -102,7 +102,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$agreement = new Agreement($request);
// Update the Schema to use a working Plan
$agreement->getPlan()->setId($plan->getId());
- $result = $agreement->create(null, $this->mockPPRestCall);
+ $result = $agreement->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -114,7 +114,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($agreement)
{
- $result = Agreement::get($agreement->getId(), null, $this->mockPPRestCall);
+ $result = Agreement::get($agreement->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($agreement->getId(), $result->getId());
return $result;
@@ -136,7 +136,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $agreement->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $agreement->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -149,7 +149,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$this->markTestSkipped('Skipped as the fix is on the way.');
$currency = new Currency($this->operation['request']['body']);
- $result = $agreement->setBalance($currency, null, $this->mockPPRestCall);
+ $result = $agreement->setBalance($currency, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
return $agreement;
}
@@ -163,7 +163,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$this->markTestSkipped('Skipped as the fix is on the way.');
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->billBalance($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->billBalance($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
return $agreement;
}
@@ -176,7 +176,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testGetTransactions($agreement)
{
$this->markTestSkipped('Skipped as the fix is on the way.');
- $result = Agreement::transactions($agreement->getId(), null, $this->mockPPRestCall);
+ $result = Agreement::transactions($agreement->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -188,7 +188,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testSuspend($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->suspend($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->suspend($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->setupTest($this->getClassName(), 'testGetSuspended');
$get = $this->testGet($agreement);
$this->assertTrue($result);
@@ -204,7 +204,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testReactivate($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->reActivate($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->reActivate($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
$this->setupTest($this->getClassName(), 'testGet');
$get = $this->testGet($agreement);
@@ -220,7 +220,7 @@ class BillingAgreementsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testCancel($agreement)
{
$agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
- $result = $agreement->cancel($agreementStateDescriptor, null, $this->mockPPRestCall);
+ $result = $agreement->cancel($agreementStateDescriptor, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
$this->setupTest($this->getClassName(), 'testGetCancelled');
$get = $this->testGet($agreement);
diff --git a/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php b/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
index a3276f0..96af52f 100644
--- a/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/BillingPlansFunctionalTest.php
@@ -6,13 +6,13 @@ use PayPal\Api\Patch;
use PayPal\Api\PatchRequest;
use PayPal\Api\Plan;
use PayPal\Auth\OAuthTokenCredential;
-use PayPal\Common\PPModel;
-use PayPal\Core\PPCredentialManager;
+use PayPal\Common\PayPalModel;
+use PayPal\Core\PayPalCredentialManager;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -31,7 +31,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
public $mode = 'mock';
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public $context;
@@ -86,7 +86,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Plan($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
self::$obj = $result;
return $result;
@@ -96,7 +96,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Plan($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -108,7 +108,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($plan)
{
- $result = Plan::get($plan->getId(), null, $this->mockPPRestCall);
+ $result = Plan::get($plan->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($plan->getId(), $result->getId());
$this->assertEquals($plan, $result, "", 0, 10, true);
@@ -121,7 +121,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($plan)
{
- $result = Plan::all(array('page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Plan::all(array('page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$totalPages = $result->getTotalPages();
$found = false;
@@ -135,7 +135,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
}
}
if (!$found) {
- $result = Plan::all(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Plan::all(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
}
} while ($totalPages > 0 && $found == false);
@@ -160,7 +160,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -181,7 +181,7 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -202,8 +202,8 @@ class BillingPlansFunctionalTest extends \PHPUnit_Framework_TestCase
$patches[] = $patch;
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $plan->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $plan->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
- return Plan::get($plan->getId(), null, $this->mockPPRestCall);
+ return Plan::get($plan->getId(), null, $this->mockPayPalRestCall);
}
}
diff --git a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
index 05fd99d..546c822 100644
--- a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php
@@ -23,7 +23,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -58,7 +58,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Invoice($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
self::$obj = $result;
return $result;
@@ -71,7 +71,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($invoice)
{
- $result = Invoice::get($invoice->getId(), null, $this->mockPPRestCall);
+ $result = Invoice::get($invoice->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($invoice->getId(), $result->getId());
return $result;
@@ -84,7 +84,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testSend($invoice)
{
- $result = $invoice->send(null, $this->mockPPRestCall);
+ $result = $invoice->send(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $invoice;
}
@@ -97,7 +97,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
public function testUpdate($invoice)
{
$this->markTestSkipped('Skipped as the fix is on the way. #PPTIPS-1932');
- $result = $invoice->update(null, $this->mockPPRestCall);
+ $result = $invoice->update(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($invoice->getId(), $result->getId());
}
@@ -109,7 +109,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($invoice)
{
- $result = Invoice::getAll(array('page_size' => '20', 'total_count_required' => 'true'), null, $this->mockPPRestCall);
+ $result = Invoice::getAll(array('page_size' => '20', 'total_count_required' => 'true'), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getTotalCount());
$totalPages = ceil($result->getTotalCount()/20);
@@ -124,7 +124,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
}
}
if (!$found) {
- $result = Invoice::getAll(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPPRestCall);
+ $result = Invoice::getAll(array('page' => --$totalPages, 'page_size' => '20', 'total_required' => 'yes'), null, $this->mockPayPalRestCall);
}
} while ($totalPages > 0 && $found == false);
@@ -141,7 +141,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$search = new Search($request);
- $result = Invoice::search($search, null, $this->mockPPRestCall);
+ $result = Invoice::search($search, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getTotalCount());
}
@@ -155,7 +155,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$notification = new Notification($request);
- $result = $invoice->remind($notification, null, $this->mockPPRestCall);
+ $result = $invoice->remind($notification, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -168,7 +168,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$notification = new CancelNotification($request);
- $result = $invoice->cancel($notification, null, $this->mockPPRestCall);
+ $result = $invoice->cancel($notification, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
@@ -179,7 +179,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testQRCode($invoice)
{
- $result = Invoice::qrCode($invoice->getId(), array(), null, $this->mockPPRestCall);
+ $result = Invoice::qrCode($invoice->getId(), array(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertNotNull($result->getImage());
}
@@ -198,7 +198,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
$this->setupTest($this->getClassName(), 'testRecordPayment');
$request = $this->operation['request']['body'];
$paymentDetail = new PaymentDetail($request);
- $result = $invoice->recordPayment($paymentDetail, null, $this->mockPPRestCall);
+ $result = $invoice->recordPayment($paymentDetail, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $invoice;
}
@@ -213,7 +213,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$refundDetail = new RefundDetail($request);
- $result = $invoice->recordRefund($refundDetail, null, $this->mockPPRestCall);
+ $result = $invoice->recordRefund($refundDetail, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->setupTest($this->getClassName(), 'testDelete');
$invoice = $this->testDelete($invoice);
@@ -230,7 +230,7 @@ class InvoiceFunctionalTest extends \PHPUnit_Framework_TestCase
$this->setupTest($this->getClassName(), 'testCreate');
$invoice = $this->testCreate($invoice);
$this->setupTest($this->getClassName(), 'testDelete');
- $result = $invoice->delete(null, $this->mockPPRestCall);
+ $result = $invoice->delete(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
}
diff --git a/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php b/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
index 09abb58..7889862 100644
--- a/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/PaymentsFunctionalTest.php
@@ -9,12 +9,12 @@ use PayPal\Api\Payment;
use PayPal\Api\PaymentExecution;
use PayPal\Api\Refund;
use PayPal\Api\Sale;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -29,7 +29,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -57,7 +57,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Payment($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -66,7 +66,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
{
$request = $this->operation['request']['body'];
$obj = new Payment($request);
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -78,7 +78,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($payment)
{
- $result = Payment::get($payment->getId(), null, $this->mockPPRestCall);
+ $result = Payment::get($payment->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($payment->getId(), $result->getId());
$this->assertEquals($payment, $result, "", 0, 10, true);
@@ -96,7 +96,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
$transaction = $transactions[0];
$relatedResources = $transaction->getRelatedResources();
$resource = $relatedResources[0];
- $result = Sale::get($resource->getSale()->getId(), null, $this->mockPPRestCall);
+ $result = Sale::get($resource->getSale()->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($resource->getSale()->getId(), $result->getId());
return $result;
@@ -110,7 +110,7 @@ class PaymentsFunctionalTest extends \PHPUnit_Framework_TestCase
public function testRefundSale($sale)
{
$refund = new Refund($this->operation['request']['body']);
- $result = $sale->refund($refund, null, $this->mockPPRestCall);
+ $result = $sale->refund($refund, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals('completed', $result->getState());
$this->assertEquals($sale->getId(), $result->getSaleId());
diff --git a/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php b/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
index c19ce5a..468bb21 100644
--- a/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/WebProfileFunctionalTest.php
@@ -3,12 +3,12 @@
namespace PayPal\Test\Functional\Api;
use PayPal\Api\Patch;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -23,7 +23,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -53,7 +53,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
$request = $this->operation['request']['body'];
$obj = new WebProfile($request);
$obj->setName(uniqid());
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
@@ -65,7 +65,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($createProfileResponse)
{
- $result = WebProfile::get($createProfileResponse->getId(), null, $this->mockPPRestCall);
+ $result = WebProfile::get($createProfileResponse->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($createProfileResponse->getId(), $result->getId());
$this->assertEquals($this->operation['response']['body']['presentation']['logo_image'], $result->getPresentation()->getLogoImage());
@@ -82,7 +82,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetList($webProfile)
{
- $result = WebProfile::get_list(null, $this->mockPPRestCall);
+ $result = WebProfile::get_list(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -110,7 +110,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
$boolValue = $webProfile->getInputFields()->getNoShipping();
$newValue = ($boolValue + 1) % 2;
$webProfile->getInputFields()->setNoShipping($newValue);
- $result = $webProfile->update(null, $this->mockPPRestCall);
+ $result = $webProfile->update(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($webProfile->getInputFields()->getNoShipping(), $newValue);
}
@@ -132,7 +132,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
"path": "/flow_config/landing_page_type"
}');
- $result = $webProfile->partial_update($patches, null, $this->mockPPRestCall);
+ $result = $webProfile->partial_update($patches, null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
@@ -144,7 +144,7 @@ class WebProfileFunctionalTest extends \PHPUnit_Framework_TestCase
{
$webProfile = new WebProfile();
$webProfile->setId($createProfileResponse->getId());
- $result = $webProfile->delete(null, $this->mockPPRestCall);
+ $result = $webProfile->delete(null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
diff --git a/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php b/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
index 1f916e6..8006f5a 100644
--- a/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
+++ b/tests/PayPal/Test/Functional/Api/WebhookFunctionalTest.php
@@ -15,13 +15,13 @@ use PayPal\Api\WebhookEventList;
use PayPal\Api\WebhookEventType;
use PayPal\Api\WebhookEventTypeList;
use PayPal\Api\WebhookList;
-use PayPal\Common\PPModel;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Common\PayPalModel;
+use PayPal\Exception\PayPalConnectionException;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\CreateProfileResponse;
use PayPal\Test\Functional\Setup;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Api\WebProfile;
/**
@@ -36,7 +36,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
public $response;
- public $mockPPRestCall;
+ public $mockPayPalRestCall;
public function setUp()
{
@@ -68,12 +68,12 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
$obj->setUrl($obj->getUrl() . '?rand=' . uniqid());
$result = null;
try {
- $result = $obj->create(null, $this->mockPPRestCall);
- } catch (PPConnectionException $ex) {
+ $result = $obj->create(null, $this->mockPayPalRestCall);
+ } catch (PayPalConnectionException $ex) {
$data = $ex->getData();
if (strpos($data,'WEBHOOK_NUMBER_LIMIT_EXCEEDED') !== false) {
$this->deleteAll();
- $result = $obj->create(null, $this->mockPPRestCall);
+ $result = $obj->create(null, $this->mockPayPalRestCall);
} else {
$this->fail($ex->getMessage());
}
@@ -84,9 +84,9 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
public function deleteAll()
{
- $result = Webhook::getAll(null, $this->mockPPRestCall);
+ $result = Webhook::getAll(null, $this->mockPayPalRestCall);
foreach ($result->getWebhooks() as $webhookObject) {
- $webhookObject->delete(null, $this->mockPPRestCall);
+ $webhookObject->delete(null, $this->mockPayPalRestCall);
}
}
@@ -97,7 +97,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGet($webhook)
{
- $result = Webhook::get($webhook->getId(), null, $this->mockPPRestCall);
+ $result = Webhook::get($webhook->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals($webhook->getId(), $result->getId());
$this->assertEquals($webhook, $result, "", 0, 10, true);
@@ -111,7 +111,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetSubscribedEventTypes($webhook)
{
- $result = WebhookEventType::subscribedEventTypes($webhook->getId(), null, $this->mockPPRestCall);
+ $result = WebhookEventType::subscribedEventTypes($webhook->getId(), null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$this->assertEquals(2, sizeof($result->getEventTypes()));
return $result;
@@ -124,7 +124,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testGetAll($webhook)
{
- $result = Webhook::getAll(null, $this->mockPPRestCall);
+ $result = Webhook::getAll(null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -162,7 +162,7 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
$patchRequest = new PatchRequest();
$patchRequest->setPatches($patches);
- $result = $webhook->update($patchRequest, null, $this->mockPPRestCall);
+ $result = $webhook->update($patchRequest, null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
$found = false;
$foundObject = null;
@@ -181,13 +181,13 @@ class WebhookFunctionalTest extends \PHPUnit_Framework_TestCase
*/
public function testDelete($webhook)
{
- $result = $webhook->delete(null, $this->mockPPRestCall);
+ $result = $webhook->delete(null, $this->mockPayPalRestCall);
$this->assertTrue($result);
}
public function testEventSearch()
{
- $result = WebhookEvent::all(array(),null, $this->mockPPRestCall);
+ $result = WebhookEvent::all(array(),null, $this->mockPayPalRestCall);
$this->assertNotNull($result);
return $result;
}
diff --git a/tests/PayPal/Test/Functional/Setup.php b/tests/PayPal/Test/Functional/Setup.php
index 1dd21ad..5743b18 100644
--- a/tests/PayPal/Test/Functional/Setup.php
+++ b/tests/PayPal/Test/Functional/Setup.php
@@ -3,7 +3,7 @@
namespace PayPal\Test\Functional;
use PayPal\Auth\OAuthTokenCredential;
-use PayPal\Core\PPCredentialManager;
+use PayPal\Core\PayPalCredentialManager;
use PayPal\Rest\ApiContext;
class Setup
@@ -24,7 +24,7 @@ class Setup
'log.LogLevel' => 'FINE',
'validation.level' => 'warning'
));
- PPCredentialManager::getInstance()->setCredentialObject(
+ PayPalCredentialManager::getInstance()->setCredentialObject(
new OAuthTokenCredential(
"AYSq3RDGsmBLJE-otTkBtM-jBRd1TCQwFf9RGfwddNXWz0uFU9ztymylOhRS",
"EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRbL"
@@ -34,12 +34,12 @@ class Setup
self::$mode = getenv('REST_MODE') ? getenv('REST_MODE') : 'mock';
if (self::$mode != 'sandbox') {
- // Mock PPRest Caller if mode set to mock
- $test->mockPPRestCall = $test->getMockBuilder('\PayPal\Transport\PPRestCall')
+ // Mock PayPalRest Caller if mode set to mock
+ $test->mockPayPalRestCall = $test->getMockBuilder('\PayPal\Transport\PayPalRestCall')
->disableOriginalConstructor()
->getMock();
- $test->mockPPRestCall->expects($test->any())
+ $test->mockPayPalRestCall->expects($test->any())
->method('execute')
->will($test->returnValue(
$test->response
diff --git a/tests/PayPal/Test/Rest/ApiContextTest.php b/tests/PayPal/Test/Rest/ApiContextTest.php
index 2b9148d..0fc1778 100644
--- a/tests/PayPal/Test/Rest/ApiContextTest.php
+++ b/tests/PayPal/Test/Rest/ApiContextTest.php
@@ -3,7 +3,7 @@
use PayPal\Rest\ApiContext;
/**
- * Test class for PPAPIService.
+ * Test class for ApiContextTest.
*
*/
class ApiContextTest extends PHPUnit_Framework_TestCase
diff --git a/tests/PayPal/Test/Validation/NumericValidatorTest.php b/tests/PayPal/Test/Validation/NumericValidatorTest.php
index 85cee40..46342cc 100644
--- a/tests/PayPal/Test/Validation/NumericValidatorTest.php
+++ b/tests/PayPal/Test/Validation/NumericValidatorTest.php
@@ -1,7 +1,7 @@
Date: Wed, 17 Dec 2014 17:15:01 -0600
Subject: [PATCH 02/14] Renaming Namespaces and Organizing Classes
- Updated OpenId classes to be in API namespace
- Updated PP Naming Convention to PayPal Naming Convention
- FormatConverter Class got its own namespace
- Handlers are grouped in Handler namespace
- Samples and Tests Updated Accordingly
---
lib/PayPal/Api/Address.php | 2 +-
lib/PayPal/Api/Agreement.php | 26 +++----
lib/PayPal/Api/AgreementDetails.php | 4 +-
lib/PayPal/Api/AgreementStateDescriptor.php | 4 +-
lib/PayPal/Api/AgreementTransaction.php | 4 +-
lib/PayPal/Api/AgreementTransactions.php | 4 +-
lib/PayPal/Api/Amount.php | 6 +-
lib/PayPal/Api/Authorization.php | 22 +++---
lib/PayPal/Api/BankAccount.php | 14 ++--
lib/PayPal/Api/BankAccountsList.php | 4 +-
lib/PayPal/Api/BankToken.php | 4 +-
lib/PayPal/Api/BaseAddress.php | 4 +-
lib/PayPal/Api/BillingInfo.php | 4 +-
lib/PayPal/Api/CancelNotification.php | 4 +-
lib/PayPal/Api/Capture.php | 14 ++--
lib/PayPal/Api/CarrierAccountToken.php | 4 +-
lib/PayPal/Api/CartBase.php | 4 +-
lib/PayPal/Api/ChargeModel.php | 4 +-
lib/PayPal/Api/Cost.php | 6 +-
lib/PayPal/Api/CreateProfileResponse.php | 4 +-
lib/PayPal/Api/Credit.php | 4 +-
lib/PayPal/Api/CreditCard.php | 14 ++--
lib/PayPal/Api/CreditCardHistory.php | 4 +-
lib/PayPal/Api/CreditCardList.php | 4 +-
lib/PayPal/Api/CreditCardToken.php | 4 +-
lib/PayPal/Api/Currency.php | 6 +-
lib/PayPal/Api/CustomAmount.php | 4 +-
lib/PayPal/Api/Details.php | 6 +-
lib/PayPal/Api/Error.php | 4 +-
lib/PayPal/Api/ErrorDetails.php | 4 +-
lib/PayPal/Api/ExtendedBankAccount.php | 2 +-
lib/PayPal/Api/FlowConfig.php | 4 +-
lib/PayPal/Api/FundingInstrument.php | 4 +-
lib/PayPal/Api/FuturePayment.php | 8 +-
lib/PayPal/Api/HyperSchema.php | 4 +-
lib/PayPal/Api/Image.php | 4 +-
lib/PayPal/Api/InputFields.php | 4 +-
lib/PayPal/Api/Invoice.php | 32 ++++----
lib/PayPal/Api/InvoiceAddress.php | 2 +-
lib/PayPal/Api/InvoiceItem.php | 4 +-
lib/PayPal/Api/InvoiceSearchResponse.php | 4 +-
lib/PayPal/Api/InvoicingMetaData.php | 4 +-
lib/PayPal/Api/InvoicingNotification.php | 4 +-
lib/PayPal/Api/InvoicingPaymentDetail.php | 4 +-
lib/PayPal/Api/InvoicingRefundDetail.php | 4 +-
lib/PayPal/Api/Item.php | 6 +-
lib/PayPal/Api/ItemList.php | 4 +-
lib/PayPal/Api/Links.php | 4 +-
lib/PayPal/Api/MerchantInfo.php | 4 +-
lib/PayPal/Api/MerchantPreferences.php | 4 +-
lib/PayPal/Api/Metadata.php | 4 +-
lib/PayPal/Api/NameValuePair.php | 4 +-
lib/PayPal/Api/Notification.php | 4 +-
.../OpenIdAddress.php} | 6 +-
.../PPOpenIdError.php => Api/OpenIdError.php} | 6 +-
.../OpenIdSession.php} | 10 +--
.../OpenIdTokeninfo.php} | 16 ++--
.../OpenIdUserinfo.php} | 14 ++--
lib/PayPal/Api/Order.php | 4 +-
lib/PayPal/Api/OverrideChargeModel.php | 4 +-
lib/PayPal/Api/Patch.php | 4 +-
lib/PayPal/Api/PatchRequest.php | 4 +-
lib/PayPal/Api/Payee.php | 4 +-
lib/PayPal/Api/Payer.php | 4 +-
lib/PayPal/Api/PayerInfo.php | 4 +-
lib/PayPal/Api/Payment.php | 18 ++---
lib/PayPal/Api/PaymentCard.php | 4 +-
lib/PayPal/Api/PaymentCardToken.php | 4 +-
lib/PayPal/Api/PaymentDefinition.php | 4 +-
lib/PayPal/Api/PaymentDetail.php | 4 +-
lib/PayPal/Api/PaymentExecution.php | 4 +-
lib/PayPal/Api/PaymentHistory.php | 4 +-
lib/PayPal/Api/PaymentOptions.php | 4 +-
lib/PayPal/Api/PaymentTerm.php | 4 +-
lib/PayPal/Api/Phone.php | 4 +-
lib/PayPal/Api/Plan.php | 20 ++---
lib/PayPal/Api/PlanList.php | 4 +-
lib/PayPal/Api/Presentation.php | 4 +-
lib/PayPal/Api/RedirectUrls.php | 4 +-
lib/PayPal/Api/Refund.php | 10 +--
lib/PayPal/Api/RefundDetail.php | 4 +-
lib/PayPal/Api/RelatedResources.php | 4 +-
lib/PayPal/Api/Sale.php | 10 +--
lib/PayPal/Api/Search.php | 4 +-
lib/PayPal/Api/ShippingAddress.php | 2 +-
lib/PayPal/Api/ShippingCost.php | 4 +-
lib/PayPal/Api/ShippingInfo.php | 4 +-
lib/PayPal/Api/Tax.php | 4 +-
lib/PayPal/Api/Terms.php | 4 +-
lib/PayPal/Api/Transaction.php | 2 +-
lib/PayPal/Api/TransactionBase.php | 2 +-
lib/PayPal/Api/Transactions.php | 4 +-
lib/PayPal/Api/WebProfile.php | 18 ++---
lib/PayPal/Api/Webhook.php | 16 ++--
lib/PayPal/Api/WebhookEvent.php | 18 ++---
lib/PayPal/Api/WebhookEventList.php | 4 +-
lib/PayPal/Api/WebhookEventType.php | 10 +--
lib/PayPal/Api/WebhookEventTypeList.php | 4 +-
lib/PayPal/Api/WebhookList.php | 4 +-
lib/PayPal/Auth/OAuthTokenCredential.php | 30 ++++----
lib/PayPal/Cache/AuthorizationCache.php | 4 +-
.../Common/{PPArrayUtil.php => ArrayUtil.php} | 6 +-
.../Common/{PPModel.php => PayPalModel.php} | 10 +--
...ourceModel.php => PayPalResourceModel.php} | 16 ++--
.../{PPUserAgent.php => PayPalUserAgent.php} | 8 +-
...PReflectionUtil.php => ReflectionUtil.php} | 10 +--
.../{Common => Converter}/FormatConverter.php | 2 +-
...figManager.php => PayPalConfigManager.php} | 6 +-
.../{PPConstants.php => PayPalConstants.php} | 4 +-
...anager.php => PayPalCredentialManager.php} | 18 ++---
...{PPHttpConfig.php => PayPalHttpConfig.php} | 12 +--
...onnection.php => PayPalHttpConnection.php} | 30 ++++----
...oggingLevel.php => PayPalLoggingLevel.php} | 4 +-
...ngManager.php => PayPalLoggingManager.php} | 20 ++---
...n.php => PayPalConfigurationException.php} | 6 +-
...tion.php => PayPalConnectionException.php} | 6 +-
...p => PayPalInvalidCredentialException.php} | 6 +-
...p => PayPalMissingCredentialException.php} | 6 +-
.../{IPPHandler.php => IPayPalHandler.php} | 8 +-
lib/PayPal/{Rest => Handler}/OauthHandler.php | 39 +++++-----
lib/PayPal/{Rest => Handler}/RestHandler.php | 45 ++++++-----
lib/PayPal/Rest/ApiContext.php | 18 ++---
.../{PPRestCall.php => PayPalRestCall.php} | 22 +++---
.../Validation/ModelAccessorValidator.php | 18 ++---
sample/billing/UpdatePlan.php | 4 +-
sample/common.php | 10 +--
sample/doc/billing/UpdatePlan.html | 4 +-
.../GenerateAccessTokenFromRefreshToken.html | 4 +-
sample/doc/lipp/GetUserInfo.html | 8 +-
sample/doc/lipp/ObtainUserConsent.html | 4 +-
sample/doc/lipp/UserConsentRedirect.html | 8 +-
sample/doc/notifications/createWebhook.html | 2 +-
.../payment-experience/CreateWebProfile.html | 2 +-
.../payment-experience/DeleteWebProfile.html | 2 +-
.../doc/payment-experience/GetWebProfile.html | 2 +-
.../payment-experience/ListWebProfiles.html | 2 +-
.../GenerateAccessTokenFromRefreshToken.php | 4 +-
sample/lipp/GetUserInfo.php | 8 +-
sample/lipp/ObtainUserConsent.php | 4 +-
sample/lipp/UserConsentRedirect.php | 8 +-
sample/notifications/createWebhook.php | 2 +-
.../payment-experience/CreateWebProfile.php | 2 +-
.../payment-experience/DeleteWebProfile.php | 2 +-
sample/payment-experience/GetWebProfile.php | 2 +-
sample/payment-experience/ListWebProfiles.php | 2 +-
sample/sdk_config.ini | 2 +-
tests/PayPal/Test/Api/AddressTest.php | 2 +-
.../Test/Api/AgreementStateDescriptorTest.php | 2 +-
tests/PayPal/Test/Api/AgreementTest.php | 64 ++++++++--------
.../Test/Api/AgreementTransactionTest.php | 2 +-
.../Test/Api/AgreementTransactionsTest.php | 2 +-
tests/PayPal/Test/Api/AuthorizationTest.php | 6 +-
tests/PayPal/Test/Api/BankAccountTest.php | 28 +++----
.../PayPal/Test/Api/BankAccountsListTest.php | 2 +-
tests/PayPal/Test/Api/BankTokenTest.php | 2 +-
tests/PayPal/Test/Api/BillingInfoTest.php | 2 +-
.../Test/Api/CancelNotificationTest.php | 2 +-
tests/PayPal/Test/Api/CaptureTest.php | 4 +-
tests/PayPal/Test/Api/ChargeModelTest.php | 2 +-
tests/PayPal/Test/Api/CostTest.php | 4 +-
.../Test/Api/CreateProfileResponseTest.php | 2 +-
tests/PayPal/Test/Api/CreditCardListTest.php | 2 +-
tests/PayPal/Test/Api/CreditCardTest.php | 28 +++----
tests/PayPal/Test/Api/CreditCardTokenTest.php | 2 +-
tests/PayPal/Test/Api/CreditTest.php | 2 +-
tests/PayPal/Test/Api/CurrencyTest.php | 4 +-
tests/PayPal/Test/Api/CustomAmountTest.php | 2 +-
tests/PayPal/Test/Api/ErrorDetailsTest.php | 2 +-
tests/PayPal/Test/Api/ErrorTest.php | 2 +-
.../Test/Api/ExtendedBankAccountTest.php | 2 +-
tests/PayPal/Test/Api/FlowConfigTest.php | 2 +-
.../PayPal/Test/Api/FundingInstrumentTest.php | 2 +-
tests/PayPal/Test/Api/HyperSchemaTest.php | 2 +-
tests/PayPal/Test/Api/ImageTest.php | 2 +-
tests/PayPal/Test/Api/InputFieldsTest.php | 2 +-
tests/PayPal/Test/Api/InvoiceAddressTest.php | 2 +-
tests/PayPal/Test/Api/InvoiceItemTest.php | 2 +-
.../Test/Api/InvoiceSearchResponseTest.php | 2 +-
tests/PayPal/Test/Api/InvoiceTest.php | 76 +++++++++----------
tests/PayPal/Test/Api/LinksTest.php | 2 +-
tests/PayPal/Test/Api/MerchantInfoTest.php | 2 +-
.../Test/Api/MerchantPreferencesTest.php | 2 +-
tests/PayPal/Test/Api/MetadataTest.php | 2 +-
tests/PayPal/Test/Api/NotificationTest.php | 2 +-
.../OpenIdAddressTest.php} | 14 ++--
.../OpenIdErrorTest.php} | 14 ++--
.../OpenIdSessionTest.php} | 23 +++---
.../OpenIdTokeninfoTest.php} | 16 ++--
.../OpenIdUserinfoTest.php} | 19 +++--
.../Test/Api/OverrideChargeModelTest.php | 2 +-
tests/PayPal/Test/Api/PatchRequestTest.php | 2 +-
tests/PayPal/Test/Api/PatchTest.php | 2 +-
tests/PayPal/Test/Api/PayerInfoTest.php | 2 +-
tests/PayPal/Test/Api/PayerTest.php | 2 +-
tests/PayPal/Test/Api/PaymentCardTest.php | 2 +-
.../PayPal/Test/Api/PaymentCardTokenTest.php | 2 +-
.../PayPal/Test/Api/PaymentDefinitionTest.php | 2 +-
tests/PayPal/Test/Api/PaymentDetailTest.php | 2 +-
tests/PayPal/Test/Api/PaymentTermTest.php | 2 +-
tests/PayPal/Test/Api/PhoneTest.php | 2 +-
tests/PayPal/Test/Api/PlanListTest.php | 2 +-
tests/PayPal/Test/Api/PlanTest.php | 28 +++----
tests/PayPal/Test/Api/PresentationTest.php | 2 +-
tests/PayPal/Test/Api/RefundDetailTest.php | 2 +-
tests/PayPal/Test/Api/SaleTest.php | 2 +-
tests/PayPal/Test/Api/SearchTest.php | 2 +-
tests/PayPal/Test/Api/ShippingAddressTest.php | 2 +-
tests/PayPal/Test/Api/ShippingCostTest.php | 2 +-
tests/PayPal/Test/Api/ShippingInfoTest.php | 2 +-
tests/PayPal/Test/Api/TaxTest.php | 2 +-
tests/PayPal/Test/Api/TermsTest.php | 2 +-
tests/PayPal/Test/Api/WebProfileTest.php | 40 +++++-----
.../PayPal/Test/Api/WebhookEventListTest.php | 2 +-
tests/PayPal/Test/Api/WebhookEventTest.php | 22 +++---
.../Test/Api/WebhookEventTypeListTest.php | 2 +-
.../PayPal/Test/Api/WebhookEventTypeTest.php | 16 ++--
tests/PayPal/Test/Api/WebhookListTest.php | 2 +-
tests/PayPal/Test/Api/WebhookTest.php | 34 ++++-----
.../Test/Auth/OAuthTokenCredentialTest.php | 76 +++++++++----------
tests/PayPal/Test/Common/ArrayClass.php | 6 +-
tests/PayPal/Test/Common/ArrayUtilTest.php | 48 ++++++------
tests/PayPal/Test/Common/ChildClass.php | 4 +-
.../Test/Common/FormatConverterTest.php | 6 +-
tests/PayPal/Test/Common/ModelTest.php | 12 +--
tests/PayPal/Test/Common/NestedClass.php | 6 +-
.../{PPModelTest.php => PayPalModelTest.php} | 14 ++--
tests/PayPal/Test/Common/SimpleClass.php | 6 +-
tests/PayPal/Test/Common/UserAgentTest.php | 56 +++++++-------
.../Test/Core/PPConfigManagerTest.php.skipped | 28 +++----
...st.php => PayPalCredentialManagerTest.php} | 20 ++---
...onfigTest.php => PayPalHttpConfigTest.php} | 22 +++---
...rTest.php => PayPalLoggingManagerTest.php} | 10 +--
...p => PayPalConfigurationExceptionTest.php} | 12 +--
....php => PayPalConnectionExceptionTest.php} | 10 +--
... PayPalInvalidCredentialExceptionTest.php} | 10 +--
... PayPalMissingCredentialExceptionTest.php} | 10 +--
.../Api/BillingAgreementsFunctionalTest.php | 28 +++----
.../Api/BillingPlansFunctionalTest.php | 26 +++----
.../Functional/Api/InvoiceFunctionalTest.php | 28 +++----
.../Functional/Api/PaymentsFunctionalTest.php | 16 ++--
.../Api/WebProfileFunctionalTest.php | 18 ++---
.../Functional/Api/WebhookFunctionalTest.php | 30 ++++----
tests/PayPal/Test/Functional/Setup.php | 10 +--
tests/PayPal/Test/Rest/ApiContextTest.php | 2 +-
.../Test/Validation/NumericValidatorTest.php | 2 +-
tests/sdk_config.ini | 2 +-
246 files changed, 1067 insertions(+), 1057 deletions(-)
rename lib/PayPal/{Auth/Openid/PPOpenIdAddress.php => Api/OpenIdAddress.php} (95%)
rename lib/PayPal/{Auth/Openid/PPOpenIdError.php => Api/OpenIdError.php} (94%)
rename lib/PayPal/{Auth/Openid/PPOpenIdSession.php => Api/OpenIdSession.php} (94%)
rename lib/PayPal/{Auth/Openid/PPOpenIdTokeninfo.php => Api/OpenIdTokeninfo.php} (96%)
rename lib/PayPal/{Auth/Openid/PPOpenIdUserinfo.php => Api/OpenIdUserinfo.php} (97%)
rename lib/PayPal/Common/{PPArrayUtil.php => ArrayUtil.php} (90%)
rename lib/PayPal/Common/{PPModel.php => PayPalModel.php} (95%)
rename lib/PayPal/Common/{ResourceModel.php => PayPalResourceModel.php} (78%)
rename lib/PayPal/Common/{PPUserAgent.php => PayPalUserAgent.php} (92%)
rename lib/PayPal/Common/{PPReflectionUtil.php => ReflectionUtil.php} (92%)
rename lib/PayPal/{Common => Converter}/FormatConverter.php (98%)
rename lib/PayPal/Core/{PPConfigManager.php => PayPalConfigManager.php} (96%)
rename lib/PayPal/Core/{PPConstants.php => PayPalConstants.php} (91%)
rename lib/PayPal/Core/{PPCredentialManager.php => PayPalCredentialManager.php} (88%)
rename lib/PayPal/Core/{PPHttpConfig.php => PayPalHttpConfig.php} (95%)
rename lib/PayPal/Core/{PPHttpConnection.php => PayPalHttpConnection.php} (86%)
rename lib/PayPal/Core/{PPLoggingLevel.php => PayPalLoggingLevel.php} (91%)
rename lib/PayPal/Core/{PPLoggingManager.php => PayPalLoggingManager.php} (80%)
rename lib/PayPal/Exception/{PPConfigurationException.php => PayPalConfigurationException.php} (76%)
rename lib/PayPal/Exception/{PPConnectionException.php => PayPalConnectionException.php} (91%)
rename lib/PayPal/Exception/{PPInvalidCredentialException.php => PayPalInvalidCredentialException.php} (85%)
rename lib/PayPal/Exception/{PPMissingCredentialException.php => PayPalMissingCredentialException.php} (85%)
rename lib/PayPal/Handler/{IPPHandler.php => IPayPalHandler.php} (68%)
rename lib/PayPal/{Rest => Handler}/OauthHandler.php (66%)
rename lib/PayPal/{Rest => Handler}/RestHandler.php (67%)
rename lib/PayPal/Transport/{PPRestCall.php => PayPalRestCall.php} (75%)
rename tests/PayPal/Test/{Auth/Openid/PPOpenIdAddressTest.php => Api/OpenIdAddressTest.php} (77%)
rename tests/PayPal/Test/{Auth/Openid/PPOpenIdErrorTest.php => Api/OpenIdErrorTest.php} (75%)
rename tests/PayPal/Test/{Auth/Openid/PPOpenIdSessionTest.php => Api/OpenIdSessionTest.php} (75%)
rename tests/PayPal/Test/{Auth/Openid/PPOpenIdTokeninfoTest.php => Api/OpenIdTokeninfoTest.php} (82%)
rename tests/PayPal/Test/{Auth/Openid/PPOpenIdUserinfoTest.php => Api/OpenIdUserinfoTest.php} (74%)
rename tests/PayPal/Test/Common/{PPModelTest.php => PayPalModelTest.php} (94%)
rename tests/PayPal/Test/Core/{PPCredentialManagerTest.php => PayPalCredentialManagerTest.php} (86%)
rename tests/PayPal/Test/Core/{PPHttpConfigTest.php => PayPalHttpConfigTest.php} (86%)
rename tests/PayPal/Test/Core/{PPLoggingManagerTest.php => PayPalLoggingManagerTest.php} (78%)
rename tests/PayPal/Test/Exception/{PPConfigurationExceptionTest.php => PayPalConfigurationExceptionTest.php} (55%)
rename tests/PayPal/Test/Exception/{PPConnectionExceptionTest.php => PayPalConnectionExceptionTest.php} (73%)
rename tests/PayPal/Test/Exception/{PPMissingCredentialExceptionTest.php => PayPalInvalidCredentialExceptionTest.php} (67%)
rename tests/PayPal/Test/Exception/{PPInvalidCredentialExceptionTest.php => PayPalMissingCredentialExceptionTest.php} (67%)
diff --git a/lib/PayPal/Api/Address.php b/lib/PayPal/Api/Address.php
index 693fa2d..175db20 100644
--- a/lib/PayPal/Api/Address.php
+++ b/lib/PayPal/Api/Address.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Address
diff --git a/lib/PayPal/Api/Agreement.php b/lib/PayPal/Api/Agreement.php
index 6509200..843f5e8 100644
--- a/lib/PayPal/Api/Agreement.php
+++ b/lib/PayPal/Api/Agreement.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\AgreementTransactions;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class Agreement
@@ -30,7 +30,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\AgreementDetails agreement_details
* @property \PayPal\Api\Links[] links
*/
-class Agreement extends ResourceModel
+class Agreement extends PayPalResourceModel
{
/**
* Identifier of the agreement.
@@ -593,7 +593,7 @@ class Agreement extends ResourceModel
* Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Agreement
*/
public function create($apiContext = null, $restCall = null)
@@ -616,7 +616,7 @@ class Agreement extends ResourceModel
*
* @param $paymentToken
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Agreement
*/
public function execute($paymentToken, $apiContext = null, $restCall = null)
@@ -640,7 +640,7 @@ class Agreement extends ResourceModel
*
* @param string $agreementId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Agreement
*/
public static function get($agreementId, $apiContext = null, $restCall = null)
@@ -665,7 +665,7 @@ class Agreement extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -689,7 +689,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function suspend($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -713,7 +713,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function reActivate($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -737,7 +737,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function cancel($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -761,7 +761,7 @@ class Agreement extends ResourceModel
*
* @param AgreementStateDescriptor $agreementStateDescriptor
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function billBalance($agreementStateDescriptor, $apiContext = null, $restCall = null)
@@ -785,7 +785,7 @@ class Agreement extends ResourceModel
*
* @param Currency $currency
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function setBalance($currency, $apiContext = null, $restCall = null)
@@ -809,7 +809,7 @@ class Agreement extends ResourceModel
*
* @param string $agreementId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return AgreementTransactions
*/
public static function transactions($agreementId, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/AgreementDetails.php b/lib/PayPal/Api/AgreementDetails.php
index 6bc33bc..2c6c655 100644
--- a/lib/PayPal/Api/AgreementDetails.php
+++ b/lib/PayPal/Api/AgreementDetails.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class AgreementDetails
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property string final_payment_date
* @property string failed_payment_count
*/
-class AgreementDetails extends PPModel
+class AgreementDetails extends PayPalModel
{
/**
* The outstanding balance for this agreement.
diff --git a/lib/PayPal/Api/AgreementStateDescriptor.php b/lib/PayPal/Api/AgreementStateDescriptor.php
index 59d853d..619da31 100644
--- a/lib/PayPal/Api/AgreementStateDescriptor.php
+++ b/lib/PayPal/Api/AgreementStateDescriptor.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class AgreementStateDescriptor
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property \PayPal\Api\Currency amount
*/
-class AgreementStateDescriptor extends PPModel
+class AgreementStateDescriptor extends PayPalModel
{
/**
* Reason for changing the state of the agreement.
diff --git a/lib/PayPal/Api/AgreementTransaction.php b/lib/PayPal/Api/AgreementTransaction.php
index b1688c2..012460a 100644
--- a/lib/PayPal/Api/AgreementTransaction.php
+++ b/lib/PayPal/Api/AgreementTransaction.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class AgreementTransaction
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string time_updated
* @property string time_zone
*/
-class AgreementTransaction extends PPModel
+class AgreementTransaction extends PayPalModel
{
/**
* Id corresponding to this transaction.
diff --git a/lib/PayPal/Api/AgreementTransactions.php b/lib/PayPal/Api/AgreementTransactions.php
index 9299375..91e1177 100644
--- a/lib/PayPal/Api/AgreementTransactions.php
+++ b/lib/PayPal/Api/AgreementTransactions.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class AgreementTransactions
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\AgreementTransaction[] agreement_transaction_list
*/
-class AgreementTransactions extends PPModel
+class AgreementTransactions extends PayPalModel
{
/**
* Array of agreement_transaction object.
diff --git a/lib/PayPal/Api/Amount.php b/lib/PayPal/Api/Amount.php
index 5a90331..9678b09 100644
--- a/lib/PayPal/Api/Amount.php
+++ b/lib/PayPal/Api/Amount.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\NumericValidator;
-use PayPal\Common\FormatConverter;
+use PayPal\Converter\FormatConverter;
/**
* Class Amount
@@ -18,7 +18,7 @@ use PayPal\Common\FormatConverter;
* @property string total
* @property \PayPal\Api\Details details
*/
-class Amount extends PPModel
+class Amount extends PayPalModel
{
/**
* 3 letter currency code
diff --git a/lib/PayPal/Api/Authorization.php b/lib/PayPal/Api/Authorization.php
index 4ef44dd..fe21e7a 100644
--- a/lib/PayPal/Api/Authorization.php
+++ b/lib/PayPal/Api/Authorization.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Capture;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string valid_until
* @property \PayPal\Api\Links links
*/
-class Authorization extends PPModel implements IResource
+class Authorization extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -552,8 +552,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/$authorizationId", "GET", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/$authorizationId", "GET", $payLoad);
$ret = new Authorization();
$ret->fromJson($json);
return $ret;
@@ -575,8 +575,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/capture", "POST", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/capture", "POST", $payLoad);
$ret = new Capture();
$ret->fromJson($json);
return $ret;
@@ -596,8 +596,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/void", "POST", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/void", "POST", $payLoad);
$this->fromJson($json);
return $this;
}
@@ -616,8 +616,8 @@ class Authorization extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/authorization/{$this->getId()}/reauthorize", "POST", $payLoad);
$this->fromJson($json);
return $this;
}
diff --git a/lib/PayPal/Api/BankAccount.php b/lib/PayPal/Api/BankAccount.php
index fb87bc5..3fd2f62 100644
--- a/lib/PayPal/Api/BankAccount.php
+++ b/lib/PayPal/Api/BankAccount.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class BankAccount
@@ -39,7 +39,7 @@ use PayPal\Transport\PPRestCall;
* @property string valid_until
* @property \PayPal\Api\Links[] links
*/
-class BankAccount extends ResourceModel
+class BankAccount extends PayPalResourceModel
{
/**
* ID of the bank account being saved for later use.
@@ -1158,7 +1158,7 @@ class BankAccount extends ResourceModel
* Creates a new Bank Account Resource.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public function create($apiContext = null, $restCall = null)
@@ -1181,7 +1181,7 @@ class BankAccount extends ResourceModel
*
* @param string $bankAccountId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public static function get($bankAccountId, $apiContext = null, $restCall = null)
@@ -1205,7 +1205,7 @@ class BankAccount extends ResourceModel
* Delete the bank account resource for the given identifier.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -1228,7 +1228,7 @@ class BankAccount extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return BankAccount
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/BankAccountsList.php b/lib/PayPal/Api/BankAccountsList.php
index 540a1f1..a63b3da 100644
--- a/lib/PayPal/Api/BankAccountsList.php
+++ b/lib/PayPal/Api/BankAccountsList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class BankAccountsList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
-class BankAccountsList extends PPModel
+class BankAccountsList extends PayPalModel
{
/**
* A list of bank account resources
diff --git a/lib/PayPal/Api/BankToken.php b/lib/PayPal/Api/BankToken.php
index 93d8dac..1bf4e71 100644
--- a/lib/PayPal/Api/BankToken.php
+++ b/lib/PayPal/Api/BankToken.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class BankToken
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string external_customer_id
* @property string mandate_reference_number
*/
-class BankToken extends PPModel
+class BankToken extends PayPalModel
{
/**
* ID of a previously saved Bank resource using /vault/bank API.
diff --git a/lib/PayPal/Api/BaseAddress.php b/lib/PayPal/Api/BaseAddress.php
index d5ab7cf..b32b180 100644
--- a/lib/PayPal/Api/BaseAddress.php
+++ b/lib/PayPal/Api/BaseAddress.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class BaseAddress
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string postal_code
* @property string state
*/
-class BaseAddress extends PPModel
+class BaseAddress extends PayPalModel
{
/**
* Line 1 of the Address (eg. number, street, etc).
diff --git a/lib/PayPal/Api/BillingInfo.php b/lib/PayPal/Api/BillingInfo.php
index fdc1edf..adc33a6 100644
--- a/lib/PayPal/Api/BillingInfo.php
+++ b/lib/PayPal/Api/BillingInfo.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class BillingInfo
@@ -21,7 +21,7 @@ use PayPal\Common\PPModel;
* @property string notification_channel
* @property \PayPal\Api\Phone phone
*/
-class BillingInfo extends PPModel
+class BillingInfo extends PayPalModel
{
/**
* Email address of the invoice recipient. 260 characters max.
diff --git a/lib/PayPal/Api/CancelNotification.php b/lib/PayPal/Api/CancelNotification.php
index 2f5c115..3ca09e4 100644
--- a/lib/PayPal/Api/CancelNotification.php
+++ b/lib/PayPal/Api/CancelNotification.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class CancelNotification
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property bool send_to_merchant
* @property bool send_to_payer
*/
-class CancelNotification extends PPModel
+class CancelNotification extends PayPalModel
{
/**
* Subject of the notification.
diff --git a/lib/PayPal/Api/Capture.php b/lib/PayPal/Api/Capture.php
index 1fef9cb..92bb9c2 100644
--- a/lib/PayPal/Api/Capture.php
+++ b/lib/PayPal/Api/Capture.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\Refund;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -25,7 +25,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string parent_payment
* @property \PayPal\Api\Links links
*/
-class Capture extends PPModel implements IResource
+class Capture extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -352,8 +352,8 @@ class Capture extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/capture/$captureId", "GET", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/capture/$captureId", "GET", $payLoad);
$ret = new Capture();
$ret->fromJson($json);
return $ret;
@@ -375,8 +375,8 @@ class Capture extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/capture/{$this->getId()}/refund", "POST", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;
diff --git a/lib/PayPal/Api/CarrierAccountToken.php b/lib/PayPal/Api/CarrierAccountToken.php
index 5539ad9..29ba74b 100644
--- a/lib/PayPal/Api/CarrierAccountToken.php
+++ b/lib/PayPal/Api/CarrierAccountToken.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string carrier_account_id
* @property string external_customer_id
*/
-class CarrierAccountToken extends PPModel
+class CarrierAccountToken extends PayPalModel
{
/**
* ID of a previously saved carrier account resource.
diff --git a/lib/PayPal/Api/CartBase.php b/lib/PayPal/Api/CartBase.php
index a627b6c..14ca13c 100644
--- a/lib/PayPal/Api/CartBase.php
+++ b/lib/PayPal/Api/CartBase.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -22,7 +22,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\PaymentOptions payment_options
* @property \PayPal\Api\ItemList item_list
*/
-class CartBase extends PPModel
+class CartBase extends PayPalModel
{
/**
* Amount being collected.
diff --git a/lib/PayPal/Api/ChargeModel.php b/lib/PayPal/Api/ChargeModel.php
index 2a929f3..de486fe 100644
--- a/lib/PayPal/Api/ChargeModel.php
+++ b/lib/PayPal/Api/ChargeModel.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ChargeModel
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string type
* @property \PayPal\Api\Currency amount
*/
-class ChargeModel extends PPModel
+class ChargeModel extends PayPalModel
{
/**
* Identifier of the charge model. 128 characters max.
diff --git a/lib/PayPal/Api/Cost.php b/lib/PayPal/Api/Cost.php
index f6baf37..b1e11a1 100644
--- a/lib/PayPal/Api/Cost.php
+++ b/lib/PayPal/Api/Cost.php
@@ -2,9 +2,9 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Validation\NumericValidator;
-use PayPal\Common\FormatConverter;
+use PayPal\Converter\FormatConverter;
/**
* Class Cost
@@ -16,7 +16,7 @@ use PayPal\Common\FormatConverter;
* @property string percent
* @property \PayPal\Api\Currency amount
*/
-class Cost extends PPModel
+class Cost extends PayPalModel
{
/**
* Cost in percent. Range of 0 to 100.
diff --git a/lib/PayPal/Api/CreateProfileResponse.php b/lib/PayPal/Api/CreateProfileResponse.php
index e086ba3..64f79da 100644
--- a/lib/PayPal/Api/CreateProfileResponse.php
+++ b/lib/PayPal/Api/CreateProfileResponse.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class CreateProfileResponse
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property string id
*/
-class CreateProfileResponse extends PPModel
+class CreateProfileResponse extends PayPalModel
{
/**
* ID of the payment web experience profile.
diff --git a/lib/PayPal/Api/Credit.php b/lib/PayPal/Api/Credit.php
index 857233e..2693778 100644
--- a/lib/PayPal/Api/Credit.php
+++ b/lib/PayPal/Api/Credit.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Credit
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string type
* @property string terms
*/
-class Credit extends PPModel
+class Credit extends PayPalModel
{
/**
* Unique identifier of credit resource.
diff --git a/lib/PayPal/Api/CreditCard.php b/lib/PayPal/Api/CreditCard.php
index 0552c1a..4f28367 100644
--- a/lib/PayPal/Api/CreditCard.php
+++ b/lib/PayPal/Api/CreditCard.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class CreditCard
@@ -30,7 +30,7 @@ use PayPal\Transport\PPRestCall;
* @property string update_time
* @property \PayPal\Api\Links[] links
*/
-class CreditCard extends ResourceModel
+class CreditCard extends PayPalResourceModel
{
/**
* ID of the credit card being saved for later use.
@@ -637,7 +637,7 @@ class CreditCard extends ResourceModel
* Creates a new Credit Card Resource (aka Tokenize).
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public function create($apiContext = null, $restCall = null)
@@ -660,7 +660,7 @@ class CreditCard extends ResourceModel
*
* @param string $creditCardId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public static function get($creditCardId, $apiContext = null, $restCall = null)
@@ -684,7 +684,7 @@ class CreditCard extends ResourceModel
* Delete the Credit Card resource for the given identifier.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -706,7 +706,7 @@ class CreditCard extends ResourceModel
* Update information in a previously saved card. Only the modified fields need to be passed in the request.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreditCard
*/
public function update($apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/CreditCardHistory.php b/lib/PayPal/Api/CreditCardHistory.php
index 4a666f9..8d60bd8 100644
--- a/lib/PayPal/Api/CreditCardHistory.php
+++ b/lib/PayPal/Api/CreditCardHistory.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
-class CreditCardHistory extends PPModel
+class CreditCardHistory extends PayPalModel
{
/**
* A list of credit card resources
diff --git a/lib/PayPal/Api/CreditCardList.php b/lib/PayPal/Api/CreditCardList.php
index 26cd7db..c567580 100644
--- a/lib/PayPal/Api/CreditCardList.php
+++ b/lib/PayPal/Api/CreditCardList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class CreditCardList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property string next_id
*/
-class CreditCardList extends PPModel
+class CreditCardList extends PayPalModel
{
/**
* A list of credit card resources
diff --git a/lib/PayPal/Api/CreditCardToken.php b/lib/PayPal/Api/CreditCardToken.php
index 1ee5829..6ff994b 100644
--- a/lib/PayPal/Api/CreditCardToken.php
+++ b/lib/PayPal/Api/CreditCardToken.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class CreditCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
-class CreditCardToken extends PPModel
+class CreditCardToken extends PayPalModel
{
/**
* ID of a previously saved Credit Card resource using /vault/credit-card API.
diff --git a/lib/PayPal/Api/Currency.php b/lib/PayPal/Api/Currency.php
index c4018a6..eb53eb9 100644
--- a/lib/PayPal/Api/Currency.php
+++ b/lib/PayPal/Api/Currency.php
@@ -2,8 +2,8 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\FormatConverter;
+use PayPal\Common\PayPalModel;
+use PayPal\Converter\FormatConverter;
use PayPal\Validation\NumericValidator;
/**
@@ -16,7 +16,7 @@ use PayPal\Validation\NumericValidator;
* @property string currency
* @property string value
*/
-class Currency extends PPModel
+class Currency extends PayPalModel
{
/**
* 3 letter currency code as defined by ISO 4217.
diff --git a/lib/PayPal/Api/CustomAmount.php b/lib/PayPal/Api/CustomAmount.php
index 3727a5a..47f9d75 100644
--- a/lib/PayPal/Api/CustomAmount.php
+++ b/lib/PayPal/Api/CustomAmount.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class CustomAmount
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string label
* @property \PayPal\Api\Currency amount
*/
-class CustomAmount extends PPModel
+class CustomAmount extends PayPalModel
{
/**
* Custom amount label. 25 characters max.
diff --git a/lib/PayPal/Api/Details.php b/lib/PayPal/Api/Details.php
index b03449e..73f199f 100644
--- a/lib/PayPal/Api/Details.php
+++ b/lib/PayPal/Api/Details.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\NumericValidator;
-use PayPal\Common\FormatConverter;
+use PayPal\Converter\FormatConverter;
/**
* Class Details
@@ -23,7 +23,7 @@ use PayPal\Common\FormatConverter;
* @property string handling_fee
* @property string gift_wrap
*/
-class Details extends PPModel
+class Details extends PayPalModel
{
/**
* Amount being charged for shipping.
diff --git a/lib/PayPal/Api/Error.php b/lib/PayPal/Api/Error.php
index 9f5eac4..cb1e733 100644
--- a/lib/PayPal/Api/Error.php
+++ b/lib/PayPal/Api/Error.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Error
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\ErrorDetails[] details
* @property \PayPal\Api\Links[] links
*/
-class Error extends PPModel
+class Error extends PayPalModel
{
/**
* Human readable, unique name of the error.
diff --git a/lib/PayPal/Api/ErrorDetails.php b/lib/PayPal/Api/ErrorDetails.php
index e2fc039..f4e14a0 100644
--- a/lib/PayPal/Api/ErrorDetails.php
+++ b/lib/PayPal/Api/ErrorDetails.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ErrorDetails
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string field
* @property string issue
*/
-class ErrorDetails extends PPModel
+class ErrorDetails extends PayPalModel
{
/**
* Name of the field that caused the error.
diff --git a/lib/PayPal/Api/ExtendedBankAccount.php b/lib/PayPal/Api/ExtendedBankAccount.php
index 11e5297..f05c621 100644
--- a/lib/PayPal/Api/ExtendedBankAccount.php
+++ b/lib/PayPal/Api/ExtendedBankAccount.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ExtendedBankAccount
diff --git a/lib/PayPal/Api/FlowConfig.php b/lib/PayPal/Api/FlowConfig.php
index 471322c..7faf1e8 100644
--- a/lib/PayPal/Api/FlowConfig.php
+++ b/lib/PayPal/Api/FlowConfig.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -15,7 +15,7 @@ use PayPal\Validation\UrlValidator;
* @property string landing_page_type
* @property string bank_txn_pending_url
*/
-class FlowConfig extends PPModel
+class FlowConfig extends PayPalModel
{
/**
* Type of PayPal page to be displayed when a user lands on the PayPal site for checkout. Allowed values: `Billing` or `Login`. When set to `Billing`, the Non-PayPal account landing page is used. When set to `Login`, the PayPal account login landing page is used.
diff --git a/lib/PayPal/Api/FundingInstrument.php b/lib/PayPal/Api/FundingInstrument.php
index d2aa844..c563368 100644
--- a/lib/PayPal/Api/FundingInstrument.php
+++ b/lib/PayPal/Api/FundingInstrument.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class FundingInstrument
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\BankToken bank_account_token
* @property \PayPal\Api\Credit credit
*/
-class FundingInstrument extends PPModel
+class FundingInstrument extends PayPalModel
{
/**
* Credit Card information.
diff --git a/lib/PayPal/Api/FuturePayment.php b/lib/PayPal/Api/FuturePayment.php
index 7c3947c..e37d3b5 100644
--- a/lib/PayPal/Api/FuturePayment.php
+++ b/lib/PayPal/Api/FuturePayment.php
@@ -2,9 +2,9 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class FuturePayment
@@ -33,9 +33,9 @@ class FuturePayment extends Payment
);
}
$payLoad = $this->toJSON();
- $call = new PPRestCall($apiContext);
+ $call = new PayPalRestCall($apiContext);
$json = $call->execute(
- array('PayPal\Rest\RestHandler'),
+ array('PayPal\Handler\RestHandler'),
"/v1/payments/payment",
"POST",
$payLoad,
diff --git a/lib/PayPal/Api/HyperSchema.php b/lib/PayPal/Api/HyperSchema.php
index 9c2d6f2..7ef5dbb 100644
--- a/lib/PayPal/Api/HyperSchema.php
+++ b/lib/PayPal/Api/HyperSchema.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class HyperSchema
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string pathStart
* @property string mediaType
*/
-class HyperSchema extends PPModel
+class HyperSchema extends PayPalModel
{
/**
* Sets Links
diff --git a/lib/PayPal/Api/Image.php b/lib/PayPal/Api/Image.php
index fff9353..71c7d15 100644
--- a/lib/PayPal/Api/Image.php
+++ b/lib/PayPal/Api/Image.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Image
@@ -11,7 +11,7 @@ use PayPal\Common\PPModel;
*
* @property string image
*/
-class Image extends PPModel
+class Image extends PayPalModel
{
/**
* List of invoices belonging to a merchant.
diff --git a/lib/PayPal/Api/InputFields.php b/lib/PayPal/Api/InputFields.php
index 3e9b247..08a833e 100644
--- a/lib/PayPal/Api/InputFields.php
+++ b/lib/PayPal/Api/InputFields.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InputFields
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int no_shipping
* @property int address_override
*/
-class InputFields extends PPModel
+class InputFields extends PayPalModel
{
/**
* Enables the buyer to enter a note to the merchant on the PayPal page during checkout.
diff --git a/lib/PayPal/Api/Invoice.php b/lib/PayPal/Api/Invoice.php
index 1317160..3340644 100644
--- a/lib/PayPal/Api/Invoice.php
+++ b/lib/PayPal/Api/Invoice.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\UrlValidator;
/**
@@ -40,7 +40,7 @@ use PayPal\Validation\UrlValidator;
* @property \PayPal\Api\Metadata metadata
* @property string additional_data
*/
-class Invoice extends ResourceModel
+class Invoice extends PayPalResourceModel
{
/**
* Unique invoice resource identifier.
@@ -1070,7 +1070,7 @@ class Invoice extends ResourceModel
* Create a new invoice by passing the details for the invoice, including the merchant_info, to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public function create($apiContext = null, $restCall = null)
@@ -1093,7 +1093,7 @@ class Invoice extends ResourceModel
*
* @param Search $search
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function search($search, $apiContext = null, $restCall = null)
@@ -1117,7 +1117,7 @@ class Invoice extends ResourceModel
* Send a specific invoice to its intended recipient by passing the invoice ID to the request URI. Optionally, you can specify whether to send the merchant an invoice update notification by using the notify_merchant query parameter. By default, notify_merchant is true.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function send($apiContext = null, $restCall = null)
@@ -1140,7 +1140,7 @@ class Invoice extends ResourceModel
*
* @param Notification $notification
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function remind($notification, $apiContext = null, $restCall = null)
@@ -1164,7 +1164,7 @@ class Invoice extends ResourceModel
*
* @param CancelNotification $cancelNotification
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function cancel($cancelNotification, $apiContext = null, $restCall = null)
@@ -1188,7 +1188,7 @@ class Invoice extends ResourceModel
*
* @param PaymentDetail $paymentDetail
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function recordPayment($paymentDetail, $apiContext = null, $restCall = null)
@@ -1212,7 +1212,7 @@ class Invoice extends ResourceModel
*
* @param RefundDetail $refundDetail
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function recordRefund($refundDetail, $apiContext = null, $restCall = null)
@@ -1236,7 +1236,7 @@ class Invoice extends ResourceModel
*
* @param string $invoiceId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public static function get($invoiceId, $apiContext = null, $restCall = null)
@@ -1261,7 +1261,7 @@ class Invoice extends ResourceModel
*
* @param array $params
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function getAll($params = array(), $apiContext = null, $restCall = null)
@@ -1294,7 +1294,7 @@ class Invoice extends ResourceModel
* List some or all invoices for a merchant according to optional query string parameters specified.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return InvoiceSearchResponse
*/
public static function get_all($apiContext = null, $restCall = null)
@@ -1306,7 +1306,7 @@ class Invoice extends ResourceModel
* Fully update an invoice by passing the invoice ID to the request URI. In addition, pass a complete invoice object in the request JSON. Partial updates are not supported.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Invoice
*/
public function update($apiContext = null, $restCall = null)
@@ -1329,7 +1329,7 @@ class Invoice extends ResourceModel
* Delete a particular invoice by passing the invoice ID to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -1353,7 +1353,7 @@ class Invoice extends ResourceModel
* @param array $params
* @param string $invoiceId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Image
*/
public static function qrCode($invoiceId, $params = array(), $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/InvoiceAddress.php b/lib/PayPal/Api/InvoiceAddress.php
index 4f7f5b4..b8cd850 100644
--- a/lib/PayPal/Api/InvoiceAddress.php
+++ b/lib/PayPal/Api/InvoiceAddress.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoiceAddress
diff --git a/lib/PayPal/Api/InvoiceItem.php b/lib/PayPal/Api/InvoiceItem.php
index 49453f1..8ac2b3a 100644
--- a/lib/PayPal/Api/InvoiceItem.php
+++ b/lib/PayPal/Api/InvoiceItem.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoiceItem
@@ -19,7 +19,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property \PayPal\Api\Cost discount
*/
-class InvoiceItem extends PPModel
+class InvoiceItem extends PayPalModel
{
/**
* Name of the item. 60 characters max.
diff --git a/lib/PayPal/Api/InvoiceSearchResponse.php b/lib/PayPal/Api/InvoiceSearchResponse.php
index 9afda6a..667f583 100644
--- a/lib/PayPal/Api/InvoiceSearchResponse.php
+++ b/lib/PayPal/Api/InvoiceSearchResponse.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoiceSearchResponse
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property int total_count
* @property \PayPal\Api\Invoice[] invoices
*/
-class InvoiceSearchResponse extends PPModel
+class InvoiceSearchResponse extends PayPalModel
{
/**
* Total number of invoices.
diff --git a/lib/PayPal/Api/InvoicingMetaData.php b/lib/PayPal/Api/InvoicingMetaData.php
index b669706..1b39cc9 100644
--- a/lib/PayPal/Api/InvoicingMetaData.php
+++ b/lib/PayPal/Api/InvoicingMetaData.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
-class InvoicingMetaData extends PPModel
+class InvoicingMetaData extends PayPalModel
{
/**
* Date when the resource was created.
diff --git a/lib/PayPal/Api/InvoicingNotification.php b/lib/PayPal/Api/InvoicingNotification.php
index 1e1b0bd..d3599db 100644
--- a/lib/PayPal/Api/InvoicingNotification.php
+++ b/lib/PayPal/Api/InvoicingNotification.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoicingNotification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
-class InvoicingNotification extends PPModel
+class InvoicingNotification extends PayPalModel
{
/**
* Subject of the notification.
diff --git a/lib/PayPal/Api/InvoicingPaymentDetail.php b/lib/PayPal/Api/InvoicingPaymentDetail.php
index 11ecc6a..9a71f4f 100644
--- a/lib/PayPal/Api/InvoicingPaymentDetail.php
+++ b/lib/PayPal/Api/InvoicingPaymentDetail.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoicingPaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
-class InvoicingPaymentDetail extends PPModel
+class InvoicingPaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
diff --git a/lib/PayPal/Api/InvoicingRefundDetail.php b/lib/PayPal/Api/InvoicingRefundDetail.php
index 99ebbaa..3390a2a 100644
--- a/lib/PayPal/Api/InvoicingRefundDetail.php
+++ b/lib/PayPal/Api/InvoicingRefundDetail.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class InvoicingRefundDetail
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property string note
*/
-class InvoicingRefundDetail extends PPModel
+class InvoicingRefundDetail extends PayPalModel
{
/**
* PayPal refund type indicating whether refund was done in invoicing flow via PayPal or externally. In the case of the mark-as-refunded API, refund type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
diff --git a/lib/PayPal/Api/Item.php b/lib/PayPal/Api/Item.php
index 0faf5aa..40c850b 100644
--- a/lib/PayPal/Api/Item.php
+++ b/lib/PayPal/Api/Item.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
use PayPal\Validation\NumericValidator;
-use PayPal\Common\FormatConverter;
+use PayPal\Converter\FormatConverter;
/**
* Class Item
@@ -27,7 +27,7 @@ use PayPal\Common\FormatConverter;
* @property \PayPal\Api\NameValuePair supplementary_data
* @property \PayPal\Api\NameValuePair postback_data
*/
-class Item extends PPModel
+class Item extends PayPalModel
{
/**
* Number of items.
diff --git a/lib/PayPal/Api/ItemList.php b/lib/PayPal/Api/ItemList.php
index 3504041..5c8a728 100644
--- a/lib/PayPal/Api/ItemList.php
+++ b/lib/PayPal/Api/ItemList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\Item[] items
* @property \PayPal\Api\ShippingAddress shipping_address
*/
-class ItemList extends PPModel
+class ItemList extends PayPalModel
{
/**
* Is this list empty?
diff --git a/lib/PayPal/Api/Links.php b/lib/PayPal/Api/Links.php
index 64c3841..7e00880 100644
--- a/lib/PayPal/Api/Links.php
+++ b/lib/PayPal/Api/Links.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Links
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string enctype
* @property \PayPal\Api\HyperSchema schema
*/
-class Links extends PPModel
+class Links extends PayPalModel
{
/**
* Sets Href
diff --git a/lib/PayPal/Api/MerchantInfo.php b/lib/PayPal/Api/MerchantInfo.php
index 2389985..c60363d 100644
--- a/lib/PayPal/Api/MerchantInfo.php
+++ b/lib/PayPal/Api/MerchantInfo.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class MerchantInfo
@@ -22,7 +22,7 @@ use PayPal\Common\PPModel;
* @property string tax_id
* @property string additional_info
*/
-class MerchantInfo extends PPModel
+class MerchantInfo extends PayPalModel
{
/**
* Email address of the merchant. 260 characters max.
diff --git a/lib/PayPal/Api/MerchantPreferences.php b/lib/PayPal/Api/MerchantPreferences.php
index 404eee0..f6a8850 100644
--- a/lib/PayPal/Api/MerchantPreferences.php
+++ b/lib/PayPal/Api/MerchantPreferences.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string accepted_payment_type
* @property string char_set
*/
-class MerchantPreferences extends PPModel
+class MerchantPreferences extends PayPalModel
{
/**
* Identifier of the merchant_preferences. 128 characters max.
diff --git a/lib/PayPal/Api/Metadata.php b/lib/PayPal/Api/Metadata.php
index ffab420..8fb38ac 100644
--- a/lib/PayPal/Api/Metadata.php
+++ b/lib/PayPal/Api/Metadata.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Validation\UrlValidator;
/**
@@ -23,7 +23,7 @@ use PayPal\Validation\UrlValidator;
* @property string last_sent_by
* @property string payer_view_url
*/
-class Metadata extends PPModel
+class Metadata extends PayPalModel
{
/**
* Date when the resource was created.
diff --git a/lib/PayPal/Api/NameValuePair.php b/lib/PayPal/Api/NameValuePair.php
index e62d4fc..2dffd50 100644
--- a/lib/PayPal/Api/NameValuePair.php
+++ b/lib/PayPal/Api/NameValuePair.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property string name
* @property string value
*/
-class NameValuePair extends PPModel
+class NameValuePair extends PayPalModel
{
/**
* Key for the name value pair. The value name types should be correlated
diff --git a/lib/PayPal/Api/Notification.php b/lib/PayPal/Api/Notification.php
index 80f352d..80cc33f 100644
--- a/lib/PayPal/Api/Notification.php
+++ b/lib/PayPal/Api/Notification.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Notification
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string note
* @property bool send_to_merchant
*/
-class Notification extends PPModel
+class Notification extends PayPalModel
{
/**
* Subject of the notification.
diff --git a/lib/PayPal/Auth/Openid/PPOpenIdAddress.php b/lib/PayPal/Api/OpenIdAddress.php
similarity index 95%
rename from lib/PayPal/Auth/Openid/PPOpenIdAddress.php
rename to lib/PayPal/Api/OpenIdAddress.php
index 64486e7..925374a 100644
--- a/lib/PayPal/Auth/Openid/PPOpenIdAddress.php
+++ b/lib/PayPal/Api/OpenIdAddress.php
@@ -1,13 +1,13 @@
fromJson($json);
return $token;
}
@@ -205,7 +205,7 @@ class PPOpenIdTokeninfo extends ResourceModel
* (optional) grant_type is the Token grant type. Defaults to refresh_token
* (optional) scope is an array that either the same or a subset of the scope passed to the authorization request
* @param APIContext $apiContext Optional API Context
- * @return PPOpenIdTokeninfo
+ * @return OpenIdTokeninfo
*/
public function createFromRefreshToken($params, $apiContext = null)
{
diff --git a/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php b/lib/PayPal/Api/OpenIdUserinfo.php
similarity index 97%
rename from lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php
rename to lib/PayPal/Api/OpenIdUserinfo.php
index f49d343..5e10e19 100644
--- a/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php
+++ b/lib/PayPal/Api/OpenIdUserinfo.php
@@ -1,13 +1,13 @@
fromJson($json);
return $ret;
diff --git a/lib/PayPal/Api/Order.php b/lib/PayPal/Api/Order.php
index 8f82e48..726def1 100644
--- a/lib/PayPal/Api/Order.php
+++ b/lib/PayPal/Api/Order.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -24,7 +24,7 @@ use PayPal\Rest\ApiContext;
* @property string protection_eligibility_type
* @property \PayPal\Api\Links links
*/
-class Order extends PPModel
+class Order extends PayPalModel
{
/**
* Identifier of the order transaction.
diff --git a/lib/PayPal/Api/OverrideChargeModel.php b/lib/PayPal/Api/OverrideChargeModel.php
index b720222..24eca73 100644
--- a/lib/PayPal/Api/OverrideChargeModel.php
+++ b/lib/PayPal/Api/OverrideChargeModel.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class OverrideChargeModel
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string charge_id
* @property \PayPal\Api\Currency amount
*/
-class OverrideChargeModel extends PPModel
+class OverrideChargeModel extends PayPalModel
{
/**
* ID of charge model.
diff --git a/lib/PayPal/Api/Patch.php b/lib/PayPal/Api/Patch.php
index 5b1974b..0f68c70 100644
--- a/lib/PayPal/Api/Patch.php
+++ b/lib/PayPal/Api/Patch.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Patch
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property mixed value
* @property string from
*/
-class Patch extends PPModel
+class Patch extends PayPalModel
{
/**
* The operation to perform.
diff --git a/lib/PayPal/Api/PatchRequest.php b/lib/PayPal/Api/PatchRequest.php
index 74b4210..effc105 100644
--- a/lib/PayPal/Api/PatchRequest.php
+++ b/lib/PayPal/Api/PatchRequest.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PatchRequest
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\Patch[] patches
*/
-class PatchRequest extends PPModel
+class PatchRequest extends PayPalModel
{
/**
* Placeholder for holding array of patch objects
diff --git a/lib/PayPal/Api/Payee.php b/lib/PayPal/Api/Payee.php
index 6d4400d..f68df14 100644
--- a/lib/PayPal/Api/Payee.php
+++ b/lib/PayPal/Api/Payee.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property string merchant_id
* @property \PayPal\Api\Phone phone
*/
-class Payee extends PPModel
+class Payee extends PayPalModel
{
/**
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receiver PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
diff --git a/lib/PayPal/Api/Payer.php b/lib/PayPal/Api/Payer.php
index d6d87d7..c3160e3 100644
--- a/lib/PayPal/Api/Payer.php
+++ b/lib/PayPal/Api/Payer.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Payer
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property string funding_option_id
* @property \PayPal\Api\PayerInfo payer_info
*/
-class Payer extends PPModel
+class Payer extends PayPalModel
{
/**
* Payment method being used - PayPal Wallet payment, Bank Direct Debit, or Direct Credit card.
diff --git a/lib/PayPal/Api/PayerInfo.php b/lib/PayPal/Api/PayerInfo.php
index 0439117..e84fc93 100644
--- a/lib/PayPal/Api/PayerInfo.php
+++ b/lib/PayPal/Api/PayerInfo.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PayerInfo
@@ -25,7 +25,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Address billing_address
* @property \PayPal\Api\ShippingAddress shipping_address
*/
-class PayerInfo extends PPModel
+class PayerInfo extends PayPalModel
{
/**
* Email address representing the Payer.
diff --git a/lib/PayPal/Api/Payment.php b/lib/PayPal/Api/Payment.php
index 6b7f00c..1781c54 100644
--- a/lib/PayPal/Api/Payment.php
+++ b/lib/PayPal/Api/Payment.php
@@ -2,12 +2,12 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
use PayPal\Api\PaymentHistory;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property \PayPal\Api\Links links
* @property string experience_profile_id
*/
-class Payment extends ResourceModel
+class Payment extends PayPalResourceModel
{
/**
* OAuth Credentials to use for this call
@@ -393,7 +393,7 @@ class Payment extends ResourceModel
* Creates (and processes) a new Payment Resource.
*
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public function create($apiContext = null, $restCall = null)
@@ -417,7 +417,7 @@ class Payment extends ResourceModel
*
* @param string $paymentId
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public static function get($paymentId, $apiContext = null, $restCall = null)
@@ -443,7 +443,7 @@ class Payment extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return boolean
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -467,7 +467,7 @@ class Payment extends ResourceModel
*
* @param PaymentExecution $paymentExecution
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Payment
*/
public function execute($paymentExecution, $apiContext = null, $restCall = null)
@@ -493,7 +493,7 @@ class Payment extends ResourceModel
*
* @param array $params
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PaymentHistory
*/
public static function all($params, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/PaymentCard.php b/lib/PayPal/Api/PaymentCard.php
index 9e844b8..fc64c0e 100644
--- a/lib/PayPal/Api/PaymentCard.php
+++ b/lib/PayPal/Api/PaymentCard.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PaymentCard
@@ -27,7 +27,7 @@ use PayPal\Common\PPModel;
* @property string valid_until
* @property \PayPal\Api\Links[] links
*/
-class PaymentCard extends PPModel
+class PaymentCard extends PayPalModel
{
/**
* ID of the credit card being saved for later use.
diff --git a/lib/PayPal/Api/PaymentCardToken.php b/lib/PayPal/Api/PaymentCardToken.php
index aa52cea..f96c45c 100644
--- a/lib/PayPal/Api/PaymentCardToken.php
+++ b/lib/PayPal/Api/PaymentCardToken.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PaymentCardToken
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property int expire_month
* @property int expire_year
*/
-class PaymentCardToken extends PPModel
+class PaymentCardToken extends PayPalModel
{
/**
* ID of a previously saved Payment Card resource.
diff --git a/lib/PayPal/Api/PaymentDefinition.php b/lib/PayPal/Api/PaymentDefinition.php
index e78245e..c6b7734 100644
--- a/lib/PayPal/Api/PaymentDefinition.php
+++ b/lib/PayPal/Api/PaymentDefinition.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PaymentDefinition
@@ -20,7 +20,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\ChargeModel[] charge_models
*/
-class PaymentDefinition extends PPModel
+class PaymentDefinition extends PayPalModel
{
/**
* Identifier of the payment_definition. 128 characters max.
diff --git a/lib/PayPal/Api/PaymentDetail.php b/lib/PayPal/Api/PaymentDetail.php
index c5c12ad..2ff0df0 100644
--- a/lib/PayPal/Api/PaymentDetail.php
+++ b/lib/PayPal/Api/PaymentDetail.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PaymentDetail
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property string method
* @property string note
*/
-class PaymentDetail extends PPModel
+class PaymentDetail extends PayPalModel
{
/**
* PayPal payment detail indicating whether payment was made in an invoicing flow via PayPal or externally. In the case of the mark-as-paid API, payment type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
diff --git a/lib/PayPal/Api/PaymentExecution.php b/lib/PayPal/Api/PaymentExecution.php
index 6eabdef..9a00645 100644
--- a/lib/PayPal/Api/PaymentExecution.php
+++ b/lib/PayPal/Api/PaymentExecution.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -15,7 +15,7 @@ use PayPal\Rest\ApiContext;
* @property string payer_id
* @property \PayPal\Api\Transactions transactions
*/
-class PaymentExecution extends PPModel
+class PaymentExecution extends PayPalModel
{
/**
* PayPal assigned Payer ID returned in the approval return url.
diff --git a/lib/PayPal/Api/PaymentHistory.php b/lib/PayPal/Api/PaymentHistory.php
index 48d9f66..6452acf 100644
--- a/lib/PayPal/Api/PaymentHistory.php
+++ b/lib/PayPal/Api/PaymentHistory.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -16,7 +16,7 @@ use PayPal\Rest\ApiContext;
* @property int count
* @property string next_id
*/
-class PaymentHistory extends PPModel
+class PaymentHistory extends PayPalModel
{
/**
* A list of Payment resources
diff --git a/lib/PayPal/Api/PaymentOptions.php b/lib/PayPal/Api/PaymentOptions.php
index 79285b9..4211113 100644
--- a/lib/PayPal/Api/PaymentOptions.php
+++ b/lib/PayPal/Api/PaymentOptions.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -14,7 +14,7 @@ use PayPal\Rest\ApiContext;
*
* @property string allowed_payment_method
*/
-class PaymentOptions extends PPModel
+class PaymentOptions extends PayPalModel
{
/**
* Payment method requested for this purchase unit
diff --git a/lib/PayPal/Api/PaymentTerm.php b/lib/PayPal/Api/PaymentTerm.php
index c5c6ed5..935830c 100644
--- a/lib/PayPal/Api/PaymentTerm.php
+++ b/lib/PayPal/Api/PaymentTerm.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PaymentTerm
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property string term_type
* @property string due_date
*/
-class PaymentTerm extends PPModel
+class PaymentTerm extends PayPalModel
{
/**
* Terms by which the invoice payment is due.
diff --git a/lib/PayPal/Api/Phone.php b/lib/PayPal/Api/Phone.php
index 1c55e98..07e8ec7 100644
--- a/lib/PayPal/Api/Phone.php
+++ b/lib/PayPal/Api/Phone.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Phone
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string national_number
* @property string extension
*/
-class Phone extends PPModel
+class Phone extends PayPalModel
{
/**
* Country code (in E.164 format). Assume length is n.
diff --git a/lib/PayPal/Api/Plan.php b/lib/PayPal/Api/Plan.php
index 9e85ef2..e14cdff 100644
--- a/lib/PayPal/Api/Plan.php
+++ b/lib/PayPal/Api/Plan.php
@@ -2,12 +2,12 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\PlanList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class Plan
@@ -28,7 +28,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\MerchantPreferences merchant_preferences
* @property \PayPal\Api\Links[] links
*/
-class Plan extends ResourceModel
+class Plan extends PayPalResourceModel
{
/**
* Identifier of the billing plan. 128 characters max.
@@ -478,7 +478,7 @@ class Plan extends ResourceModel
*
* @param string $planId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Plan
*/
public static function get($planId, $apiContext = null, $restCall = null)
@@ -502,7 +502,7 @@ class Plan extends ResourceModel
* Create a new billing plan by passing the details for the plan, including the plan name, description, and type, to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Plan
*/
public function create($apiContext = null, $restCall = null)
@@ -525,7 +525,7 @@ class Plan extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -548,7 +548,7 @@ class Plan extends ResourceModel
* Delete a billing plan by passing the ID of the billing plan to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
@@ -556,7 +556,7 @@ class Plan extends ResourceModel
ArgumentValidator::validate($this->getId(), "Id");
$patchRequest = new PatchRequest();
$patch = new Patch();
- $value = new PPModel('{
+ $value = new PayPalModel('{
"state":"DELETED"
}');
$patch->setOp('replace')
@@ -571,7 +571,7 @@ class Plan extends ResourceModel
*
* @param array $params
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return PlanList
*/
public static function all($params, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/PlanList.php b/lib/PayPal/Api/PlanList.php
index 9f4b3cd..d8cb675 100644
--- a/lib/PayPal/Api/PlanList.php
+++ b/lib/PayPal/Api/PlanList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class PlanList
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property string total_pages
* @property \PayPal\Api\Links[] links
*/
-class PlanList extends PPModel
+class PlanList extends PayPalModel
{
/**
* Array of billing plans.
diff --git a/lib/PayPal/Api/Presentation.php b/lib/PayPal/Api/Presentation.php
index a98ed70..4b41858 100644
--- a/lib/PayPal/Api/Presentation.php
+++ b/lib/PayPal/Api/Presentation.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Presentation
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string logo_image
* @property string locale_code
*/
-class Presentation extends PPModel
+class Presentation extends PayPalModel
{
/**
* A label that overrides the business name in the PayPal account on the PayPal pages.
diff --git a/lib/PayPal/Api/RedirectUrls.php b/lib/PayPal/Api/RedirectUrls.php
index b40921b..3f334c1 100644
--- a/lib/PayPal/Api/RedirectUrls.php
+++ b/lib/PayPal/Api/RedirectUrls.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Validation\UrlValidator;
@@ -16,7 +16,7 @@ use PayPal\Validation\UrlValidator;
* @property string return_url
* @property string cancel_url
*/
-class RedirectUrls extends PPModel
+class RedirectUrls extends PayPalModel
{
/**
* Url where the payer would be redirected to after approving the payment.
diff --git a/lib/PayPal/Api/Refund.php b/lib/PayPal/Api/Refund.php
index 92ad3c7..b0c76c0 100644
--- a/lib/PayPal/Api/Refund.php
+++ b/lib/PayPal/Api/Refund.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
use PayPal\Rest\IResource;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -26,7 +26,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string description
* @property \PayPal\Api\Links links
*/
-class Refund extends PPModel implements IResource
+class Refund extends PayPalModel implements IResource
{
/**
* OAuth Credentials to use for this call
@@ -426,8 +426,8 @@ class Refund extends PPModel implements IResource
if ($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
- $call = new PPRestCall($apiContext);
- $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
+ $call = new PayPalRestCall($apiContext);
+ $json = $call->execute(array('PayPal\Handler\RestHandler'), "/v1/payments/refund/$refundId", "GET", $payLoad);
$ret = new Refund();
$ret->fromJson($json);
return $ret;
diff --git a/lib/PayPal/Api/RefundDetail.php b/lib/PayPal/Api/RefundDetail.php
index f95f8d7..26023b0 100644
--- a/lib/PayPal/Api/RefundDetail.php
+++ b/lib/PayPal/Api/RefundDetail.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class RefundDetail
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property string date
* @property string note
*/
-class RefundDetail extends PPModel
+class RefundDetail extends PayPalModel
{
/**
* PayPal refund type indicating whether refund was done in invoicing flow via PayPal or externally. In the case of the mark-as-refunded API, refund type is EXTERNAL and this is what is now supported. The PAYPAL value is provided for backward compatibility.
diff --git a/lib/PayPal/Api/RelatedResources.php b/lib/PayPal/Api/RelatedResources.php
index 761c03e..191a05c 100644
--- a/lib/PayPal/Api/RelatedResources.php
+++ b/lib/PayPal/Api/RelatedResources.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -18,7 +18,7 @@ use PayPal\Rest\ApiContext;
* @property \PayPal\Api\Capture capture
* @property \PayPal\Api\Refund refund
*/
-class RelatedResources extends PPModel
+class RelatedResources extends PayPalModel
{
/**
* A sale transaction
diff --git a/lib/PayPal/Api/Sale.php b/lib/PayPal/Api/Sale.php
index 1ba5c00..287b0f0 100644
--- a/lib/PayPal/Api/Sale.php
+++ b/lib/PayPal/Api/Sale.php
@@ -2,10 +2,10 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Rest\ApiContext;
use PayPal\Api\Refund;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\ArgumentValidator;
/**
@@ -29,7 +29,7 @@ use PayPal\Validation\ArgumentValidator;
* @property string parent_payment
* @property \PayPal\Api\Links links
*/
-class Sale extends ResourceModel
+class Sale extends PayPalResourceModel
{
/**
* OAuth Credentials to use for this call
@@ -591,7 +591,7 @@ class Sale extends ResourceModel
*
* @param string $saleId
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Sale
*/
public static function get($saleId, $apiContext = null, $restCall = null)
@@ -617,7 +617,7 @@ class Sale extends ResourceModel
*
* @param Refund $refund
* @param \PayPal\Rest\ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Refund
*/
public function refund($refund, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/Search.php b/lib/PayPal/Api/Search.php
index 5b3d846..fcde390 100644
--- a/lib/PayPal/Api/Search.php
+++ b/lib/PayPal/Api/Search.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Search
@@ -31,7 +31,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\number page_size
* @property bool total_count_required
*/
-class Search extends PPModel
+class Search extends PayPalModel
{
/**
* Initial letters of the email address.
diff --git a/lib/PayPal/Api/ShippingAddress.php b/lib/PayPal/Api/ShippingAddress.php
index c04e5f1..2ad7a4c 100644
--- a/lib/PayPal/Api/ShippingAddress.php
+++ b/lib/PayPal/Api/ShippingAddress.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ShippingAddress
diff --git a/lib/PayPal/Api/ShippingCost.php b/lib/PayPal/Api/ShippingCost.php
index e3a1651..b4beeb8 100644
--- a/lib/PayPal/Api/ShippingCost.php
+++ b/lib/PayPal/Api/ShippingCost.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ShippingCost
@@ -14,7 +14,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount
* @property \PayPal\Api\Tax tax
*/
-class ShippingCost extends PPModel
+class ShippingCost extends PayPalModel
{
/**
* Shipping cost in amount. Range of 0 to 999999.99.
diff --git a/lib/PayPal/Api/ShippingInfo.php b/lib/PayPal/Api/ShippingInfo.php
index 423f8ff..1a897a3 100644
--- a/lib/PayPal/Api/ShippingInfo.php
+++ b/lib/PayPal/Api/ShippingInfo.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class ShippingInfo
@@ -17,7 +17,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Phone phone
* @property \PayPal\Api\InvoiceAddress address
*/
-class ShippingInfo extends PPModel
+class ShippingInfo extends PayPalModel
{
/**
* First name of the invoice recipient. 30 characters max.
diff --git a/lib/PayPal/Api/Tax.php b/lib/PayPal/Api/Tax.php
index fc02674..d5b99ab 100644
--- a/lib/PayPal/Api/Tax.php
+++ b/lib/PayPal/Api/Tax.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Tax
@@ -16,7 +16,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\number percent
* @property \PayPal\Api\Currency amount
*/
-class Tax extends PPModel
+class Tax extends PayPalModel
{
/**
* Identifier of the resource.
diff --git a/lib/PayPal/Api/Terms.php b/lib/PayPal/Api/Terms.php
index 20582ca..f380e85 100644
--- a/lib/PayPal/Api/Terms.php
+++ b/lib/PayPal/Api/Terms.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class Terms
@@ -18,7 +18,7 @@ use PayPal\Common\PPModel;
* @property \PayPal\Api\Currency amount_range
* @property string buyer_editable
*/
-class Terms extends PPModel
+class Terms extends PayPalModel
{
/**
* Identifier of the terms. 128 characters max.
diff --git a/lib/PayPal/Api/Transaction.php b/lib/PayPal/Api/Transaction.php
index 33b8c63..c14f6c8 100644
--- a/lib/PayPal/Api/Transaction.php
+++ b/lib/PayPal/Api/Transaction.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
diff --git a/lib/PayPal/Api/TransactionBase.php b/lib/PayPal/Api/TransactionBase.php
index 2b477c0..03aded4 100644
--- a/lib/PayPal/Api/TransactionBase.php
+++ b/lib/PayPal/Api/TransactionBase.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
diff --git a/lib/PayPal/Api/Transactions.php b/lib/PayPal/Api/Transactions.php
index 8cb6e6a..100fff5 100644
--- a/lib/PayPal/Api/Transactions.php
+++ b/lib/PayPal/Api/Transactions.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
use PayPal\Rest\ApiContext;
/**
@@ -14,7 +14,7 @@ use PayPal\Rest\ApiContext;
*
* @property \PayPal\Api\Amount amount
*/
-class Transactions extends PPModel
+class Transactions extends PayPalModel
{
/**
* Amount being collected.
diff --git a/lib/PayPal/Api/WebProfile.php b/lib/PayPal/Api/WebProfile.php
index 292975a..761733c 100644
--- a/lib/PayPal/Api/WebProfile.php
+++ b/lib/PayPal/Api/WebProfile.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\CreateProfileResponse;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class WebProfile
@@ -21,7 +21,7 @@ use PayPal\Transport\PPRestCall;
* @property \PayPal\Api\InputFields input_fields
* @property \PayPal\Api\Presentation presentation
*/
-class WebProfile extends ResourceModel
+class WebProfile extends PayPalResourceModel
{
/**
* ID of the web experience profile.
@@ -197,7 +197,7 @@ class WebProfile extends ResourceModel
* Create a web experience profile by passing the name of the profile and other profile details in the request JSON to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return CreateProfileResponse
*/
public function create($apiContext = null, $restCall = null)
@@ -220,7 +220,7 @@ class WebProfile extends ResourceModel
* Update a web experience profile by passing the ID of the profile to the request URI. In addition, pass the profile details in the request JSON. If your request does not include values for all profile detail fields, the previously set values for the omitted fields are removed by this operation.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function update($apiContext = null, $restCall = null)
@@ -243,7 +243,7 @@ class WebProfile extends ResourceModel
*
* @param Patch[] $patch
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function partial_update($patch, $apiContext = null, $restCall = null)
@@ -271,7 +271,7 @@ class WebProfile extends ResourceModel
*
* @param string $profileId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebProfile
*/
public static function get($profileId, $apiContext = null, $restCall = null)
@@ -295,7 +295,7 @@ class WebProfile extends ResourceModel
* Lists all web experience profiles that exist for a merchant (or subject).
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebProfile[]
*/
public static function get_list($apiContext = null, $restCall = null)
@@ -316,7 +316,7 @@ class WebProfile extends ResourceModel
* Delete an existing web experience profile by passing the profile ID to the request URI.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/Webhook.php b/lib/PayPal/Api/Webhook.php
index fdaa559..b5e485f 100644
--- a/lib/PayPal/Api/Webhook.php
+++ b/lib/PayPal/Api/Webhook.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
use PayPal\Validation\UrlValidator;
/**
@@ -21,7 +21,7 @@ use PayPal\Validation\UrlValidator;
* @property \PayPal\Api\WebhookEventType[] event_types
* @property \PayPal\Api\Links[] links
*/
-class Webhook extends ResourceModel
+class Webhook extends PayPalResourceModel
{
/**
* Identifier of the webhook resource.
@@ -205,7 +205,7 @@ class Webhook extends ResourceModel
* Creates the Webhook for the application associated with the access token.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public function create($apiContext = null, $restCall = null)
@@ -228,7 +228,7 @@ class Webhook extends ResourceModel
*
* @param string $webhookId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public static function get($webhookId, $apiContext = null, $restCall = null)
@@ -252,7 +252,7 @@ class Webhook extends ResourceModel
* Retrieves all Webhooks for the application associated with access token.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookList
*/
public static function getAll($apiContext = null, $restCall = null)
@@ -276,7 +276,7 @@ class Webhook extends ResourceModel
*
* @param PatchRequest $patchRequest
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return Webhook
*/
public function update($patchRequest, $apiContext = null, $restCall = null)
@@ -300,7 +300,7 @@ class Webhook extends ResourceModel
* Deletes the Webhook identified by webhook_id for the application associated with access token.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return bool
*/
public function delete($apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/WebhookEvent.php b/lib/PayPal/Api/WebhookEvent.php
index cc69209..0404577 100644
--- a/lib/PayPal/Api/WebhookEvent.php
+++ b/lib/PayPal/Api/WebhookEvent.php
@@ -2,12 +2,12 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class WebhookEvent
@@ -24,7 +24,7 @@ use PayPal\Transport\PPRestCall;
* @property mixed resource
* @property \PayPal\Api\Links[] links
*/
-class WebhookEvent extends ResourceModel
+class WebhookEvent extends PayPalResourceModel
{
/**
* Identifier of the Webhooks event resource.
@@ -219,7 +219,7 @@ class WebhookEvent extends ResourceModel
/**
* This contains the resource that is identified by resource_type element.
*
- * @param \PayPal\Common\PPModel $resource
+ * @param \PayPal\Common\PayPalModel $resource
*
* @return $this
*/
@@ -232,7 +232,7 @@ class WebhookEvent extends ResourceModel
/**
* This contains the resource that is identified by resource_type element.
*
- * @return \PayPal\Common\PPModel
+ * @return \PayPal\Common\PayPalModel
*/
public function getResource()
{
@@ -297,7 +297,7 @@ class WebhookEvent extends ResourceModel
*
* @param string $eventId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEvent
*/
public static function get($eventId, $apiContext = null, $restCall = null)
@@ -321,7 +321,7 @@ class WebhookEvent extends ResourceModel
* Resends the Webhooks event resource identified by event_id.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEvent
*/
public function resend($apiContext = null, $restCall = null)
@@ -345,7 +345,7 @@ class WebhookEvent extends ResourceModel
*
* @param array $params
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventList
*/
public static function all($params, $apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/WebhookEventList.php b/lib/PayPal/Api/WebhookEventList.php
index eae4da6..3ad2d8a 100644
--- a/lib/PayPal/Api/WebhookEventList.php
+++ b/lib/PayPal/Api/WebhookEventList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class WebhookEventList
@@ -15,7 +15,7 @@ use PayPal\Common\PPModel;
* @property int count
* @property \PayPal\Api\Links[] links
*/
-class WebhookEventList extends PPModel
+class WebhookEventList extends PayPalModel
{
/**
* A list of Webhooks event resources
diff --git a/lib/PayPal/Api/WebhookEventType.php b/lib/PayPal/Api/WebhookEventType.php
index c0287ff..23dcbb6 100644
--- a/lib/PayPal/Api/WebhookEventType.php
+++ b/lib/PayPal/Api/WebhookEventType.php
@@ -2,11 +2,11 @@
namespace PayPal\Api;
-use PayPal\Common\ResourceModel;
+use PayPal\Common\PayPalResourceModel;
use PayPal\Validation\ArgumentValidator;
use PayPal\Api\WebhookEventList;
use PayPal\Rest\ApiContext;
-use PayPal\Transport\PPRestCall;
+use PayPal\Transport\PayPalRestCall;
/**
* Class WebhookEventType
@@ -18,7 +18,7 @@ use PayPal\Transport\PPRestCall;
* @property string name
* @property string description
*/
-class WebhookEventType extends ResourceModel
+class WebhookEventType extends PayPalResourceModel
{
/**
* Unique event-type name.
@@ -71,7 +71,7 @@ class WebhookEventType extends ResourceModel
*
* @param string $webhookId
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventTypeList
*/
public static function subscribedEventTypes($webhookId, $apiContext = null, $restCall = null)
@@ -95,7 +95,7 @@ class WebhookEventType extends ResourceModel
* Retrieves the master list of available Webhooks events-types resources for any webhook to subscribe to.
*
* @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
- * @param PPRestCall $restCall is the Rest Call Service that is used to make rest calls
+ * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
* @return WebhookEventTypeList
*/
public static function availableEventTypes($apiContext = null, $restCall = null)
diff --git a/lib/PayPal/Api/WebhookEventTypeList.php b/lib/PayPal/Api/WebhookEventTypeList.php
index 867db39..e812c93 100644
--- a/lib/PayPal/Api/WebhookEventTypeList.php
+++ b/lib/PayPal/Api/WebhookEventTypeList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class WebhookEventTypeList
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\WebhookEventType[] event_types
*/
-class WebhookEventTypeList extends PPModel
+class WebhookEventTypeList extends PayPalModel
{
/**
* A list of Webhooks event-types
diff --git a/lib/PayPal/Api/WebhookList.php b/lib/PayPal/Api/WebhookList.php
index c0aa129..4bb5148 100644
--- a/lib/PayPal/Api/WebhookList.php
+++ b/lib/PayPal/Api/WebhookList.php
@@ -2,7 +2,7 @@
namespace PayPal\Api;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
/**
* Class WebhookList
@@ -13,7 +13,7 @@ use PayPal\Common\PPModel;
*
* @property \PayPal\Api\Webhook[] webhooks
*/
-class WebhookList extends PPModel
+class WebhookList extends PayPalModel
{
/**
* A list of Webhooks
diff --git a/lib/PayPal/Auth/OAuthTokenCredential.php b/lib/PayPal/Auth/OAuthTokenCredential.php
index 52e1232..7d3356b 100644
--- a/lib/PayPal/Auth/OAuthTokenCredential.php
+++ b/lib/PayPal/Auth/OAuthTokenCredential.php
@@ -3,18 +3,18 @@
namespace PayPal\Auth;
use PayPal\Cache\AuthorizationCache;
-use PayPal\Common\ResourceModel;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Core\PPHttpConnection;
-use PayPal\Core\PPLoggingManager;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Handler\IPPHandler;
+use PayPal\Common\PayPalResourceModel;
+use PayPal\Core\PayPalHttpConfig;
+use PayPal\Core\PayPalHttpConnection;
+use PayPal\Core\PayPalLoggingManager;
+use PayPal\Exception\PayPalConfigurationException;
+use PayPal\Handler\IPayPalHandler;
use PayPal\Rest\ApiContext;
/**
* Class OAuthTokenCredential
*/
-class OAuthTokenCredential extends ResourceModel
+class OAuthTokenCredential extends PayPalResourceModel
{
public static $CACHE_PATH = '/../../../var/auth.cache';
@@ -22,7 +22,7 @@ class OAuthTokenCredential extends ResourceModel
/**
* @var string Default Auth Handler
*/
- public static $AUTH_HANDLER = 'PayPal\Rest\OauthHandler';
+ public static $AUTH_HANDLER = 'PayPal\Handler\OauthHandler';
/**
* Private Variable
@@ -34,7 +34,7 @@ class OAuthTokenCredential extends ResourceModel
/**
* Private Variable
*
- * @var \PayPal\Core\PPLoggingManager $logger
+ * @var \PayPal\Core\PayPalLoggingManager $logger
*/
private $logger;
@@ -83,7 +83,7 @@ class OAuthTokenCredential extends ResourceModel
{
$this->clientId = $clientId;
$this->clientSecret = $clientSecret;
- $this->logger = PPLoggingManager::getInstance(__CLASS__);
+ $this->logger = PayPalLoggingManager::getInstance(__CLASS__);
}
/**
@@ -199,16 +199,16 @@ class OAuthTokenCredential extends ResourceModel
* @param string $clientSecret
* @param string $payload
* @return mixed
- * @throws PPConfigurationException
- * @throws \PayPal\Exception\PPConnectionException
+ * @throws PayPalConfigurationException
+ * @throws \PayPal\Exception\PayPalConnectionException
*/
private function getToken($config, $clientId, $clientSecret, $payload)
{
- $httpConfig = new PPHttpConfig(null, 'POST');
+ $httpConfig = new PayPalHttpConfig(null, 'POST');
$handlers = array(self::$AUTH_HANDLER);
- /** @var IPPHandler $handler */
+ /** @var IPayPalHandler $handler */
foreach ($handlers as $handler) {
if (!is_object($handler)) {
$fullHandler = "\\" . (string)$handler;
@@ -217,7 +217,7 @@ class OAuthTokenCredential extends ResourceModel
$handler->handle($httpConfig, $payload, array('clientId' => $clientId, 'clientSecret' => $clientSecret));
}
- $connection = new PPHttpConnection($httpConfig, $config);
+ $connection = new PayPalHttpConnection($httpConfig, $config);
$res = $connection->execute($payload);
$response = json_decode($res, true);
diff --git a/lib/PayPal/Cache/AuthorizationCache.php b/lib/PayPal/Cache/AuthorizationCache.php
index c1f7cfd..1da0d0f 100644
--- a/lib/PayPal/Cache/AuthorizationCache.php
+++ b/lib/PayPal/Cache/AuthorizationCache.php
@@ -2,7 +2,7 @@
namespace PayPal\Cache;
-use PayPal\Core\PPConfigManager;
+use PayPal\Core\PayPalConfigManager;
use PayPal\Validation\JsonValidator;
abstract class AuthorizationCache
@@ -82,7 +82,7 @@ abstract class AuthorizationCache
*/
public static function isEnabled($config)
{
- $config = ($config && is_array($config)) ? $config : PPConfigManager::getInstance()->getConfigHashmap();
+ $config = ($config && is_array($config)) ? $config : PayPalConfigManager::getInstance()->getConfigHashmap();
if (array_key_exists("cache.enabled", $config)) {
$value = $config['cache.enabled'];
return (trim($value) == 'true') ? true : false;
diff --git a/lib/PayPal/Common/PPArrayUtil.php b/lib/PayPal/Common/ArrayUtil.php
similarity index 90%
rename from lib/PayPal/Common/PPArrayUtil.php
rename to lib/PayPal/Common/ArrayUtil.php
index 6b6342e..f36be34 100644
--- a/lib/PayPal/Common/PPArrayUtil.php
+++ b/lib/PayPal/Common/ArrayUtil.php
@@ -3,12 +3,12 @@
namespace PayPal\Common;
/**
- * Class PPArrayUtil
+ * Class ArrayUtil
* Util Class for Arrays
*
* @package PayPal\Common
*/
-class PPArrayUtil
+class ArrayUtil
{
/**
@@ -25,4 +25,4 @@ class PPArrayUtil
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Common/PPModel.php b/lib/PayPal/Common/PayPalModel.php
similarity index 95%
rename from lib/PayPal/Common/PPModel.php
rename to lib/PayPal/Common/PayPalModel.php
index bdcf662..681d89d 100644
--- a/lib/PayPal/Common/PPModel.php
+++ b/lib/PayPal/Common/PayPalModel.php
@@ -9,7 +9,7 @@ use PayPal\Validation\ModelAccessorValidator;
* Stores all member data in a Hashmap that enables easy
* JSON encoding/decoding
*/
-class PPModel
+class PayPalModel
{
private $_propMap = array();
@@ -52,7 +52,7 @@ class PPModel
//Convert to Array if Json Data Sent
$data = json_decode($data, true);
}
- if (!PPArrayUtil::isAssocArray($data)) {
+ if (!ArrayUtil::isAssocArray($data)) {
$list = array();
//This means, root element is array
foreach ($data as $k => $v) {
@@ -136,7 +136,7 @@ class PPModel
{
$ret = array();
foreach ($param as $k => $v) {
- if ($v instanceof PPModel) {
+ if ($v instanceof PayPalModel) {
$ret[$k] = $v->toArray();
} else if (is_array($v)) {
$ret[$k] = $this->_convertToArray($v);
@@ -158,8 +158,8 @@ class PPModel
if (!empty($arr)) {
foreach ($arr as $k => $v) {
if (is_array($v)) {
- $clazz = PPReflectionUtil::getPropertyClass(get_class($this), $k);
- if (PPArrayUtil::isAssocArray($v)) {
+ $clazz = ReflectionUtil::getPropertyClass(get_class($this), $k);
+ if (ArrayUtil::isAssocArray($v)) {
/** @var self $o */
$o = new $clazz();
$o->fromArray($v);
diff --git a/lib/PayPal/Common/ResourceModel.php b/lib/PayPal/Common/PayPalResourceModel.php
similarity index 78%
rename from lib/PayPal/Common/ResourceModel.php
rename to lib/PayPal/Common/PayPalResourceModel.php
index 97e941c..ec8c4c6 100644
--- a/lib/PayPal/Common/ResourceModel.php
+++ b/lib/PayPal/Common/PayPalResourceModel.php
@@ -1,19 +1,19 @@
execute($handlers, $url, $method, $payLoad, $headers);
diff --git a/lib/PayPal/Common/PPUserAgent.php b/lib/PayPal/Common/PayPalUserAgent.php
similarity index 92%
rename from lib/PayPal/Common/PPUserAgent.php
rename to lib/PayPal/Common/PayPalUserAgent.php
index 1ce5655..d6adc47 100644
--- a/lib/PayPal/Common/PPUserAgent.php
+++ b/lib/PayPal/Common/PayPalUserAgent.php
@@ -3,12 +3,12 @@
namespace PayPal\Common;
/**
- * Class PPUserAgent
- * PPUserAgent generates User Agent for curl requests
+ * Class PayPalUserAgent
+ * PayPalUserAgent generates User Agent for curl requests
*
* @package PayPal\Common
*/
-class PPUserAgent
+class PayPalUserAgent
{
/**
@@ -56,4 +56,4 @@ class PPUserAgent
return PHP_INT_SIZE;
}
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Common/PPReflectionUtil.php b/lib/PayPal/Common/ReflectionUtil.php
similarity index 92%
rename from lib/PayPal/Common/PPReflectionUtil.php
rename to lib/PayPal/Common/ReflectionUtil.php
index 9222bf6..b57e242 100644
--- a/lib/PayPal/Common/PPReflectionUtil.php
+++ b/lib/PayPal/Common/ReflectionUtil.php
@@ -3,11 +3,11 @@
namespace PayPal\Common;
/**
- * Class PPReflectionUtil
+ * Class ReflectionUtil
*
* @package PayPal\Common
*/
-class PPReflectionUtil
+class ReflectionUtil
{
/**
@@ -34,9 +34,9 @@ class PPReflectionUtil
*/
public static function getPropertyClass($class, $propertyName)
{
- if ($class == get_class(new PPModel())) {
- // Make it generic if PPModel is used for generating this
- return get_class(new PPModel());
+ if ($class == get_class(new PayPalModel())) {
+ // Make it generic if PayPalModel is used for generating this
+ return get_class(new PayPalModel());
}
if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {
diff --git a/lib/PayPal/Common/FormatConverter.php b/lib/PayPal/Converter/FormatConverter.php
similarity index 98%
rename from lib/PayPal/Common/FormatConverter.php
rename to lib/PayPal/Converter/FormatConverter.php
index e5db4b5..e9b0a47 100644
--- a/lib/PayPal/Common/FormatConverter.php
+++ b/lib/PayPal/Converter/FormatConverter.php
@@ -1,6 +1,6 @@
getConfigHashmap() : $config);
+ self::$instance = new self($config == null ? PayPalConfigManager::getInstance()->getConfigHashmap() : $config);
}
return self::$instance;
}
@@ -140,7 +140,7 @@ class PPCredentialManager
*
* @param null $userId
* @return OAuthTokenCredential
- * @throws PPInvalidCredentialException
+ * @throws PayPalInvalidCredentialException
*/
public function getCredentialObject($userId = null)
{
@@ -151,7 +151,7 @@ class PPCredentialManager
}
if (empty($credObj)) {
- throw new PPInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") .
+ throw new PayPalInvalidCredentialException("Credential not found for " . ($userId ? $userId : " default user") .
". Please make sure your configuration/APIContext has credential information");
}
return $credObj;
diff --git a/lib/PayPal/Core/PPHttpConfig.php b/lib/PayPal/Core/PayPalHttpConfig.php
similarity index 95%
rename from lib/PayPal/Core/PPHttpConfig.php
rename to lib/PayPal/Core/PayPalHttpConfig.php
index ced08ef..aed127d 100644
--- a/lib/PayPal/Core/PPHttpConfig.php
+++ b/lib/PayPal/Core/PayPalHttpConfig.php
@@ -2,19 +2,19 @@
namespace PayPal\Core;
-use PayPal\Exception\PPConfigurationException;
+use PayPal\Exception\PayPalConfigurationException;
/**
- * Class PPHttpConfig
+ * Class PayPalHttpConfig
* Http Configuration Class
*
* @package PayPal\Core
*/
-class PPHttpConfig
+class PayPalHttpConfig
{
/**
* Some default options for curl
- * These are typically overridden by PPConnectionManager
+ * These are typically overridden by PayPalConnectionManager
*
* @var array
*/
@@ -228,13 +228,13 @@ class PPHttpConfig
* Set HTTP proxy information
*
* @param string $proxy
- * @throws PPConfigurationException
+ * @throws PayPalConfigurationException
*/
public function setHttpProxy($proxy)
{
$urlParts = parse_url($proxy);
if ($urlParts == false || !array_key_exists("host", $urlParts)) {
- throw new PPConfigurationException("Invalid proxy configuration " . $proxy);
+ throw new PayPalConfigurationException("Invalid proxy configuration " . $proxy);
}
$this->curlOptions[CURLOPT_PROXY] = $urlParts["host"];
if (isset($urlParts["port"])) {
diff --git a/lib/PayPal/Core/PPHttpConnection.php b/lib/PayPal/Core/PayPalHttpConnection.php
similarity index 86%
rename from lib/PayPal/Core/PPHttpConnection.php
rename to lib/PayPal/Core/PayPalHttpConnection.php
index 8554686..c3537ee 100644
--- a/lib/PayPal/Core/PPHttpConnection.php
+++ b/lib/PayPal/Core/PayPalHttpConnection.php
@@ -2,19 +2,19 @@
namespace PayPal\Core;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Exception\PPConnectionException;
+use PayPal\Exception\PayPalConfigurationException;
+use PayPal\Exception\PayPalConnectionException;
/**
* A wrapper class based on the curl extension.
* Requires the PHP curl module to be enabled.
* See for full requirements the PHP manual: http://php.net/curl
*/
-class PPHttpConnection
+class PayPalHttpConnection
{
/**
- * @var PPHttpConfig
+ * @var PayPalHttpConfig
*/
private $httpConfig;
@@ -28,24 +28,24 @@ class PPHttpConnection
/**
* LoggingManager
*
- * @var PPLoggingManager
+ * @var PayPalLoggingManager
*/
private $logger;
/**
* Default Constructor
*
- * @param PPHttpConfig $httpConfig
+ * @param PayPalHttpConfig $httpConfig
* @param array $config
- * @throws PPConfigurationException
+ * @throws PayPalConfigurationException
*/
- public function __construct(PPHttpConfig $httpConfig, array $config)
+ public function __construct(PayPalHttpConfig $httpConfig, array $config)
{
if (!function_exists("curl_init")) {
- throw new PPConfigurationException("Curl module is not available on this system");
+ throw new PayPalConfigurationException("Curl module is not available on this system");
}
$this->httpConfig = $httpConfig;
- $this->logger = PPLoggingManager::getInstance(__CLASS__);
+ $this->logger = PayPalLoggingManager::getInstance(__CLASS__);
}
/**
@@ -67,14 +67,14 @@ class PPHttpConnection
* Executes an HTTP request
*
* @param string $data query string OR POST content as a string
- * @throws PPConnectionException
+ * @throws PayPalConnectionException
*/
/**
* Executes an HTTP request
*
* @param string $data query string OR POST content as a string
* @return mixed
- * @throws PPConnectionException
+ * @throws PayPalConnectionException
*/
public function execute($data)
{
@@ -134,7 +134,7 @@ class PPHttpConnection
//Throw Exception if Retries and Certificates doenst work
if (curl_errno($ch)) {
- $ex = new PPConnectionException(
+ $ex = new PayPalConnectionException(
$this->httpConfig->getUrl(),
curl_error($ch),
curl_errno($ch)
@@ -148,7 +148,7 @@ class PPHttpConnection
$this->logger->fine(($result && $result != '' ? "Response : " . $result : "No Response Body") . "\n\n");
//More Exceptions based on HttpStatus Code
if (in_array($httpStatus, self::$retryCodes)) {
- $ex = new PPConnectionException(
+ $ex = new PayPalConnectionException(
$this->httpConfig->getUrl(),
"Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. " .
"Retried $retries times."
@@ -156,7 +156,7 @@ class PPHttpConnection
$ex->setData($result);
throw $ex;
} else if ($httpStatus < 200 || $httpStatus >= 300) {
- $ex = new PPConnectionException(
+ $ex = new PayPalConnectionException(
$this->httpConfig->getUrl(),
"Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}.",
$httpStatus
diff --git a/lib/PayPal/Core/PPLoggingLevel.php b/lib/PayPal/Core/PayPalLoggingLevel.php
similarity index 91%
rename from lib/PayPal/Core/PPLoggingLevel.php
rename to lib/PayPal/Core/PayPalLoggingLevel.php
index af59287..98faad4 100644
--- a/lib/PayPal/Core/PPLoggingLevel.php
+++ b/lib/PayPal/Core/PayPalLoggingLevel.php
@@ -6,7 +6,7 @@ namespace PayPal\Core;
* Logging Levels.
* Class containing all the constants for Logging Levels.
*/
-class PPLoggingLevel
+class PayPalLoggingLevel
{
// FINE Logging Level
@@ -20,4 +20,4 @@ class PPLoggingLevel
// ERROR Logging Level
const ERROR = 0;
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Core/PPLoggingManager.php b/lib/PayPal/Core/PayPalLoggingManager.php
similarity index 80%
rename from lib/PayPal/Core/PPLoggingManager.php
rename to lib/PayPal/Core/PayPalLoggingManager.php
index a2eda13..fc2565a 100644
--- a/lib/PayPal/Core/PPLoggingManager.php
+++ b/lib/PayPal/Core/PayPalLoggingManager.php
@@ -7,7 +7,7 @@ namespace PayPal\Core;
* This does an error_log for now
* Potential frameworks to use are PEAR logger, log4php from Apache
*/
-class PPLoggingManager
+class PayPalLoggingManager
{
/**
@@ -75,7 +75,7 @@ class PPLoggingManager
date_default_timezone_set('GMT');
}
- $config = PPConfigManager::getInstance()->getConfigHashmap();
+ $config = PayPalConfigManager::getInstance()->getConfigHashmap();
$this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1');
@@ -83,9 +83,9 @@ class PPLoggingManager
$this->loggerFile = ($config['log.FileName']) ? $config['log.FileName'] : ini_get('error_log');
$loggingLevel = strtoupper($config['log.LogLevel']);
$this->loggingLevel =
- (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel")) ?
- constant(__NAMESPACE__ . "\\PPLoggingLevel::$loggingLevel") :
- PPLoggingManager::DEFAULT_LOGGING_LEVEL;
+ (isset($loggingLevel) && defined(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel")) ?
+ constant(__NAMESPACE__ . "\\PayPalLoggingLevel::$loggingLevel") :
+ PayPalLoggingManager::DEFAULT_LOGGING_LEVEL;
}
}
@@ -95,7 +95,7 @@ class PPLoggingManager
* @param string $message
* @param int $level
*/
- private function log($message, $level = PPLoggingLevel::INFO)
+ private function log($message, $level = PayPalLoggingLevel::INFO)
{
if ($this->isLoggingEnabled && ($level <= $this->loggingLevel)) {
error_log("[" . date('d-m-Y h:i:s') . "] " . $this->loggerName . ": $message\n", 3, $this->loggerFile);
@@ -109,7 +109,7 @@ class PPLoggingManager
*/
public function error($message)
{
- $this->log('ERROR: ' . $message, PPLoggingLevel::ERROR);
+ $this->log('ERROR: ' . $message, PayPalLoggingLevel::ERROR);
}
/**
@@ -119,7 +119,7 @@ class PPLoggingManager
*/
public function warning($message)
{
- $this->log('WARNING: ' . $message, PPLoggingLevel::WARN);
+ $this->log('WARNING: ' . $message, PayPalLoggingLevel::WARN);
}
/**
@@ -129,7 +129,7 @@ class PPLoggingManager
*/
public function info($message)
{
- $this->log('INFO: ' . $message, PPLoggingLevel::INFO);
+ $this->log('INFO: ' . $message, PayPalLoggingLevel::INFO);
}
/**
@@ -139,7 +139,7 @@ class PPLoggingManager
*/
public function fine($message)
{
- $this->log('FINE: ' . $message, PPLoggingLevel::FINE);
+ $this->log('FINE: ' . $message, PayPalLoggingLevel::FINE);
}
}
diff --git a/lib/PayPal/Exception/PPConfigurationException.php b/lib/PayPal/Exception/PayPalConfigurationException.php
similarity index 76%
rename from lib/PayPal/Exception/PPConfigurationException.php
rename to lib/PayPal/Exception/PayPalConfigurationException.php
index b17d2eb..5105747 100644
--- a/lib/PayPal/Exception/PPConfigurationException.php
+++ b/lib/PayPal/Exception/PayPalConfigurationException.php
@@ -3,11 +3,11 @@
namespace PayPal\Exception;
/**
- * Class PPConfigurationException
+ * Class PayPalConfigurationException
*
* @package PayPal\Exception
*/
-class PPConfigurationException extends \Exception
+class PayPalConfigurationException extends \Exception
{
/**
@@ -20,4 +20,4 @@ class PPConfigurationException extends \Exception
{
parent::__construct($message, $code);
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Exception/PPConnectionException.php b/lib/PayPal/Exception/PayPalConnectionException.php
similarity index 91%
rename from lib/PayPal/Exception/PPConnectionException.php
rename to lib/PayPal/Exception/PayPalConnectionException.php
index 69740eb..72eeafe 100644
--- a/lib/PayPal/Exception/PPConnectionException.php
+++ b/lib/PayPal/Exception/PayPalConnectionException.php
@@ -3,11 +3,11 @@
namespace PayPal\Exception;
/**
- * Class PPConnectionException
+ * Class PayPalConnectionException
*
* @package PayPal\Exception
*/
-class PPConnectionException extends \Exception
+class PayPalConnectionException extends \Exception
{
/**
* The url that was being connected to when the exception occured
@@ -65,4 +65,4 @@ class PPConnectionException extends \Exception
{
return $this->url;
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Exception/PPInvalidCredentialException.php b/lib/PayPal/Exception/PayPalInvalidCredentialException.php
similarity index 85%
rename from lib/PayPal/Exception/PPInvalidCredentialException.php
rename to lib/PayPal/Exception/PayPalInvalidCredentialException.php
index 71b6f59..2531f5b 100644
--- a/lib/PayPal/Exception/PPInvalidCredentialException.php
+++ b/lib/PayPal/Exception/PayPalInvalidCredentialException.php
@@ -3,11 +3,11 @@
namespace PayPal\Exception;
/**
- * Class PPInvalidCredentialException
+ * Class PayPalInvalidCredentialException
*
* @package PayPal\Exception
*/
-class PPInvalidCredentialException extends \Exception
+class PayPalInvalidCredentialException extends \Exception
{
/**
@@ -33,4 +33,4 @@ class PPInvalidCredentialException extends \Exception
return $errorMsg;
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Exception/PPMissingCredentialException.php b/lib/PayPal/Exception/PayPalMissingCredentialException.php
similarity index 85%
rename from lib/PayPal/Exception/PPMissingCredentialException.php
rename to lib/PayPal/Exception/PayPalMissingCredentialException.php
index a5ecae9..9fac996 100644
--- a/lib/PayPal/Exception/PPMissingCredentialException.php
+++ b/lib/PayPal/Exception/PayPalMissingCredentialException.php
@@ -3,11 +3,11 @@
namespace PayPal\Exception;
/**
- * Class PPMissingCredentialException
+ * Class PayPalMissingCredentialException
*
* @package PayPal\Exception
*/
-class PPMissingCredentialException extends \Exception
+class PayPalMissingCredentialException extends \Exception
{
/**
@@ -34,4 +34,4 @@ class PPMissingCredentialException extends \Exception
return $errorMsg;
}
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Handler/IPPHandler.php b/lib/PayPal/Handler/IPayPalHandler.php
similarity index 68%
rename from lib/PayPal/Handler/IPPHandler.php
rename to lib/PayPal/Handler/IPayPalHandler.php
index dc57589..0d1c8ff 100644
--- a/lib/PayPal/Handler/IPPHandler.php
+++ b/lib/PayPal/Handler/IPayPalHandler.php
@@ -3,18 +3,18 @@
namespace PayPal\Handler;
/**
- * Interface IPPHandler
+ * Interface IPayPalHandler
*
* @package PayPal\Handler
*/
-interface IPPHandler
+interface IPayPalHandler
{
/**
*
- * @param \Paypal\Core\PPHttpConfig $httpConfig
+ * @param \Paypal\Core\PayPalHttpConfig $httpConfig
* @param string $request
* @param mixed $options
* @return mixed
*/
public function handle($httpConfig, $request, $options);
-}
\ No newline at end of file
+}
diff --git a/lib/PayPal/Rest/OauthHandler.php b/lib/PayPal/Handler/OauthHandler.php
similarity index 66%
rename from lib/PayPal/Rest/OauthHandler.php
rename to lib/PayPal/Handler/OauthHandler.php
index 1678a6d..f281eb0 100644
--- a/lib/PayPal/Rest/OauthHandler.php
+++ b/lib/PayPal/Handler/OauthHandler.php
@@ -3,20 +3,19 @@
* API handler for OAuth Token Request REST API calls
*/
-namespace PayPal\Rest;
+namespace PayPal\Handler;
-use PayPal\Common\PPUserAgent;
-use PayPal\Core\PPConstants;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Exception\PPInvalidCredentialException;
-use PayPal\Exception\PPMissingCredentialException;
-use PayPal\Handler\IPPHandler;
+use PayPal\Common\PayPalUserAgent;
+use PayPal\Core\PayPalConstants;
+use PayPal\Core\PayPalHttpConfig;
+use PayPal\Exception\PayPalConfigurationException;
+use PayPal\Exception\PayPalInvalidCredentialException;
+use PayPal\Exception\PayPalMissingCredentialException;
/**
* Class OauthHandler
*/
-class OauthHandler implements IPPHandler
+class OauthHandler implements IPayPalHandler
{
/**
* Private Variable
@@ -36,13 +35,13 @@ class OauthHandler implements IPPHandler
}
/**
- * @param PPHttpConfig $httpConfig
+ * @param PayPalHttpConfig $httpConfig
* @param string $request
* @param mixed $options
* @return mixed|void
- * @throws PPConfigurationException
- * @throws PPInvalidCredentialException
- * @throws PPMissingCredentialException
+ * @throws PayPalConfigurationException
+ * @throws PayPalInvalidCredentialException
+ * @throws PayPalMissingCredentialException
*/
public function handle($httpConfig, $request, $options)
{
@@ -54,7 +53,7 @@ class OauthHandler implements IPPHandler
);
$headers = array(
- "User-Agent" => PPUserAgent::getValue(PPConstants::SDK_NAME, PPConstants::SDK_VERSION),
+ "User-Agent" => PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION),
"Authorization" => "Basic " . base64_encode($options['clientId'] . ":" . $options['clientSecret']),
"Accept" => "*/*"
);
@@ -72,8 +71,8 @@ class OauthHandler implements IPPHandler
*
* @param array $config
*
- * @return PPHttpConfig
- * @throws \PayPal\Exception\PPConfigurationException
+ * @return PayPalHttpConfig
+ * @throws \PayPal\Exception\PayPalConfigurationException
*/
private static function _getEndpoint($config)
{
@@ -84,17 +83,17 @@ class OauthHandler implements IPPHandler
} else if (isset($config['mode'])) {
switch (strtoupper($config['mode'])) {
case 'SANDBOX':
- $baseEndpoint = PPConstants::REST_SANDBOX_ENDPOINT;
+ $baseEndpoint = PayPalConstants::REST_SANDBOX_ENDPOINT;
break;
case 'LIVE':
- $baseEndpoint = PPConstants::REST_LIVE_ENDPOINT;
+ $baseEndpoint = PayPalConstants::REST_LIVE_ENDPOINT;
break;
default:
- throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');
+ throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live');
}
} else {
// Defaulting to Sandbox
- $baseEndpoint = PPConstants::REST_SANDBOX_ENDPOINT;
+ $baseEndpoint = PayPalConstants::REST_SANDBOX_ENDPOINT;
}
$baseEndpoint = rtrim(trim($baseEndpoint), '/') . "/v1/oauth2/token";
diff --git a/lib/PayPal/Rest/RestHandler.php b/lib/PayPal/Handler/RestHandler.php
similarity index 67%
rename from lib/PayPal/Rest/RestHandler.php
rename to lib/PayPal/Handler/RestHandler.php
index 7d82879..80c94e4 100644
--- a/lib/PayPal/Rest/RestHandler.php
+++ b/lib/PayPal/Handler/RestHandler.php
@@ -3,22 +3,21 @@
* API handler for all REST API calls
*/
-namespace PayPal\Rest;
+namespace PayPal\Handler;
use PayPal\Auth\OAuthTokenCredential;
-use PayPal\Common\PPUserAgent;
-use PayPal\Core\PPConstants;
-use PayPal\Core\PPCredentialManager;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Exception\PPInvalidCredentialException;
-use PayPal\Exception\PPMissingCredentialException;
-use PayPal\Handler\IPPHandler;
+use PayPal\Common\PayPalUserAgent;
+use PayPal\Core\PayPalConstants;
+use PayPal\Core\PayPalCredentialManager;
+use PayPal\Core\PayPalHttpConfig;
+use PayPal\Exception\PayPalConfigurationException;
+use PayPal\Exception\PayPalInvalidCredentialException;
+use PayPal\Exception\PayPalMissingCredentialException;
/**
* Class RestHandler
*/
-class RestHandler implements IPPHandler
+class RestHandler implements IPayPalHandler
{
/**
* Private Variable
@@ -38,13 +37,13 @@ class RestHandler implements IPPHandler
}
/**
- * @param PPHttpConfig $httpConfig
+ * @param PayPalHttpConfig $httpConfig
* @param string $request
* @param mixed $options
* @return mixed|void
- * @throws PPConfigurationException
- * @throws PPInvalidCredentialException
- * @throws PPMissingCredentialException
+ * @throws PayPalConfigurationException
+ * @throws PayPalInvalidCredentialException
+ * @throws PayPalMissingCredentialException
*/
public function handle($httpConfig, $request, $options)
{
@@ -54,18 +53,18 @@ class RestHandler implements IPPHandler
if ($credential == null) {
// Try picking credentials from the config file
- $credMgr = PPCredentialManager::getInstance($config);
+ $credMgr = PayPalCredentialManager::getInstance($config);
$credValues = $credMgr->getCredentialObject();
if (!is_array($credValues)) {
- throw new PPMissingCredentialException("Empty or invalid credentials passed");
+ throw new PayPalMissingCredentialException("Empty or invalid credentials passed");
}
$credential = new OAuthTokenCredential($credValues['clientId'], $credValues['clientSecret']);
}
if ($credential == null || !($credential instanceof OAuthTokenCredential)) {
- throw new PPInvalidCredentialException("Invalid credentials passed");
+ throw new PayPalInvalidCredentialException("Invalid credentials passed");
}
$httpConfig->setUrl(
@@ -74,7 +73,7 @@ class RestHandler implements IPPHandler
);
if (!array_key_exists("User-Agent", $httpConfig->getHeaders())) {
- $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(PPConstants::SDK_NAME, PPConstants::SDK_VERSION));
+ $httpConfig->addHeader("User-Agent", PayPalUserAgent::getValue(PayPalConstants::SDK_NAME, PayPalConstants::SDK_VERSION));
}
if (!is_null($credential) && $credential instanceof OAuthTokenCredential && is_null($httpConfig->getHeader('Authorization'))) {
@@ -97,7 +96,7 @@ class RestHandler implements IPPHandler
* @param array $config
*
* @return string
- * @throws \PayPal\Exception\PPConfigurationException
+ * @throws \PayPal\Exception\PayPalConfigurationException
*/
private function _getEndpoint($config)
{
@@ -106,18 +105,18 @@ class RestHandler implements IPPHandler
} else if (isset($config['mode'])) {
switch (strtoupper($config['mode'])) {
case 'SANDBOX':
- return PPConstants::REST_SANDBOX_ENDPOINT;
+ return PayPalConstants::REST_SANDBOX_ENDPOINT;
break;
case 'LIVE':
- return PPConstants::REST_LIVE_ENDPOINT;
+ return PayPalConstants::REST_LIVE_ENDPOINT;
break;
default:
- throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');
+ throw new PayPalConfigurationException('The mode config parameter must be set to either sandbox/live');
break;
}
} else {
// Defaulting to Sandbox
- return PPConstants::REST_SANDBOX_ENDPOINT;
+ return PayPalConstants::REST_SANDBOX_ENDPOINT;
}
}
}
diff --git a/lib/PayPal/Rest/ApiContext.php b/lib/PayPal/Rest/ApiContext.php
index 3c8a81e..b691571 100644
--- a/lib/PayPal/Rest/ApiContext.php
+++ b/lib/PayPal/Rest/ApiContext.php
@@ -2,8 +2,8 @@
namespace PayPal\Rest;
-use PayPal\Core\PPConfigManager;
-use PayPal\Core\PPCredentialManager;
+use PayPal\Core\PayPalConfigManager;
+use PayPal\Core\PayPalCredentialManager;
/**
* Class ApiContext
@@ -26,7 +26,7 @@ class ApiContext
/**
* This is a placeholder for holding credential for the request
- * If the value is not set, it would get the value from @\PayPal\Core\PPCredentialManager
+ * If the value is not set, it would get the value from @\PayPal\Core\PayPalCredentialManager
*
* @var \Paypal\Auth\OAuthTokenCredential
*/
@@ -53,14 +53,14 @@ class ApiContext
public function getCredential()
{
if ($this->credential == null) {
- return PPCredentialManager::getInstance()->getCredentialObject();
+ return PayPalCredentialManager::getInstance()->getCredentialObject();
}
return $this->credential;
}
public function getRequestHeaders()
{
- $result = PPConfigManager::getInstance()->get('http.headers');
+ $result = PayPalConfigManager::getInstance()->get('http.headers');
$headers = array();
foreach ($result as $header => $value) {
$headerName = ltrim($header, 'http.headers');
@@ -75,7 +75,7 @@ class ApiContext
if (!(substr($name, 0, strlen('http.headers')) === 'http.headers')) {
$name = 'http.headers.' . $name;
}
- PPConfigManager::getInstance()->addConfigs(array($name => $value));
+ PayPalConfigManager::getInstance()->addConfigs(array($name => $value));
}
/**
@@ -112,7 +112,7 @@ class ApiContext
*/
public function setConfig(array $config)
{
- PPConfigManager::getInstance()->addConfigs($config);
+ PayPalConfigManager::getInstance()->addConfigs($config);
}
/**
@@ -122,7 +122,7 @@ class ApiContext
*/
public function getConfig()
{
- return PPConfigManager::getInstance()->getConfigHashmap();
+ return PayPalConfigManager::getInstance()->getConfigHashmap();
}
/**
@@ -133,7 +133,7 @@ class ApiContext
*/
public function get($searchKey)
{
- return PPConfigManager::getInstance()->get($searchKey);
+ return PayPalConfigManager::getInstance()->get($searchKey);
}
/**
diff --git a/lib/PayPal/Transport/PPRestCall.php b/lib/PayPal/Transport/PayPalRestCall.php
similarity index 75%
rename from lib/PayPal/Transport/PPRestCall.php
rename to lib/PayPal/Transport/PayPalRestCall.php
index cf3ad8b..09db90b 100644
--- a/lib/PayPal/Transport/PPRestCall.php
+++ b/lib/PayPal/Transport/PayPalRestCall.php
@@ -1,24 +1,24 @@
apiContext = $apiContext;
- $this->logger = PPLoggingManager::getInstance(__CLASS__);
+ $this->logger = PayPalLoggingManager::getInstance(__CLASS__);
}
/**
@@ -48,13 +48,13 @@ class PPRestCall
* @param string $data Request payload
* @param array $headers HTTP headers
* @return mixed
- * @throws \PayPal\Exception\PPConnectionException
+ * @throws \PayPal\Exception\PayPalConnectionException
*/
public function execute($handlers = array(), $path, $method, $data = '', $headers = array())
{
$config = $this->apiContext->getConfig();
- $httpConfig = new PPHttpConfig(null, $method);
+ $httpConfig = new PayPalHttpConfig(null, $method);
$headers = $headers ? $headers : array();
$httpConfig->setHeaders($headers +
array(
@@ -62,7 +62,7 @@ class PPRestCall
)
);
- /** @var \Paypal\Handler\IPPHandler $handler */
+ /** @var \Paypal\Handler\IPayPalHandler $handler */
foreach ($handlers as $handler) {
if (!is_object($handler)) {
$fullHandler = "\\" . (string)$handler;
@@ -70,7 +70,7 @@ class PPRestCall
}
$handler->handle($httpConfig, $data, array('path' => $path, 'apiContext' => $this->apiContext));
}
- $connection = new PPHttpConnection($httpConfig, $config);
+ $connection = new PayPalHttpConnection($httpConfig, $config);
$response = $connection->execute($data);
return $response;
diff --git a/lib/PayPal/Validation/ModelAccessorValidator.php b/lib/PayPal/Validation/ModelAccessorValidator.php
index b0b73be..15f9fe3 100644
--- a/lib/PayPal/Validation/ModelAccessorValidator.php
+++ b/lib/PayPal/Validation/ModelAccessorValidator.php
@@ -2,9 +2,9 @@
namespace PayPal\Validation;
-use PayPal\Common\PPModel;
-use PayPal\Core\PPConfigManager;
-use PayPal\Core\PPLoggingManager;
+use PayPal\Common\PayPalModel;
+use PayPal\Core\PayPalConfigManager;
+use PayPal\Core\PayPalLoggingManager;
/**
* Class ModelAccessorValidator
@@ -16,18 +16,18 @@ class ModelAccessorValidator
/**
* Helper method for validating if the class contains accessor methods (getter and setter) for a given attribute
*
- * @param PPModel $class An object of PPModel
+ * @param PayPalModel $class An object of PayPalModel
* @param string $attributeName Attribute name
* @return bool
*/
- public static function validate(PPModel $class, $attributeName)
+ public static function validate(PayPalModel $class, $attributeName)
{
- $mode = PPConfigManager::getInstance()->get('validation.level');
+ $mode = PayPalConfigManager::getInstance()->get('validation.level');
if ($mode != 'disabled') {
//If the mode is disabled, bypass the validation
foreach (array('set' . $attributeName, 'get' . $attributeName) as $methodName) {
- if (get_class($class) == get_class(new PPModel())) {
- // Silently return false on cases where you are using PPModel instance directly
+ if (get_class($class) == get_class(new PayPalModel())) {
+ // Silently return false on cases where you are using PayPalModel instance directly
return false;
}
//Check if both getter and setter exists for given attribute
@@ -35,7 +35,7 @@ class ModelAccessorValidator
//Delegate the error based on the choice
$className = is_object($class) ? get_class($class) : (string)$class;
$errorMessage = "Missing Accessor: $className:$methodName. Please let us know by creating an issue at https://github.com/paypal/PayPal-PHP-SDK/issues";
- PPLoggingManager::getInstance(__CLASS__)->warning($errorMessage);
+ PayPalLoggingManager::getInstance(__CLASS__)->warning($errorMessage);
if ($mode == 'strict') {
trigger_error($errorMessage, E_USER_NOTICE);
}
diff --git a/sample/billing/UpdatePlan.php b/sample/billing/UpdatePlan.php
index 90712db..96e2692 100644
--- a/sample/billing/UpdatePlan.php
+++ b/sample/billing/UpdatePlan.php
@@ -16,11 +16,11 @@ $createdPlan = require 'CreatePlan.php';
use PayPal\Api\Plan;
use PayPal\Api\PatchRequest;
use PayPal\Api\Patch;
-use PayPal\Common\PPModel;
+use PayPal\Common\PayPalModel;
try {
$patch = new Patch();
- $value = new PPModel('{
+ $value = new PayPalModel('{
"state":"ACTIVE"
}');
diff --git a/sample/common.php b/sample/common.php
index 09ccb36..ece651c 100644
--- a/sample/common.php
+++ b/sample/common.php
@@ -122,7 +122,7 @@ class ResultPrinter
public static function printError($title, $objectName, $objectId = null, $request = null, $exception = null)
{
$data = null;
- if ($exception instanceof \PayPal\Exception\PPConnectionException) {
+ if ($exception instanceof \PayPal\Exception\PayPalConnectionException) {
$data = $exception->getData();
}
self::printOutput($title, $objectName, $objectId, $request, $data, $exception->getMessage());
@@ -134,8 +134,8 @@ class ResultPrinter
echo 'ERROR:'. $error;
}
if ($object) {
- if (is_a($object, 'PayPal\Common\PPModel')) {
- /** @var $object \PayPal\Common\PPModel */
+ if (is_a($object, 'PayPal\Common\PayPalModel')) {
+ /** @var $object \PayPal\Common\PayPalModel */
echo $object->toJSON(128);
} elseif (is_string($object) && \PayPal\Validation\JsonValidator::validate($object, true)) {
echo str_replace('\\/', '/', json_encode(json_decode($object), 128));
@@ -157,8 +157,8 @@ class ResultPrinter
'';
}
if ($object) {
- if (is_a($object, 'PayPal\Common\PPModel')) {
- /** @var $object \PayPal\Common\PPModel */
+ if (is_a($object, 'PayPal\Common\PayPalModel')) {
+ /** @var $object \PayPal\Common\PayPalModel */
echo '
' . $object->toJSON(128) . "
";
} elseif (is_string($object) && \PayPal\Validation\JsonValidator::validate($object, true)) {
echo '
'. str_replace('\\/', '/', json_encode(json_decode($object), 128)) . "";
diff --git a/sample/doc/billing/UpdatePlan.html b/sample/doc/billing/UpdatePlan.html
index 6158cfc..1dc562b 100644
--- a/sample/doc/billing/UpdatePlan.html
+++ b/sample/doc/billing/UpdatePlan.html
@@ -8,11 +8,11 @@ API used: /v1/payments/billing-plans/
Obtain Access Token From Refresh Token