PayPal integration code moved to "Saved" directory, use approach in "READ_ME_FIRST...
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 4 Jun 2018 18:03:39 +0000 (14:03 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 4 Jun 2018 18:03:39 +0000 (14:03 -0400)
333 files changed:
config/plugin.ini
lib/paymentProcessors/PayPal/READ_ME_FIRST [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/assets/x-click-but6.gif [new file with mode: 0755]
lib/paymentProcessors/PayPal/Saved/paymentGateway.php [new file with mode: 0755]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php [new file with mode: 0755]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini [new file with mode: 0644]
lib/paymentProcessors/PayPal/Saved/test.php [new file with mode: 0755]
lib/paymentProcessors/PayPal/assets/x-click-but6.gif [deleted file]
lib/paymentProcessors/PayPal/paymentGateway.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php [deleted file]
lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini [deleted file]
lib/paymentProcessors/PayPal/test.php [deleted file]
lib/paymentProcessors/paymentProcessorsTest.php

index 98ff805..2b8b1dd 100644 (file)
@@ -194,6 +194,16 @@ credit_card_verify[2] = '^3[47].{13}$'
 credit_card_verify[3] = '^6011.{12}$'
 credit_card_verify[4] = '^30[0-5].{11}$|^3[68].{12}$'
 
+;
+; PayPal Test Codes
+;
+paypal_test_mode[0] = 'Live Production'
+paypal_test_mode[3] = 'PayPal Sandbox Test'
+
+paypal_test_mode_numb['Production'] = 0
+paypal_test_mode_numb['Sandbox'] = 3
+
+
 ; Days of the week - numbers are an exponent of 2 that represent the bit position
 day[0] = 'Sunday'
 day[1] = 'Monday'
diff --git a/lib/paymentProcessors/PayPal/READ_ME_FIRST b/lib/paymentProcessors/PayPal/READ_ME_FIRST
new file mode 100644 (file)
index 0000000..fd32b0a
--- /dev/null
@@ -0,0 +1,293 @@
+PayPal Payment Processing
+-------------------------
+
+****************************************** NOTE *******************************************
+       Code in the "Saved" directory should not be used without complete review.
+
+The integration approach below uses the PayPal "Client-side REST Integration" that does not
+require this code. It may not be as flexible but seems to do the job quite well.
+
+*******************************************************************************************
+
+
+Client-side REST Integration Overview 
+-------------------------------------
+
+The approach used in the example below is...
+
+    * If PayPal is selected for Payment, change the checkout button to "Pay with PayPal".
+    * When the "Pay with PayPal" checkout button is clicked, the browser does it's normal checks for required fields and blocks submission if needed.
+    * If submission proceeds, display a modal dialog box with an offical "Pay with PayPal" button generated by the loaded PayPal script.
+    * If the user cancels or there is a PayPal payment error, the checkout process is aborted.
+    * When there's a successful PayPal Payment
+        - The PayPal dialog box is closed
+        - Confirmation Information returned from PayPal is inserted into hidden input fields
+        - An actual form submit is forced.
+    * The checkout processing code reads the PayPal confirmation information from the hidden fields and completes checkout.
+    
+The idea here is to only show the actual PayPal payment button after all required fields are completed, then when a successful PayPal payment is made
+to immediately submit the page. This limits the chance that a payment may be submitted without completing checkout. If the subsequent checkout code
+is unable to complete the checkout, it can flag that the payment has already been made and handle that accordingly when redisplaying the checkout page.
+
+Also note that if an "invoice_number" is supplied in the PayPal "transactions" data, PayPal will only accept payment once for each invoice number. 
+
+Integration Specifics
+---------------------
+
+* If no sandbox merchant account or payment account, create those now.
+
+    https://developer.paypal.com/webapps/developer/
+    
+* Setup storage and management of "Client ID" and "Secret" for both Sandbox and Production accounts and selection of environment (Sandbox or Production)
+
+* Add PayPal as a payment option to your Add-On
+
+* Checkout Page View File
+
+    * Make PayPal Cliend ID and Secret for both Sandbox and Production and environment selection available to view.
+
+    * Add loading of the required PayPal script and dialog box to the checkout page view like the code below. Note the additional code to display user messages.
+    
+        <script src="https://www.paypalobjects.com/api/checkout.js"></script>
+        <div id="payPalPaymentDialog" style="width: 100% !important">
+            <center>
+                <div id="paypal-button-container"></div>
+            </center>
+            <br>
+            <span class="glm-reg-warning">NOTE:</span> Your {$terms.reg_term_registration_plur} are not complete until you accept the PayPal payment and see the checkout summary page! 
+            <br>
+            <div id="payPalPaymentWarningMessage" class="glm-reg-warning"></div>
+            <div id="payPalPaymentMessage"></div>
+        </div>
+    
+    * Add normal and PayPal checkout buttons to page like the code below. Note that the PayPal button is hidden and normal button is not (use appropriate class for this).
+      If only using PayPal then only include that button not hidden.
+      
+        <input id="payPalPayButton" type="submit" value="Pay with PayPal" class="button glm-reg-button glm-hidden">
+        <input id="regSubmitButton" type="submit" value="{$terms.reg_term_button_checkout_page_submit}" class="button glm-reg-button">                
+    
+    * Add jQuery code to manage selection of payment methods (if using more than one payment method). The code below manages which checkout button should be displayed.
+      The "Show the selected pay method inputs..." section is to show or hide additional fields for a payment method (i.e. Credit Card input fields).  
+    
+        // When payment method selection changes
+        $('.payMethodSelector').on('change', function() {
+
+            // Get the value from the selected Payment Method
+            payMethodNumb = $(this).val();
+            payMethodSelection(payMethodNumb);
+            
+        });
+        function payMethodSelection(payMethodNumb) {
+
+            // Hide all pay method inputs and dissable them all
+            $('.payMethodSelection').addClass('glm-hidden');
+            $('.payMethodInput').attr('disabled', true);
+
+            // Show the selected pay method inputs and enable just those
+            $('.payMethod_' + payMethodNumb).removeClass('glm-hidden');
+            $('.payMethodInput_' + payMethodNumb).removeAttr('disabled');
+
+            // Set which button is displayed
+            if (payMethodNumb == {$payMethodsNumb.PayPal}) {
+                $('#regSubmitButton').addClass('glm-hidden');
+                $('#payPalPayButton').removeClass('glm-hidden');
+            } else {
+                $('#regSubmitButton').removeClass('glm-hidden');
+                $('#payPalPayButton').addClass('glm-hidden');
+            }
+            
+        }
+    
+    * Add jQuery code to instatiate a dialog box for the actual "Pay with PayPal" button.
+    
+        $( document ).ready(function() {
+        
+            // Dialog box to show a PayPal payment button
+            $( "#payPalPaymentDialog" ).dialog({
+                autoOpen: false,
+                width: 600,
+                modal: true,
+                'buttons': {
+                    'I don\'t wish to pay with PayPal': function(event) {
+                        $(this).dialog("close");
+                    }
+                }
+            });
+            
+        }
+        
+    * Add code to control page submission. The "payPalSubmitOK" variable is used to determine if this is an original submission request or completion of a succesful PayPal Payment.
+      If the "payPalPayButton" checkout button is checked to see if it's hidden to determine if PayPal is being used. Note that the ".css()" code was required to clean up display
+      of the official "Pay with PayPal" button inside the dialog box. Without that there was a problem with width of the button container.
+    
+        // Dissable checkout button when first clicked to prevent multiple attempts
+        var payPalSubmitOK = false;
+        $("#checkoutForm").submit(function(e){
+
+            // Check if this is a PayPal payment request
+            if (!$('#payPalPayButton').attr('disabled')) {
+
+                // Check if this is a re-submit by our PayPal payment code below
+                if (payPalSubmitOK) {
+                    return true;
+                }
+
+                // Display our PayPal payment dialog box and fix some CSS
+                $( "#payPalPaymentDialog" ).dialog("open");
+                $( "#payPalPaymentDialog" ).css({
+                    "width": "100%"
+                });
+
+                // Display the Pay by PayPal button in our dialog box
+                displayPayPalButton();
+
+                // Don't actually do a submit yet
+                return false;
+            }
+            
+            // If something else is preventing submission, stop here. Helpful when using custom fields.
+            if (e.isDefaultPrevented()) {
+                return false;
+            }
+            
+            // Dissable the checkout button and replace button text
+            $('#regSubmitButton').attr('disabled', true);
+            $('#regSubmitButton').val('Processing ... please Wait!');
+
+        });
+    
+    * Add jQuery code to display and activate the PayPal button and handle submission, cancelation, or errors. The "payPalButtonGenerated" variable is used to detect
+      if the button has already been displayed to avoid multiple buttons. Update parameters for Payer Info, Transaction data including items list, and fields added
+      to the submission as needed. Note that when "onAuthorize" is triggered that data from PayPal is passed using added hidden fields.
+    
+        // When the checkout button is clicked and a PayPal payment is requested, this code is called to create a PayPal button inside of the dialog box 
+        var payPalButtonGenerated = false;
+        function displayPayPalButton() {
+
+            if (payPalButtonGenerated) {
+                return;
+            }
+            payPalButtonGenerated = true;
+
+            
+            // PayPal button actions
+            paypal.Button.render({
+    
+                // Set your environment
+    
+        {if $payPalMode}
+                env: 'sandbox',
+        {else}
+                env: 'production',
+        {/if}
+    
+                // Specify the style of the button
+                style: {
+                    label: 'pay',
+                    size:  'large', // small | medium | large | responsive
+                    shape: 'rect',   // pill | rect
+                    color: 'blue'   // gold | blue | silver | black
+                },
+    
+                // Create a PayPal app: https://developer.paypal.com/developer/applications/create
+                client: {
+                    sandbox:    '{$payPalClientId}',
+                    production: '{$payPalClientId}'
+                },
+    
+                // Wait for the PayPal button to be clicked
+                payment: function(data, actions) {
+                    return actions.payment.create({
+                        invoice_number: '{$cartId}', 
+                        payment: {
+                            payer: {
+                                payer_info: {
+                                    first_name: '{$cart.request.bill_fname}',
+                                    last_name: '{$cart.request.bill_lname}',
+                                    email: '{$cart.request.bill_email}'
+                                }
+                            },
+                            transactions: [
+                                {
+                                    description: '{$settings.reg_org_name} {$reg.term.registration_plur_cap}',
+                                    invoice_number: '{$cartId}',
+                                    amount: { 
+                                        total: '{$cart.grandTotal}', 
+                                        currency: 'USD' 
+                                    },
+                                    item_list: {
+                                        items: [
+            {foreach $cart.chargeItems as $item}                                        
+                                            { 
+                                                name: '{$item.name}',
+                                                quantity: {$item.quantity},
+                                                price: {$item.price},
+                                                currency: 'USD'
+                                            },
+            {/foreach}
+                                        ]
+                                    } 
+                                }
+                            ]
+                        }
+                    });
+                },
+                
+                 onCancel: function(data, actions) {
+                        $('#payPalPaymentWarningMessage').html('---Some message to display in the dialog box if the user cancels---');
+                },
+                
+                onError: function(err) {
+                    $('#payPalPaymentWarningMessage').html('---Some message to display in the dialog box if there is a PayPal error.---');
+                },
+                // Wait for the payment to be authorized by the customer
+                onAuthorize: function(data, actions) {
+                    return actions.payment.execute().then(function(data) {
+
+                        var sale = data.transactions[0].related_resources[0].sale;
+
+                        // Notify submit code above that it's OK to checkout
+                        payPalSubmitOK = true;
+                        
+                        $( "#payPalPaymentDialog" ).dialog("close");
+
+                        // Add PayPal payment details to form
+                        $("#checkoutForm").append(
+                                '<input type="hidden" name="payPalPaymentID" value="' + sale.id + '">'
+                               +'<input type="hidden" name="payPalPaymentTime" value="' + sale.create_time + '">'
+                               +'<input type="hidden" name="payPalPaymentState" value="' + sale.state +'">'
+                        );
+                        // Now try to submit the form again
+                        $("#checkoutForm").submit();
+                    });
+                }
+    
+            }, '#paypal-button-container');
+                
+        }
+        
+    * Add code to the checkout processing model to determine if there was a PayPal submission and to store that information as desired
+    
+    
+        // Check for valid PayPal payment
+        $payPalPaymentID = filter_input(INPUT_POST, 'payPalPaymentID', FILTER_SANITIZE_STRING);
+        $payPalPaymentTime = filter_input(INPUT_POST, 'payPalPaymentTime', FILTER_SANITIZE_STRING);
+        $payPalPaymentState = filter_input(INPUT_POST, 'payPalPaymentState', FILTER_SANITIZE_STRING);
+
+        // If we don't have a valid payment, add to messages array
+        if (!$payPalPaymentID || !$payPalPaymentTime || !$payPalPaymentState || $payPalPaymentState != "completed") {
+            $messages[] = 'Sorry, we were unable to determine the status of your PayPal payment. Please check your PayPal account to see if the amount has been paid and if so, call us for assitance.';
+        } else {
+
+            // We have a valid payment so set some status flag saying so
+            $cartStatus = $this->config['submission_status_numb']['COMPLETE'];
+
+            // Store PayPal confirmation information in the CreditCard related fields.
+            (***Place code to store PayPal confirmation data here***)
+
+        }
+
+    
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/assets/x-click-but6.gif b/lib/paymentProcessors/PayPal/Saved/assets/x-click-but6.gif
new file mode 100755 (executable)
index 0000000..5da5a52
Binary files /dev/null and b/lib/paymentProcessors/PayPal/Saved/assets/x-click-but6.gif differ
diff --git a/lib/paymentProcessors/PayPal/Saved/paymentGateway.php b/lib/paymentProcessors/PayPal/Saved/paymentGateway.php
new file mode 100755 (executable)
index 0000000..8ae55c5
--- /dev/null
@@ -0,0 +1,584 @@
+<?php
+/**
+ * Event Management System
+ * PayPal Payment PaymentGateway class
+ *
+ * @category Front-End
+ * @package  EventManagement
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  SVN: $Id: PayPal.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link     <>
+ */
+
+
+/**
+ * Account Information
+ *
+ *  Developer account
+ *             PayPal API:     https://developer.paypal.com/webapps/developer/
+ *             E-Mail Address:         PayPal@n8dnx.org
+ *             Password:                       pAy#glM2Pal
+ *
+ *     PayPal test account
+ *             E-Mail address: paypalAcct2@n8dnx.org
+ *             Password:               {std insecure}2
+ *
+ *     Test credentials
+ *             Test account:   PayPal-facilitator@n8dnx.org
+ *             Endpoint:               api.sandbox.paypal.com
+ *             Client ID:              AY2IlhCAFCgTaYSgrGfBQ0h5WKKgpLwU-jd2QkKsEbDpGEWtCDZKtp2VLhu1
+ *             Secret:                 EOWLsBDrkvdOKUlfhAKJ47aXHBr5xzw-2o7JdLCcLVciGqNGXlhMayP1WKhe
+ *
+ *     Gaslight Media Live credentials
+ *             Endpoint:               api.paypal.com
+ *             Client ID:              AZw7VxC8rVTxlKoZVBd60ugOy_9PZWLDazQHF0RlYYWBQbAvkX2MBLy2vfmQ
+ *             Secret:                 EN3ZaxB4AhZ3J1814MtpfFjUXOqRTR8dto-fhFgk2wuLDTCoPfD0I0Dpbwuu
+ *
+ *     Standard PayPal buttons and images
+ *             https://ppmts.custhelp.com/app/answers/detail/a_id/632
+ *                             https://www.paypal.com/en_US/i/btn/x-click-but6.gif
+ */
+
+/**
+ * EventManagementPayPalPaymentProcessing class
+ *
+ * PHP version 5
+ *
+ * @category Event Management PayPal Payment Processing
+ * @package  EventManagement
+ * @author   Chuck Scott <cscott@gaslightmedia.com>
+ * @license  http://www.gaslightmedia.com Gaslightmedia
+ * @release  SVN: $Id: PayPal.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link     <>
+ */
+
+class PaymentGateway
+{
+       /**
+        * Curl Object
+        *
+        * @var         $curl
+        * @access      private
+        */
+       private $curl = false;
+       /**
+        * Result Status
+        *
+        * @var         $status
+        * @access      public
+        */
+       public $status = false;
+       /**
+        * Access Data
+        *
+        * @var         $access
+        * @access      private
+        */
+       public $access = false;
+       /**
+        * Curl Errors
+        *
+        * @var         $error
+        * @access      public
+        */
+       public $error = '';
+       /**
+        * PayPal Transaction
+        *
+        * @var         $trans
+        * @access      public
+        */
+       public $trans;
+       /**
+        * Test Mode - Use Sandbox
+        *
+        * @var         $sandbox
+        * @access      public
+        */
+       public $sandbox = false;
+       /**
+        * API URLs
+        *
+        * @var         $apiURLs
+        * @access      public
+        */
+       public $apiURLs = false;
+       /**
+        * Response Object
+        *
+        * @var         $response
+        * @access      public
+        */
+       public $response = false;
+
+    /**
+     * Constructor
+     *
+     * To facilitate continuing after a return URL has been followed
+     * as required to execute or cancel the transaction, the constructor
+     * may optionally take an "access" object created in a previous
+     * instance (probably stored in a session or database) to re-establish
+     * a connection to the same transaction.
+     *
+     * @param array  $account Account information
+     * @param object $access  Access object from previous instance that should
+     *                                                   be used instead of creating a new one
+     * @param object $trans   Transaction object from a previous instance.
+     *
+     * @return boolean    Returns value of $success parameter
+     * @access public
+     *
+     * $account
+        *              clientID                PayPal Client ID
+        *              secret                  PayPal Secret
+        *              returnURL               URL for PayPal to return to after payment confirmation by customer
+        *              cancelURL               URL for PayPal to return to after payment cancelation by customer
+        *              test                    1=Local Test (not available for PayPal), 2=Fail test (not available for PayPal), 3=PayPal Sandbox test, 0=Live production
+        *
+     */
+    public function __construct($account, $access = false, $trans = false)
+    {
+
+               // URLs to use for requests if we're using the development sandbox
+       $sandboxURLs = (object) array(
+                       'access' => 'https://api.sandbox.paypal.com/v1/oauth2/token',
+                       'process' => 'https://api.sandbox.paypal.com/v1/payments/payment',
+                       'execute' => 'https://api.sandbox.paypal.com/v1/payments/payment/{transID}/execute/'
+       );
+
+       // URLs to use for requests if we're doing live transactions
+       $liveURLs = (object) array(
+                       'access' => 'https://api.paypal.com/v1/oauth2/token',
+                       'process' => 'https://api.paypal.com/v1/payments/payment',
+                       'execute' => 'https://api.paypal.com/v1/payments/payment/{transID}/execute/'
+       );
+
+
+       // Save account information
+       $this->account = $account;
+
+       // Check for various test modes
+       switch ($this->account['test']) {
+
+               // Local Test
+               case 1:
+                               break;
+
+                       // Fail Test
+               case 2:
+                               break;
+
+               // Online Test - Use sandbox
+               case 3:
+                       $this->sandbox = true;
+                       $this->apiURLs = $sandboxURLs;
+                       break;
+
+                       // Production Mode
+               case 0:
+                       $this->sandbox = false;
+                       $this->apiURLs = $liveURLs;
+                       break;
+       }
+
+       // Was an access object from a previous instance supplied?
+       if ($access) {
+
+               // Yes, so store that and be done
+               $this->access = $access;
+               $this->status = true;
+
+               // If we also have a transaction object
+               if ($trans) {
+
+                       // Store that
+                       $this->trans = $trans;
+               }
+
+               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+                       echo
+                               '<b>__construct() - Existing Instance</b><p>'
+                               .'Account Data:<br>'
+                               .'<pre>'.print_r($account,1).'</pre>'
+                               .'Access:<br>'
+                               .'<pre>'.print_r($access,1)."</pre>"
+                               .'Transaction:<br>'
+                               .'<pre>'.print_r($trans,1)."</pre>";
+               }
+
+
+       // Otherwise, we need to create an access object
+       } else {
+
+               // Build request information
+               $url = $this->apiURLs->access;
+               $headers = array(
+                               "Accept: application/json",
+                               "Accept-Language: en_US",
+                               "Content-type: application/x-www-form-urlencoded"
+               );
+               $request = 'grant_type=client_credentials';
+
+               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+                       echo
+                               '<b>__construct() - New Instance</b><p>'
+                               .'Account Data:<br>'
+                               .'<pre>'.print_r($account,1).'</pre>'
+                               .'Headers:<br>'
+                               .'<pre>'.print_r($headers,1)."</pre>"
+                               .'Request:<br>'
+                               .'<pre>'.print_r($request,1)."</pre>";
+               }
+
+                       // Send request
+               $response = $this->sendRequest($url, $headers, $request);
+
+               // If bad response
+               if (!$response) {
+                       $this->access = false;
+                       $this->status = false;
+                       return;
+               }
+
+               // Store our access data
+               $this->access = $response;
+               $this->status = true;
+
+       }
+
+       return $this->status;
+    }
+
+    /**
+     * Process a Payment
+     *
+     * NOTE: For PayPal, this method only requests the payment.
+     * The user must follow the approval_url supplied by this
+     * method and confirm the payment. When that is done, PayPal
+     * will send the user to the approval_url along with a
+     * PayerID. The executePayment() method must then be called
+     * to actually execute the payment.
+     *
+     * @param array $payment Array payment information
+     * @param array $contact Array contact information
+     *
+     * @access public
+     * @return array
+     *
+     * Information provided
+     *
+     * $payment array
+     *         name                            Name of vendor - required
+     *         charge                          Total to be charged - required
+     *         cctype                          Card type - not used
+     *         ccname                          Name on card - not used
+     *         ccnumb                          Card number - not used
+     *         ccexp                           Expiration date (m/y) - not used
+     *         cccode                          Security code on back of card - not used
+     *         invoice                         Invoice # is session ID (or some part thereof) - not used
+     *         description                     Description of transaction - not used
+     *         items                           Array of items being purchased - required
+     *                                                 Each item has following
+     *
+     *                 quantity                        A number - Required
+     *                 name                            Name of the item - Required
+     *                 price                           Price of the item (numeric float) - Required
+     *                 sku                                     SKU string - Optional
+     *
+     *
+     * $contact array
+     *         fname                           Customer first name
+     *         lname                           Customer last name
+     *         addr1                           Address Line 1
+     *         addr2                           Address Line 2
+     *         city                            City
+     *         state                           State
+     *         country                         Country
+     *         zip                                     ZIP/Postal code
+     *         phone                           Customer phone number
+     *         email                           Customer E-Mail address
+     *
+     * return array
+     *                 status                          Numeric return status code
+     *                                                                 1               Approved
+     *                                                                 2               Bad data supplied
+     *                                                                 3               Communications failure
+     *                                                                 4               Bad response
+     *                                                                 5               Transaction not valid
+     *                                                                 6               Merchant account problem
+     *                                                                 7               Card declined
+     *         statusText                      Short name of status
+     *         authCode                        Authorization code - blank if card not accepted
+     *         description                     Longer description of result
+     *
+     *
+     */
+    public function processPayment($payment = false, $contact = false)
+    {
+
+       // Check for local tests that don't require communication with PayPal
+       switch ($this->account['test']) {
+
+               // Local Test
+               case 1:
+                       // invalid type for PayPal class - default to sandbox
+               case 2:
+                       // invalid type for PayPal class - default to sandbox
+               case 3:
+                       $this->sandbox = true;
+                       break;
+
+                       // Production Mode
+               case 0:
+                       break;
+       }
+
+       // Build request information
+       $url = $this->apiURLs->process;
+       $headers = array(
+                       "Content-type:application/json",
+                       'Authorization:'.$this->access->token_type.' '.$this->access->access_token
+       );
+
+       // Build payment request
+       $charge =  number_format($payment['charge'], 2, '.', '');
+       $requestArray = array(
+               'intent' => 'sale',
+               'redirect_urls' => array(
+                       'return_url' => $this->account['returnURL'],
+                       'cancel_url' => $this->account['cancelURL']
+               ),
+               'payer' => array(
+                       'payment_method' => 'paypal'
+               ),
+               'transactions' => array(
+                       0 => array(
+                               'amount' => array(
+                               'total' => $charge,
+                               'currency' => 'USD'
+                               ),
+                               'item_list' => array(
+                                       'items' => array(
+                                       )
+                               )
+                       )
+               )
+       );
+
+       // If there's no item list supplied
+       if (!isset($payment['items']) || count($payment['items']) <= 0) {
+           $this->trans = false;
+           $this->status = false;
+           $this->error = "PayPal integration requires an item list but none was provided along with the payment information to the processPayment() method.";
+           return;
+       }
+
+               foreach ($payment['items'] as $item) {
+
+                       $item['name'] = trim($item['name']);
+                       $item['currency'] = 'USD';
+                       $item['price'] = number_format($item['price'], 2, '.', '');
+
+                       // Add this item to the list
+                       $requestArray['transactions'][0]['item_list']['items'][] = $item;
+
+               }
+
+       // Convert request to a JSON
+       $request = json_encode($requestArray, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
+
+       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+               echo '<b>processPayment()</b><P>'
+                       .'Headers:<br>'
+                       .'<pre>'.print_r($headers,1)."</pre>"
+                       .'Request: <br>'
+                       .'<pre>'.$request.'</pre>';
+       }
+
+       // Send request
+       $response = $this->sendRequest($url, $headers, $request);
+
+       // If bad response
+       if (!$response) {
+               $this->trans = false;
+               $this->status = false;
+               $this->error = "Empty response from PayPal!";
+               return;
+       }
+
+       // Check for error response from PayPal
+       if (!isset($response->state)) {
+           $this->status = false;
+           $this->trans = $response;
+           return;
+       }
+
+       // Get URLs to use when communicating with PayPal
+       $response->urls = new stdClass();
+       foreach ($response->links as $link) {
+                       $response->urls->{$link->rel} = $link;
+       }
+
+               // Store our access data
+       $this->trans = $response;
+               $this->status = true;
+
+               return;
+
+
+    }
+
+    /**
+     * Execute the Payment
+     *
+     * This is the final step in PayPal payment approval.
+     * This method should be called with the PayerID provided
+     * when the user is sent back to us on a return URL.
+     *
+     * Note for this to work, the constructor must have been
+     * suppled the access and transaction data.
+     *
+     * Since the transaction ID is passed to PayPal in the URL
+     * we're assuming that the response we get back is for the
+     * correct transaction, so we don't check that.
+     *
+     * @param string $payerID  PayerID returned by PayPal on the return link
+     *
+     * @access public
+     * @return array
+     *
+     *
+     */
+    public function executePayment($payerID)
+    {
+
+       // Build request information
+       $url = str_replace('{transID}', $this->trans->id, $this->apiURLs->execute);
+
+       $headers = array(
+                       "Content-type:application/json",
+                       'Authorization:'.$this->access->token_type.' '.$this->access->access_token
+       );
+
+       // Build payment request
+       $request = '{"payer_id" : "'.$payerID.'" }';
+
+       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {// Execute the PayPal payment
+           $r = $PayPal->executePayment($_SESSION['payerID']);
+               echo '<b>executePayment()</b><P>'
+                       .'Headers:<br>'
+                       .'<pre>'.print_r($headers,1)."</pre>"
+                       .'Request: <br>'
+                       .'<pre>'.$request.'</pre>';
+       }
+
+       // Send request
+       $response = $this->sendRequest($url, $headers, $request);
+
+       // If bad response
+       if (!$response) {
+               $this->confirmation = false;
+               $this->status = false;
+               return false;
+       }
+
+       // Save results
+       $this->confirmation = $response;
+
+               // Check if payment not approved
+               if ($response->state != 'approved') {
+                       $this->status = false;
+                       $this->trans = $response;
+                       return false;
+               }
+
+               $r = array(
+                       'status' => 1,
+                       'statusText' => 'Approved',
+                       'authCode' => '',
+                       'description' => 'PayPal approval: '
+                               .$response->payer->payer_info->first_name.' '
+                               .$response->payer->payer_info->last_name.' ',
+//                             .$response->update_time,
+                       'payerName' => $response->payer->payer_info->first_name.' '
+                               .$response->payer->payer_info->last_name.' '
+
+               );
+
+       return $r;
+    }
+
+    /**
+     * Make Curl call to place request
+     *
+     * @param array $headers  Array of headers to include
+     * @param mixed $request  Fields to supply as POST data, either string, array, or json
+     *
+     * @access public
+     * @return array
+     *
+     */
+    private function sendRequest($url, $headers, $request)
+    {
+
+       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+               echo '<p><b>sendRequest():</b><br>URL = '.$url.'<br>Headers:<br><pre>'
+                       .print_r($headers,1).'</pre>Request:<br><pre>'.print_r($request,1).'</pre>';
+       }
+
+       // Init Curl
+       $this->curl = curl_init();
+
+       // Curl Parameters
+       $id_pw = $this->account['clientID'].':'.$this->account['secret'];
+       $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
+
+       // Set curl options
+       curl_setopt($this->curl, CURLOPT_URL, $url);
+       curl_setopt($this->curl, CURLOPT_SSLVERSION,6);
+       curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);
+       curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);
+       curl_setopt($this->curl, CURLOPT_HEADER, false);
+       curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
+       curl_setopt($this->curl, CURLOPT_POST, true);
+       curl_setopt($this->curl, CURLOPT_POSTFIELDS, $request);
+       curl_setopt($this->curl, CURLOPT_USERPWD, $id_pw);
+       curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
+       curl_setopt($this->curl, CURLOPT_USERAGENT, $agent);
+
+       // Place Curl call to get access token
+       $raw = curl_exec($this->curl);
+
+       // If we received a good response
+       if (!curl_errno($this->curl)) {
+
+               // Save access data
+               $response = json_decode($raw);
+
+               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+                       echo 'Response:<br>'
+                               .'<pre>'.print_r($response,1).'</pre>';
+               }
+
+       // Otherwise
+       } else {
+
+               // Save our error message
+               $this->error = curl_error($this->curl);
+                       $response = false;
+
+                       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
+                               echo "Curl Error: ".$this->error."<P>";
+                       }
+
+       }
+
+       // Close our curl object
+       curl_close($this->curl);
+
+       return $response;
+
+    }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml
new file mode 100644 (file)
index 0000000..90f55b5
--- /dev/null
@@ -0,0 +1,6 @@
+# .coveralls.yml configuration
+
+# for php-coveralls
+src_dir: lib
+coverage_clover: build/coverage/clover.xml
+json_path: build/coverage/coveralls-upload.json
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore
new file mode 100644 (file)
index 0000000..e9c37ab
--- /dev/null
@@ -0,0 +1,14 @@
+
+build
+.DS_Store
+*.log
+
+# IDE
+.project
+.settings
+.buildpath
+*.bak
+
+# Composer
+vendor
+composer.lock
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml
new file mode 100644 (file)
index 0000000..91cb229
--- /dev/null
@@ -0,0 +1,15 @@
+language: php
+php:
+  - 5.4
+  - 5.3
+before_script:
+  - composer install --dev
+  - composer update satooshi/php-coveralls --dev
+script:
+    - ant coverage
+after_script:
+    - php vendor/bin/coveralls -v -c .coveralls.yml
+notifications:
+  recipients:
+    - DL-PP-Platform-PHP-SDK@ebay.com
+  on_success: change
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md
new file mode 100644 (file)
index 0000000..0c6c6f2
--- /dev/null
@@ -0,0 +1,24 @@
+CHANGELOG\r
+========= \r
+\r
+V0.7.1 (July 31, 2013)\r
+-----------------------\r
+   * Added support for Reauthorization\r
+\r
+V0.7.0 (May 30, 2013)\r
+-----------------------\r
+\r
+   * Added support for Auth and Capture APIs\r
+   * Types modified to match the API Spec\r
+   * Updated SDK to use namespace supported core library \r
+\r
+V0.6.0 (April 26, 2013)\r
+-----------------------\r
+\r
+   * Adding support for dynamic configuration of SDK (Upgrading sdk-core-php dependency to V1.4.0)\r
+   * Deprecating the setCredential method and changing resource class methods to take an ApiContext argument instead of a OauthTokenCredential argument.\r
+\r
+V0.5.0 (March 07, 2013)\r
+-----------------------\r
+\r
+   * Initial Release\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt
new file mode 100644 (file)
index 0000000..ad030e5
--- /dev/null
@@ -0,0 +1,41 @@
+PAYPAL, INC.
+
+SDK LICENSE
+
+NOTICE TO USER:  PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement.  Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
+
+As used in this Agreement, "PayPal" means PayPal, Inc.  "Software" means the software code accompanying this agreement.   "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.   
+
+1.  LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
+
+Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose.  You may not modify the Documentation.
+
+No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement.  You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
+
+If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution.  You may distribute the Software in object code form under your own license, provided that your license agreement:
+
+(a)    complies with the terms and conditions of this license agreement; 
+
+(b)    effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
+
+(c)    effectively excludes all liability for damages on behalf of PayPal;
+
+(d)    states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
+
+(e)    states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.  
+
+2.  DISCLAIMER OF WARRANTY
+PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE.  Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations.  Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance.  Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you.  To the extent permissible, any implied warranties are limited to ninety (90) days.
+
+
+3.  LIMITATION OF LIABILITY
+PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION.  IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION. 
+
+4.  TRADEMARK USAGE
+PayPal is a trademark PayPal, Inc. in the United States and other countries.  Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.  
+
+5.  TERM
+Your rights under this Agreement shall terminate if you fail to comply with any of the material  terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance.  If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable. 
+
+6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof.  If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.  Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA. 
+
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md
new file mode 100644 (file)
index 0000000..2dcdc6d
--- /dev/null
@@ -0,0 +1,68 @@
+REST API SDK for PHP
+====================
+[![Build Status](https://travis-ci.org/paypal/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/paypal/rest-api-sdk-php) [![Coverage Status](https://coveralls.io/repos/paypal/rest-api-sdk-php/badge.png?branch=master)](https://coveralls.io/r/paypal/rest-api-sdk-php?branch=master) [![Latest Stable Version](https://poser.pugx.org/paypal/rest-api-sdk-php/v/stable.png)](https://packagist.org/packages/paypal/rest-api-sdk-php) [![Total Downloads](https://poser.pugx.org/paypal/rest-api-sdk-php/downloads.png)](https://packagist.org/packages/paypal/rest-api-sdk-php)
+
+This repository contains PayPal's PHP SDK and samples for REST API.
+
+
+Prerequisites
+-------------
+
+   * PHP 5.3 or above
+   * curl, json & openssl extensions must be enabled
+   * composer for running the sample out of the box (See http://getcomposer.org)
+
+
+Running the sample
+------------------
+
+   * Ensure that you have composer installed on your machine.
+   * Navigate to the samples folder and run 'composer update'.
+   * Optionally, update the bootstrap.php file with your own client Id and client secret.
+   * Run any of the samples in the 'samples' folder to see what the APIs can do.
+    
+    
+Usage
+-----
+
+To write an app that uses the SDK 
+
+   * Copy the composer.json file from the sample folder over to your project and run 'composer update' to fetch all 
+dependencies
+   * Copy the sample configuration file sdk_config.ini to a location of your choice and let the SDK know your config path using the following define directive
+    
+```php
+    define('PP_CONFIG_PATH', /path/to/your/sdk_config.ini);
+```
+    
+   * Obtain your clientId and client secret from the developer portal. You will use them to create a `OAuthTokenCredential` object.
+   * Now you are all set to make your first API call. Create a resource object as per your need and call the relevant operation or invoke one of the static methods on your resource class.
+    
+```php
+
+    $apiContext = new ApiContext(new OAuthTokenCredential('<clientId>', '<clientSecret'));
+               
+    $payment = new Payment();
+
+    $payment->setIntent("Sale");
+
+    ...
+
+    $payment->create($apiContext);
+
+      *OR*
+
+    $payment = Payment::get('payment_id', $apiContext);
+```
+
+These examples pick the SDK configuration from the sdk_config.ini file. If you do not want to use an ini file or want to pick your configuration dynamically, you can use the `$apiContext->setConfig()` method to pass in the configuration.
+       
+
+Contributing
+------------
+
+More help
+---------
+
+   * [API Reference](https://developer.paypal.com/webapps/developer/docs/api/)
+   * [Reporting issues / feature requests] (https://github.com/paypal/rest-api-sdk-php/issues)
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml
new file mode 100644 (file)
index 0000000..d4e2ad4
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="paypal-rest-sdk-php" basedir="." default="all">
+
+       <property name="basedir" value="." />
+       <property name="release.dir" value="${basedir}/release" />
+       <property name="output.dir" value="${basedir}/build" />
+       <property name="phplint.out" value="${output.dir}/phplint.txt" />
+       <property name="phploc.out" value="${output.dir}/phploc.xml" />
+       <property name="coverage.dir" value="${output.dir}/coverage" />
+       <property name="coverage.out" value="${coverage.dir}/junit.xml" />
+       <property name="clover.out" value="${coverage.dir}/clover.xml" />
+       <property name="test.dir" value="${output.dir}/test" />
+       
+       <fileset id="src.files" dir="${basedir}/lib" includes="**/*.php" />
+               
+       <target name="composer-init" description="Downloads composer.phar if not available locally">
+               <if>
+                       <available file="composer.phar" />
+                       <then>
+                               <echo>Composer is installed</echo>
+                       </then>
+                       <else>
+                               <echo message="Installing composer" />
+                               <exec command="curl -s http://getcomposer.org/installer | php"  />
+                               <exec command="php composer.phar install --dev"  />
+                       </else>
+               </if>
+       </target>
+
+       <target name="phplint">         
+               <delete file="${phplint.out}"/>
+               <apply executable="php" failonerror="true" output="${phplint.out}" append="true">
+                       <arg value="-l" />
+                       <fileset refid="src.files" />
+               </apply>
+       </target>
+
+       <target name="phploc">
+               <exec command="phploc --log-xml ${phploc.out} ." dir="${basedir}/lib"  />
+       </target>
+
+       <target name="coverage">
+               <mkdir dir="${output.dir}/coverage"/>
+               <exec command="phpunit --coverage-html=${coverage.dir} --coverage-clover=${clover.out} --log-junit=${coverage.out} --exclude-group=PayPal\\Api\\*" />
+       </target>
+
+       <target name="clean" description="Deletes build artifacts">
+               <delete dir="${output.dir}"/>
+               <mkdir dir="${output.dir}"/>
+       </target>
+       
+       <target name="test" description="Runs test cases">
+               <exec command="phpunit --testdox-html=${test.dir}/testdox.html --log-junit=${test.dir}/junit.xml"/>
+       </target>
+
+       <!-- Requires phing --> 
+       <target name="convert-test-report" >
+               <mkdir dir="build/test/report"/>
+               <phpunitreport infile="${coverage.out}" 
+                       format="frames" 
+                       todir="build/test/report" />
+       </target>
+       
+       <target name="build" depends="test" description="Builds SDK" />
+       <target name="report" depends="phplint, coverage, phploc" description="Runs code checks and coverage reports" />
+       <target name="all" depends="clean, test, build, report" description="Do everything" />
+</project>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json
new file mode 100644 (file)
index 0000000..20d7592
--- /dev/null
@@ -0,0 +1,29 @@
+{\r
+    "name": "paypal/rest-api-sdk-php",\r
+    "description": "PayPal's PHP SDK for REST APIs",\r
+    "keywords": ["paypal", "payments", "rest", "sdk"],\r
+    "type": "library",\r
+    "license": "Apache2",\r
+    "homepage": "https://github.com/paypal/rest-api-sdk-php",\r
+    "authors": [\r
+        {\r
+            "name": "PayPal",\r
+            "homepage": "https://github.com/paypal/rest-api-sdk-php/contributors"\r
+        }\r
+    ],\r
+    "require": {\r
+        "php": ">=5.3.0",\r
+        "ext-curl": "*",\r
+        "ext-json": "*",\r
+        "paypal/sdk-core-php": "2.4.*"\r
+    },\r
+    "require-dev": {\r
+        "phpunit/phpunit": "3.7.*",\r
+        "satooshi/php-coveralls": "dev-master"\r
+    },\r
+    "autoload": {\r
+        "psr-0": {\r
+            "PayPal": "lib/"\r
+        }\r
+    }    \r
+}\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php
new file mode 100644 (file)
index 0000000..fa9300e
--- /dev/null
@@ -0,0 +1,167 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Address extends PPModel {
+       /**
+        * Line 1 of the Address (eg. number, street, etc).
+        * @param string $line1
+        */
+       public function setLine1($line1) {
+               $this->line1 = $line1;
+               return $this;
+       }
+
+       /**
+        * Line 1 of the Address (eg. number, street, etc).
+        * @return string
+        */
+       public function getLine1() {
+               return $this->line1;
+       }
+
+
+       /**
+        * Optional line 2 of the Address (eg. suite, apt #, etc.).
+        * @param string $line2
+        */
+       public function setLine2($line2) {
+               $this->line2 = $line2;
+               return $this;
+       }
+
+       /**
+        * Optional line 2 of the Address (eg. suite, apt #, etc.).
+        * @return string
+        */
+       public function getLine2() {
+               return $this->line2;
+       }
+
+
+       /**
+        * City name.
+        * @param string $city
+        */
+       public function setCity($city) {
+               $this->city = $city;
+               return $this;
+       }
+
+       /**
+        * City name.
+        * @return string
+        */
+       public function getCity() {
+               return $this->city;
+       }
+
+
+       /**
+        * 2 letter country code.
+        * @param string $country_code
+        */
+       public function setCountryCode($country_code) {
+               $this->country_code = $country_code;
+               return $this;
+       }
+
+       /**
+        * 2 letter country code.
+        * @return string
+        */
+       public function getCountryCode() {
+               return $this->country_code;
+       }
+
+       /**
+        * 2 letter country code.
+        * @param string $country_code
+        * @deprecated. Instead use setCountryCode
+        */
+       public function setCountry_code($country_code) {
+               $this->country_code = $country_code;
+               return $this;
+       }
+       /**
+        * 2 letter country code.
+        * @return string
+        * @deprecated. Instead use getCountryCode
+        */
+       public function getCountry_code() {
+               return $this->country_code;
+       }
+
+       /**
+        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
+        * @param string $postal_code
+        */
+       public function setPostalCode($postal_code) {
+               $this->postal_code = $postal_code;
+               return $this;
+       }
+
+       /**
+        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
+        * @return string
+        */
+       public function getPostalCode() {
+               return $this->postal_code;
+       }
+
+       /**
+        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
+        * @param string $postal_code
+        * @deprecated. Instead use setPostalCode
+        */
+       public function setPostal_code($postal_code) {
+               $this->postal_code = $postal_code;
+               return $this;
+       }
+       /**
+        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
+        * @return string
+        * @deprecated. Instead use getPostalCode
+        */
+       public function getPostal_code() {
+               return $this->postal_code;
+       }
+
+       /**
+        * 2 letter code for US states, and the equivalent for other countries.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * 2 letter code for US states, and the equivalent for other countries.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * Phone number in E.123 format.
+        * @param string $phone
+        */
+       public function setPhone($phone) {
+               $this->phone = $phone;
+               return $this;
+       }
+
+       /**
+        * Phone number in E.123 format.
+        * @return string
+        */
+       public function getPhone() {
+               return $this->phone;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php
new file mode 100644 (file)
index 0000000..8c7cfe2
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Amount extends PPModel {
+       /**
+        * 3 letter currency code
+        * @param string $currency
+        */
+       public function setCurrency($currency) {
+               $this->currency = $currency;
+               return $this;
+       }
+
+       /**
+        * 3 letter currency code
+        * @return string
+        */
+       public function getCurrency() {
+               return $this->currency;
+       }
+
+
+       /**
+        * Total amount charged from the Payer account (or card) to Payee. In case of a refund, this is the refunded amount to the original Payer from Payee account.
+        * @param string $total
+        */
+       public function setTotal($total) {
+               $this->total = $total;
+               return $this;
+       }
+
+       /**
+        * Total amount charged from the Payer account (or card) to Payee. In case of a refund, this is the refunded amount to the original Payer from Payee account.
+        * @return string
+        */
+       public function getTotal() {
+               return $this->total;
+       }
+
+
+       /**
+        * Additional details of the payment amount.
+        * @param PayPal\Api\Details $details
+        */
+       public function setDetails($details) {
+               $this->details = $details;
+               return $this;
+       }
+
+       /**
+        * Additional details of the payment amount.
+        * @return PayPal\Api\Details
+        */
+       public function getDetails() {
+               return $this->details;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php
new file mode 100644 (file)
index 0000000..9fc4b6d
--- /dev/null
@@ -0,0 +1,299 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\Authorization;
+use PayPal\Api\Capture;
+use PayPal\Transport\PPRestCall;
+
+class Authorization extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * Identifier of the authorization transaction.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the authorization transaction.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        */
+       public function setCreateTime($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was created.
+        * @return string
+        */
+       public function getCreateTime() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        * @deprecated. Instead use setCreateTime
+        */
+       public function setCreate_time($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+       /**
+        * Time the resource was created.
+        * @return string
+        * @deprecated. Instead use getCreateTime
+        */
+       public function getCreate_time() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        */
+       public function setUpdateTime($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @return string
+        */
+       public function getUpdateTime() {
+               return $this->update_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        * @deprecated. Instead use setUpdateTime
+        */
+       public function setUpdate_time($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+       /**
+        * Time the resource was last updated.
+        * @return string
+        * @deprecated. Instead use getUpdateTime
+        */
+       public function getUpdate_time() {
+               return $this->update_time;
+       }
+
+       /**
+        * Amount being authorized for.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Amount being authorized for.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+       /**
+        * State of the authorization transaction.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * State of the authorization transaction.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        */
+       public function setParentPayment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        */
+       public function getParentPayment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        * @deprecated. Instead use setParentPayment
+        */
+       public function setParent_payment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        * @deprecated. Instead use getParentPayment
+        */
+       public function getParent_payment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * Date/Time until which funds may be captured against this resource.
+        * @param string $valid_until
+        */
+       public function setValidUntil($valid_until) {
+               $this->valid_until = $valid_until;
+               return $this;
+       }
+
+       /**
+        * Date/Time until which funds may be captured against this resource.
+        * @return string
+        */
+       public function getValidUntil() {
+               return $this->valid_until;
+       }
+
+       /**
+        * Date/Time until which funds may be captured against this resource.
+        * @param string $valid_until
+        * @deprecated. Instead use setValidUntil
+        */
+       public function setValid_until($valid_until) {
+               $this->valid_until = $valid_until;
+               return $this;
+       }
+       /**
+        * Date/Time until which funds may be captured against this resource.
+        * @return string
+        * @deprecated. Instead use getValidUntil
+        */
+       public function getValid_until() {
+               return $this->valid_until;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public static function get($authorizationId, $apiContext = null) {
+               if (($authorizationId == null) || (strlen($authorizationId) <= 0)) {
+                       throw new \InvalidArgumentException("authorizationId cannot be null or empty");
+               }
+               $payLoad = "";
+               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);
+               $ret = new Authorization();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function capture($capture, $apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               if (($capture == null)) {
+                       throw new \InvalidArgumentException("capture cannot be null or empty");
+               }
+               $payLoad = $capture->toJSON();
+               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);
+               $ret = new Capture();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function void($apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               $payLoad = "";
+               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);
+               $ret = new Authorization();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function reauthorize($apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               $payLoad = $this->toJSON();
+               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);
+               $this->fromJson($json);
+               return $this;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php
new file mode 100644 (file)
index 0000000..773f952
--- /dev/null
@@ -0,0 +1,270 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\Capture;
+use PayPal\Api\Refund;
+use PayPal\Transport\PPRestCall;
+
+class Capture extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * Identifier of the Capture transaction.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the Capture transaction.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        */
+       public function setCreateTime($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was created.
+        * @return string
+        */
+       public function getCreateTime() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        * @deprecated. Instead use setCreateTime
+        */
+       public function setCreate_time($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+       /**
+        * Time the resource was created.
+        * @return string
+        * @deprecated. Instead use getCreateTime
+        */
+       public function getCreate_time() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        */
+       public function setUpdateTime($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @return string
+        */
+       public function getUpdateTime() {
+               return $this->update_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        * @deprecated. Instead use setUpdateTime
+        */
+       public function setUpdate_time($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+       /**
+        * Time the resource was last updated.
+        * @return string
+        * @deprecated. Instead use getUpdateTime
+        */
+       public function getUpdate_time() {
+               return $this->update_time;
+       }
+
+       /**
+        * Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by seting the is_final_capture flag to true.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by seting the is_final_capture flag to true.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+       /**
+        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
+        * @param boolean $is_final_capture
+        */
+       public function setIsFinalCapture($is_final_capture) {
+               $this->is_final_capture = $is_final_capture;
+               return $this;
+       }
+
+       /**
+        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
+        * @return boolean
+        */
+       public function getIsFinalCapture() {
+               return $this->is_final_capture;
+       }
+
+       /**
+        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
+        * @param boolean $is_final_capture
+        * @deprecated. Instead use setIsFinalCapture
+        */
+       public function setIs_final_capture($is_final_capture) {
+               $this->is_final_capture = $is_final_capture;
+               return $this;
+       }
+       /**
+        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
+        * @return boolean
+        * @deprecated. Instead use getIsFinalCapture
+        */
+       public function getIs_final_capture() {
+               return $this->is_final_capture;
+       }
+
+       /**
+        * State of the capture transaction.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * State of the capture transaction.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        */
+       public function setParentPayment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        */
+       public function getParentPayment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        * @deprecated. Instead use setParentPayment
+        */
+       public function setParent_payment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        * @deprecated. Instead use getParentPayment
+        */
+       public function getParent_payment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public static function get($captureId, $apiContext = null) {
+               if (($captureId == null) || (strlen($captureId) <= 0)) {
+                       throw new \InvalidArgumentException("captureId cannot be null or empty");
+               }
+               $payLoad = "";
+               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);
+               $ret = new Capture();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function refund($refund, $apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               if (($refund == null)) {
+                       throw new \InvalidArgumentException("refund cannot be null or empty");
+               }
+               $payLoad = $refund->toJSON();
+               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);
+               $ret = new Refund();
+               $ret->fromJson($json);
+               return $ret;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php
new file mode 100644 (file)
index 0000000..cd0ee91
--- /dev/null
@@ -0,0 +1,416 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\CreditCard;
+use PayPal\Transport\PPRestCall;
+
+class CreditCard extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * ID of the credit card being saved for later use.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * ID of the credit card being saved for later use.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Card number.
+        * @param string $number
+        */
+       public function setNumber($number) {
+               $this->number = $number;
+               return $this;
+       }
+
+       /**
+        * Card number.
+        * @return string
+        */
+       public function getNumber() {
+               return $this->number;
+       }
+
+
+       /**
+        * Type of the Card (eg. Visa, Mastercard, etc.).
+        * @param string $type
+        */
+       public function setType($type) {
+               $this->type = $type;
+               return $this;
+       }
+
+       /**
+        * Type of the Card (eg. Visa, Mastercard, etc.).
+        * @return string
+        */
+       public function getType() {
+               return $this->type;
+       }
+
+
+       /**
+        * card expiry month with value 1 - 12.
+        * @param integer $expire_month
+        */
+       public function setExpireMonth($expire_month) {
+               $this->expire_month = $expire_month;
+               return $this;
+       }
+
+       /**
+        * card expiry month with value 1 - 12.
+        * @return integer
+        */
+       public function getExpireMonth() {
+               return $this->expire_month;
+       }
+
+       /**
+        * card expiry month with value 1 - 12.
+        * @param integer $expire_month
+        * @deprecated. Instead use setExpireMonth
+        */
+       public function setExpire_month($expire_month) {
+               $this->expire_month = $expire_month;
+               return $this;
+       }
+       /**
+        * card expiry month with value 1 - 12.
+        * @return integer
+        * @deprecated. Instead use getExpireMonth
+        */
+       public function getExpire_month() {
+               return $this->expire_month;
+       }
+
+       /**
+        * 4 digit card expiry year
+        * @param integer $expire_year
+        */
+       public function setExpireYear($expire_year) {
+               $this->expire_year = $expire_year;
+               return $this;
+       }
+
+       /**
+        * 4 digit card expiry year
+        * @return integer
+        */
+       public function getExpireYear() {
+               return $this->expire_year;
+       }
+
+       /**
+        * 4 digit card expiry year
+        * @param integer $expire_year
+        * @deprecated. Instead use setExpireYear
+        */
+       public function setExpire_year($expire_year) {
+               $this->expire_year = $expire_year;
+               return $this;
+       }
+       /**
+        * 4 digit card expiry year
+        * @return integer
+        * @deprecated. Instead use getExpireYear
+        */
+       public function getExpire_year() {
+               return $this->expire_year;
+       }
+
+       /**
+        * Card validation code. Only supported when making a Payment but not when saving a credit card for future use.
+        * @param string $cvv2
+        */
+       public function setCvv2($cvv2) {
+               $this->cvv2 = $cvv2;
+               return $this;
+       }
+
+       /**
+        * Card validation code. Only supported when making a Payment but not when saving a credit card for future use.
+        * @return string
+        */
+       public function getCvv2() {
+               return $this->cvv2;
+       }
+
+
+       /**
+        * Card holder's first name.
+        * @param string $first_name
+        */
+       public function setFirstName($first_name) {
+               $this->first_name = $first_name;
+               return $this;
+       }
+
+       /**
+        * Card holder's first name.
+        * @return string
+        */
+       public function getFirstName() {
+               return $this->first_name;
+       }
+
+       /**
+        * Card holder's first name.
+        * @param string $first_name
+        * @deprecated. Instead use setFirstName
+        */
+       public function setFirst_name($first_name) {
+               $this->first_name = $first_name;
+               return $this;
+       }
+       /**
+        * Card holder's first name.
+        * @return string
+        * @deprecated. Instead use getFirstName
+        */
+       public function getFirst_name() {
+               return $this->first_name;
+       }
+
+       /**
+        * Card holder's last name.
+        * @param string $last_name
+        */
+       public function setLastName($last_name) {
+               $this->last_name = $last_name;
+               return $this;
+       }
+
+       /**
+        * Card holder's last name.
+        * @return string
+        */
+       public function getLastName() {
+               return $this->last_name;
+       }
+
+       /**
+        * Card holder's last name.
+        * @param string $last_name
+        * @deprecated. Instead use setLastName
+        */
+       public function setLast_name($last_name) {
+               $this->last_name = $last_name;
+               return $this;
+       }
+       /**
+        * Card holder's last name.
+        * @return string
+        * @deprecated. Instead use getLastName
+        */
+       public function getLast_name() {
+               return $this->last_name;
+       }
+
+       /**
+        * Billing Address associated with this card.
+        * @param PayPal\Api\Address $billing_address
+        */
+       public function setBillingAddress($billing_address) {
+               $this->billing_address = $billing_address;
+               return $this;
+       }
+
+       /**
+        * Billing Address associated with this card.
+        * @return PayPal\Api\Address
+        */
+       public function getBillingAddress() {
+               return $this->billing_address;
+       }
+
+       /**
+        * Billing Address associated with this card.
+        * @param PayPal\Api\Address $billing_address
+        * @deprecated. Instead use setBillingAddress
+        */
+       public function setBilling_address($billing_address) {
+               $this->billing_address = $billing_address;
+               return $this;
+       }
+       /**
+        * Billing Address associated with this card.
+        * @return PayPal\Api\Address
+        * @deprecated. Instead use getBillingAddress
+        */
+       public function getBilling_address() {
+               return $this->billing_address;
+       }
+
+       /**
+        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
+        * @param string $payer_id
+        */
+       public function setPayerId($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+
+       /**
+        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
+        * @return string
+        */
+       public function getPayerId() {
+               return $this->payer_id;
+       }
+
+       /**
+        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
+        * @param string $payer_id
+        * @deprecated. Instead use setPayerId
+        */
+       public function setPayer_id($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+       /**
+        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
+        * @return string
+        * @deprecated. Instead use getPayerId
+        */
+       public function getPayer_id() {
+               return $this->payer_id;
+       }
+
+       /**
+        * State of the funding instrument.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * State of the funding instrument.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * Date/Time until this resource can be used fund a payment.
+        * @param string $valid_until
+        */
+       public function setValidUntil($valid_until) {
+               $this->valid_until = $valid_until;
+               return $this;
+       }
+
+       /**
+        * Date/Time until this resource can be used fund a payment.
+        * @return string
+        */
+       public function getValidUntil() {
+               return $this->valid_until;
+       }
+
+       /**
+        * Date/Time until this resource can be used fund a payment.
+        * @param string $valid_until
+        * @deprecated. Instead use setValidUntil
+        */
+       public function setValid_until($valid_until) {
+               $this->valid_until = $valid_until;
+               return $this;
+       }
+       /**
+        * Date/Time until this resource can be used fund a payment.
+        * @return string
+        * @deprecated. Instead use getValidUntil
+        */
+       public function getValid_until() {
+               return $this->valid_until;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public function create($apiContext = null) {
+               $payLoad = $this->toJSON();
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card", "POST", $payLoad);
+               $this->fromJson($json);
+               return $this;
+       }
+
+       public static function get($creditCardId, $apiContext = null) {
+               if (($creditCardId == null) || (strlen($creditCardId) <= 0)) {
+                       throw new \InvalidArgumentException("creditCardId cannot be null or empty");
+               }
+               $payLoad = "";
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card/$creditCardId", "GET", $payLoad);
+               $ret = new CreditCard();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function delete($apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               $payLoad = "";
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card/{$this->getId()}", "DELETE", $payLoad);
+    return true;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php
new file mode 100644 (file)
index 0000000..4251e62
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class CreditCardHistory extends PPModel {
+       /**
+        * A list of credit card resources
+        * @array
+        * @param PayPal\Api\CreditCard $credit-cards
+        */
+       public function setCreditCards($credit_cards) {
+               $this->{"credit-cards"} = $credit_cards;
+               return $this;
+       }
+
+       /**
+        * A list of credit card resources
+        * @return PayPal\Api\CreditCard
+        */
+       public function getCreditCards() {
+               return $this->{"credit-cards"};
+       }
+
+       /**
+        * A list of credit card resources
+        * @array
+        * @param PayPal\Api\CreditCard $credit-cards
+        * @deprecated. Instead use setCreditCards
+        */
+       public function setCredit_cards($credit_cards) {
+               $this->{"credit-cards"} = $credit_cards;
+               return $this;
+       }
+       /**
+        * A list of credit card resources
+        * @return PayPal\Api\CreditCard
+        * @deprecated. Instead use getCreditCards
+        */
+       public function getCredit_cards() {
+               return $this->{"credit-cards"};
+       }
+
+       /**
+        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
+        * @param integer $count
+        */
+       public function setCount($count) {
+               $this->count = $count;
+               return $this;
+       }
+
+       /**
+        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
+        * @return integer
+        */
+       public function getCount() {
+               return $this->count;
+       }
+
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @param string $next_id
+        */
+       public function setNextId($next_id) {
+               $this->next_id = $next_id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @return string
+        */
+       public function getNextId() {
+               return $this->next_id;
+       }
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @param string $next_id
+        * @deprecated. Instead use setNextId
+        */
+       public function setNext_id($next_id) {
+               $this->next_id = $next_id;
+               return $this;
+       }
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @return string
+        * @deprecated. Instead use getNextId
+        */
+       public function getNext_id() {
+               return $this->next_id;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php
new file mode 100644 (file)
index 0000000..13430dd
--- /dev/null
@@ -0,0 +1,183 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class CreditCardToken extends PPModel {
+       /**
+        * ID of a previously saved Credit Card resource using /vault/credit-card API.
+        * @param string $credit_card_id
+        */
+       public function setCreditCardId($credit_card_id) {
+               $this->credit_card_id = $credit_card_id;
+               return $this;
+       }
+
+       /**
+        * ID of a previously saved Credit Card resource using /vault/credit-card API.
+        * @return string
+        */
+       public function getCreditCardId() {
+               return $this->credit_card_id;
+       }
+
+       /**
+        * ID of a previously saved Credit Card resource using /vault/credit-card API.
+        * @param string $credit_card_id
+        * @deprecated. Instead use setCreditCardId
+        */
+       public function setCredit_card_id($credit_card_id) {
+               $this->credit_card_id = $credit_card_id;
+               return $this;
+       }
+       /**
+        * ID of a previously saved Credit Card resource using /vault/credit-card API.
+        * @return string
+        * @deprecated. Instead use getCreditCardId
+        */
+       public function getCredit_card_id() {
+               return $this->credit_card_id;
+       }
+
+       /**
+        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
+        * @param string $payer_id
+        */
+       public function setPayerId($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+
+       /**
+        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
+        * @return string
+        */
+       public function getPayerId() {
+               return $this->payer_id;
+       }
+
+       /**
+        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
+        * @param string $payer_id
+        * @deprecated. Instead use setPayerId
+        */
+       public function setPayer_id($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+       /**
+        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
+        * @return string
+        * @deprecated. Instead use getPayerId
+        */
+       public function getPayer_id() {
+               return $this->payer_id;
+       }
+
+       /**
+        * Last 4 digits of the card number from the saved card.
+        * @param string $last4
+        */
+       public function setLast4($last4) {
+               $this->last4 = $last4;
+               return $this;
+       }
+
+       /**
+        * Last 4 digits of the card number from the saved card.
+        * @return string
+        */
+       public function getLast4() {
+               return $this->last4;
+       }
+
+
+       /**
+        * Type of the Card (eg. visa, mastercard, etc.) from the saved card. Please note that the values are always in lowercase and not meant to be used directly for display.
+        * @param string $type
+        */
+       public function setType($type) {
+               $this->type = $type;
+               return $this;
+       }
+
+       /**
+        * Type of the Card (eg. visa, mastercard, etc.) from the saved card. Please note that the values are always in lowercase and not meant to be used directly for display.
+        * @return string
+        */
+       public function getType() {
+               return $this->type;
+       }
+
+
+       /**
+        * card expiry month from the saved card with value 1 - 12
+        * @param integer $expire_month
+        */
+       public function setExpireMonth($expire_month) {
+               $this->expire_month = $expire_month;
+               return $this;
+       }
+
+       /**
+        * card expiry month from the saved card with value 1 - 12
+        * @return integer
+        */
+       public function getExpireMonth() {
+               return $this->expire_month;
+       }
+
+       /**
+        * card expiry month from the saved card with value 1 - 12
+        * @param integer $expire_month
+        * @deprecated. Instead use setExpireMonth
+        */
+       public function setExpire_month($expire_month) {
+               $this->expire_month = $expire_month;
+               return $this;
+       }
+       /**
+        * card expiry month from the saved card with value 1 - 12
+        * @return integer
+        * @deprecated. Instead use getExpireMonth
+        */
+       public function getExpire_month() {
+               return $this->expire_month;
+       }
+
+       /**
+        * 4 digit card expiry year from the saved card
+        * @param integer $expire_year
+        */
+       public function setExpireYear($expire_year) {
+               $this->expire_year = $expire_year;
+               return $this;
+       }
+
+       /**
+        * 4 digit card expiry year from the saved card
+        * @return integer
+        */
+       public function getExpireYear() {
+               return $this->expire_year;
+       }
+
+       /**
+        * 4 digit card expiry year from the saved card
+        * @param integer $expire_year
+        * @deprecated. Instead use setExpireYear
+        */
+       public function setExpire_year($expire_year) {
+               $this->expire_year = $expire_year;
+               return $this;
+       }
+       /**
+        * 4 digit card expiry year from the saved card
+        * @return integer
+        * @deprecated. Instead use getExpireYear
+        */
+       public function getExpire_year() {
+               return $this->expire_year;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php
new file mode 100644 (file)
index 0000000..ab38367
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Details extends PPModel {
+       /**
+        * Amount being charged for shipping.
+        * @param string $shipping
+        */
+       public function setShipping($shipping) {
+               $this->shipping = $shipping;
+               return $this;
+       }
+
+       /**
+        * Amount being charged for shipping.
+        * @return string
+        */
+       public function getShipping() {
+               return $this->shipping;
+       }
+
+
+       /**
+        * Sub-total (amount) of items being paid for.
+        * @param string $subtotal
+        */
+       public function setSubtotal($subtotal) {
+               $this->subtotal = $subtotal;
+               return $this;
+       }
+
+       /**
+        * Sub-total (amount) of items being paid for.
+        * @return string
+        */
+       public function getSubtotal() {
+               return $this->subtotal;
+       }
+
+
+       /**
+        * Amount being charged as tax.
+        * @param string $tax
+        */
+       public function setTax($tax) {
+               $this->tax = $tax;
+               return $this;
+       }
+
+       /**
+        * Amount being charged as tax.
+        * @return string
+        */
+       public function getTax() {
+               return $this->tax;
+       }
+
+
+       /**
+        * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
+        * @param string $fee
+        */
+       public function setFee($fee) {
+               $this->fee = $fee;
+               return $this;
+       }
+
+       /**
+        * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
+        * @return string
+        */
+       public function getFee() {
+               return $this->fee;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php
new file mode 100644 (file)
index 0000000..6800675
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class FundingInstrument extends PPModel {
+       /**
+        * Credit Card information.
+        * @param PayPal\Api\CreditCard $credit_card
+        */
+       public function setCreditCard($credit_card) {
+               $this->credit_card = $credit_card;
+               return $this;
+       }
+
+       /**
+        * Credit Card information.
+        * @return PayPal\Api\CreditCard
+        */
+       public function getCreditCard() {
+               return $this->credit_card;
+       }
+
+       /**
+        * Credit Card information.
+        * @param PayPal\Api\CreditCard $credit_card
+        * @deprecated. Instead use setCreditCard
+        */
+       public function setCredit_card($credit_card) {
+               $this->credit_card = $credit_card;
+               return $this;
+       }
+       /**
+        * Credit Card information.
+        * @return PayPal\Api\CreditCard
+        * @deprecated. Instead use getCreditCard
+        */
+       public function getCredit_card() {
+               return $this->credit_card;
+       }
+
+       /**
+        * Credit Card information.
+        * @param PayPal\Api\CreditCardToken $credit_card_token
+        */
+       public function setCreditCardToken($credit_card_token) {
+               $this->credit_card_token = $credit_card_token;
+               return $this;
+       }
+
+       /**
+        * Credit Card information.
+        * @return PayPal\Api\CreditCardToken
+        */
+       public function getCreditCardToken() {
+               return $this->credit_card_token;
+       }
+
+       /**
+        * Credit Card information.
+        * @param PayPal\Api\CreditCardToken $credit_card_token
+        * @deprecated. Instead use setCreditCardToken
+        */
+       public function setCredit_card_token($credit_card_token) {
+               $this->credit_card_token = $credit_card_token;
+               return $this;
+       }
+       /**
+        * Credit Card information.
+        * @return PayPal\Api\CreditCardToken
+        * @deprecated. Instead use getCreditCardToken
+        */
+       public function getCredit_card_token() {
+               return $this->credit_card_token;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php
new file mode 100644 (file)
index 0000000..a09ee92
--- /dev/null
@@ -0,0 +1,116 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class HyperSchema extends PPModel {
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+       /**
+        * 
+        * @param string $fragmentResolution
+        */
+       public function setFragmentResolution($fragmentResolution) {
+               $this->fragmentResolution = $fragmentResolution;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getFragmentResolution() {
+               return $this->fragmentResolution;
+       }
+
+
+       /**
+        * 
+        * @param boolean $readonly
+        */
+       public function setReadonly($readonly) {
+               $this->readonly = $readonly;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return boolean
+        */
+       public function getReadonly() {
+               return $this->readonly;
+       }
+
+
+       /**
+        * 
+        * @param string $contentEncoding
+        */
+       public function setContentEncoding($contentEncoding) {
+               $this->contentEncoding = $contentEncoding;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getContentEncoding() {
+               return $this->contentEncoding;
+       }
+
+
+       /**
+        * 
+        * @param string $pathStart
+        */
+       public function setPathStart($pathStart) {
+               $this->pathStart = $pathStart;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getPathStart() {
+               return $this->pathStart;
+       }
+
+
+       /**
+        * 
+        * @param string $mediaType
+        */
+       public function setMediaType($mediaType) {
+               $this->mediaType = $mediaType;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getMediaType() {
+               return $this->mediaType;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php
new file mode 100644 (file)
index 0000000..4a40632
--- /dev/null
@@ -0,0 +1,97 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Item extends PPModel {
+       /**
+        * Number of items.
+        * @param string $quantity
+        */
+       public function setQuantity($quantity) {
+               $this->quantity = $quantity;
+               return $this;
+       }
+
+       /**
+        * Number of items.
+        * @return string
+        */
+       public function getQuantity() {
+               return $this->quantity;
+       }
+
+
+       /**
+        * Name of the item.
+        * @param string $name
+        */
+       public function setName($name) {
+               $this->name = $name;
+               return $this;
+       }
+
+       /**
+        * Name of the item.
+        * @return string
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+
+       /**
+        * Cost of the item.
+        * @param string $price
+        */
+       public function setPrice($price) {
+               $this->price = $price;
+               return $this;
+       }
+
+       /**
+        * Cost of the item.
+        * @return string
+        */
+       public function getPrice() {
+               return $this->price;
+       }
+
+
+       /**
+        * 3-letter Currency Code
+        * @param string $currency
+        */
+       public function setCurrency($currency) {
+               $this->currency = $currency;
+               return $this;
+       }
+
+       /**
+        * 3-letter Currency Code
+        * @return string
+        */
+       public function getCurrency() {
+               return $this->currency;
+       }
+
+
+       /**
+        * Number or code to identify the item in your catalog/records.
+        * @param string $sku
+        */
+       public function setSku($sku) {
+               $this->sku = $sku;
+               return $this;
+       }
+
+       /**
+        * Number or code to identify the item in your catalog/records.
+        * @return string
+        */
+       public function getSku() {
+               return $this->sku;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php
new file mode 100644 (file)
index 0000000..ea38da6
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class ItemList extends PPModel {
+       /**
+        * List of items.
+        * @array
+        * @param PayPal\Api\Item $items
+        */
+       public function setItems($items) {
+               $this->items = $items;
+               return $this;
+       }
+
+       /**
+        * List of items.
+        * @return PayPal\Api\Item
+        */
+       public function getItems() {
+               return $this->items;
+       }
+
+
+       /**
+        * Shipping address.
+        * @param PayPal\Api\ShippingAddress $shipping_address
+        */
+       public function setShippingAddress($shipping_address) {
+               $this->shipping_address = $shipping_address;
+               return $this;
+       }
+
+       /**
+        * Shipping address.
+        * @return PayPal\Api\ShippingAddress
+        */
+       public function getShippingAddress() {
+               return $this->shipping_address;
+       }
+
+       /**
+        * Shipping address.
+        * @param PayPal\Api\ShippingAddress $shipping_address
+        * @deprecated. Instead use setShippingAddress
+        */
+       public function setShipping_address($shipping_address) {
+               $this->shipping_address = $shipping_address;
+               return $this;
+       }
+       /**
+        * Shipping address.
+        * @return PayPal\Api\ShippingAddress
+        * @deprecated. Instead use getShippingAddress
+        */
+       public function getShipping_address() {
+               return $this->shipping_address;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php
new file mode 100644 (file)
index 0000000..9cbd85e
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Links extends PPModel {
+       /**
+        * 
+        * @param string $href
+        */
+       public function setHref($href) {
+               $this->href = $href;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getHref() {
+               return $this->href;
+       }
+
+
+       /**
+        * 
+        * @param string $rel
+        */
+       public function setRel($rel) {
+               $this->rel = $rel;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getRel() {
+               return $this->rel;
+       }
+
+
+       /**
+        * 
+        * @param PayPal\Api\HyperSchema $targetSchema
+        */
+       public function setTargetSchema($targetSchema) {
+               $this->targetSchema = $targetSchema;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\HyperSchema
+        */
+       public function getTargetSchema() {
+               return $this->targetSchema;
+       }
+
+
+       /**
+        * 
+        * @param string $method
+        */
+       public function setMethod($method) {
+               $this->method = $method;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getMethod() {
+               return $this->method;
+       }
+
+
+       /**
+        * 
+        * @param string $enctype
+        */
+       public function setEnctype($enctype) {
+               $this->enctype = $enctype;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return string
+        */
+       public function getEnctype() {
+               return $this->enctype;
+       }
+
+
+       /**
+        * 
+        * @param PayPal\Api\HyperSchema $schema
+        */
+       public function setSchema($schema) {
+               $this->schema = $schema;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\HyperSchema
+        */
+       public function getSchema() {
+               return $this->schema;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php
new file mode 100644 (file)
index 0000000..d0ccea3
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Payee extends PPModel {
+       /**
+        * 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.
+        * @param string $email
+        */
+       public function setEmail($email) {
+               $this->email = $email;
+               return $this;
+       }
+
+       /**
+        * 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.
+        * @return string
+        */
+       public function getEmail() {
+               return $this->email;
+       }
+
+
+       /**
+        * Encrypted PayPal Account identifier for the Payee.
+        * @param string $merchant_id
+        */
+       public function setMerchantId($merchant_id) {
+               $this->merchant_id = $merchant_id;
+               return $this;
+       }
+
+       /**
+        * Encrypted PayPal Account identifier for the Payee.
+        * @return string
+        */
+       public function getMerchantId() {
+               return $this->merchant_id;
+       }
+
+       /**
+        * Encrypted PayPal Account identifier for the Payee.
+        * @param string $merchant_id
+        * @deprecated. Instead use setMerchantId
+        */
+       public function setMerchant_id($merchant_id) {
+               $this->merchant_id = $merchant_id;
+               return $this;
+       }
+       /**
+        * Encrypted PayPal Account identifier for the Payee.
+        * @return string
+        * @deprecated. Instead use getMerchantId
+        */
+       public function getMerchant_id() {
+               return $this->merchant_id;
+       }
+
+       /**
+        * Phone number (in E.123 format) associated with the Payee's PayPal Account. If the provided phont number 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.
+        * @param string $phone
+        */
+       public function setPhone($phone) {
+               $this->phone = $phone;
+               return $this;
+       }
+
+       /**
+        * Phone number (in E.123 format) associated with the Payee's PayPal Account. If the provided phont number 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.
+        * @return string
+        */
+       public function getPhone() {
+               return $this->phone;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php
new file mode 100644 (file)
index 0000000..d21d238
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Payer extends PPModel {
+       /**
+        * Payment method being used - PayPal Wallet payment or Direct Credit card.
+        * @param string $payment_method
+        */
+       public function setPaymentMethod($payment_method) {
+               $this->payment_method = $payment_method;
+               return $this;
+       }
+
+       /**
+        * Payment method being used - PayPal Wallet payment or Direct Credit card.
+        * @return string
+        */
+       public function getPaymentMethod() {
+               return $this->payment_method;
+       }
+
+       /**
+        * Payment method being used - PayPal Wallet payment or Direct Credit card.
+        * @param string $payment_method
+        * @deprecated. Instead use setPaymentMethod
+        */
+       public function setPayment_method($payment_method) {
+               $this->payment_method = $payment_method;
+               return $this;
+       }
+       /**
+        * Payment method being used - PayPal Wallet payment or Direct Credit card.
+        * @return string
+        * @deprecated. Instead use getPaymentMethod
+        */
+       public function getPayment_method() {
+               return $this->payment_method;
+       }
+
+       /**
+        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
+        * @array
+        * @param PayPal\Api\FundingInstrument $funding_instruments
+        */
+       public function setFundingInstruments($funding_instruments) {
+               $this->funding_instruments = $funding_instruments;
+               return $this;
+       }
+
+       /**
+        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
+        * @return PayPal\Api\FundingInstrument
+        */
+       public function getFundingInstruments() {
+               return $this->funding_instruments;
+       }
+
+       /**
+        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
+        * @array
+        * @param PayPal\Api\FundingInstrument $funding_instruments
+        * @deprecated. Instead use setFundingInstruments
+        */
+       public function setFunding_instruments($funding_instruments) {
+               $this->funding_instruments = $funding_instruments;
+               return $this;
+       }
+       /**
+        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
+        * @return PayPal\Api\FundingInstrument
+        * @deprecated. Instead use getFundingInstruments
+        */
+       public function getFunding_instruments() {
+               return $this->funding_instruments;
+       }
+
+       /**
+        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
+        * @param PayPal\Api\PayerInfo $payer_info
+        */
+       public function setPayerInfo($payer_info) {
+               $this->payer_info = $payer_info;
+               return $this;
+       }
+
+       /**
+        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
+        * @return PayPal\Api\PayerInfo
+        */
+       public function getPayerInfo() {
+               return $this->payer_info;
+       }
+
+       /**
+        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
+        * @param PayPal\Api\PayerInfo $payer_info
+        * @deprecated. Instead use setPayerInfo
+        */
+       public function setPayer_info($payer_info) {
+               $this->payer_info = $payer_info;
+               return $this;
+       }
+       /**
+        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
+        * @return PayPal\Api\PayerInfo
+        * @deprecated. Instead use getPayerInfo
+        */
+       public function getPayer_info() {
+               return $this->payer_info;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php
new file mode 100644 (file)
index 0000000..a9ff596
--- /dev/null
@@ -0,0 +1,183 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class PayerInfo extends PPModel {
+       /**
+        * Email address representing the Payer.
+        * @param string $email
+        */
+       public function setEmail($email) {
+               $this->email = $email;
+               return $this;
+       }
+
+       /**
+        * Email address representing the Payer.
+        * @return string
+        */
+       public function getEmail() {
+               return $this->email;
+       }
+
+
+       /**
+        * First Name of the Payer from their PayPal Account.
+        * @param string $first_name
+        */
+       public function setFirstName($first_name) {
+               $this->first_name = $first_name;
+               return $this;
+       }
+
+       /**
+        * First Name of the Payer from their PayPal Account.
+        * @return string
+        */
+       public function getFirstName() {
+               return $this->first_name;
+       }
+
+       /**
+        * First Name of the Payer from their PayPal Account.
+        * @param string $first_name
+        * @deprecated. Instead use setFirstName
+        */
+       public function setFirst_name($first_name) {
+               $this->first_name = $first_name;
+               return $this;
+       }
+       /**
+        * First Name of the Payer from their PayPal Account.
+        * @return string
+        * @deprecated. Instead use getFirstName
+        */
+       public function getFirst_name() {
+               return $this->first_name;
+       }
+
+       /**
+        * Last Name of the Payer from their PayPal Account.
+        * @param string $last_name
+        */
+       public function setLastName($last_name) {
+               $this->last_name = $last_name;
+               return $this;
+       }
+
+       /**
+        * Last Name of the Payer from their PayPal Account.
+        * @return string
+        */
+       public function getLastName() {
+               return $this->last_name;
+       }
+
+       /**
+        * Last Name of the Payer from their PayPal Account.
+        * @param string $last_name
+        * @deprecated. Instead use setLastName
+        */
+       public function setLast_name($last_name) {
+               $this->last_name = $last_name;
+               return $this;
+       }
+       /**
+        * Last Name of the Payer from their PayPal Account.
+        * @return string
+        * @deprecated. Instead use getLastName
+        */
+       public function getLast_name() {
+               return $this->last_name;
+       }
+
+       /**
+        * PayPal assigned Payer ID.
+        * @param string $payer_id
+        */
+       public function setPayerId($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+
+       /**
+        * PayPal assigned Payer ID.
+        * @return string
+        */
+       public function getPayerId() {
+               return $this->payer_id;
+       }
+
+       /**
+        * PayPal assigned Payer ID.
+        * @param string $payer_id
+        * @deprecated. Instead use setPayerId
+        */
+       public function setPayer_id($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+       /**
+        * PayPal assigned Payer ID.
+        * @return string
+        * @deprecated. Instead use getPayerId
+        */
+       public function getPayer_id() {
+               return $this->payer_id;
+       }
+
+       /**
+        * Phone number representing the Payer.
+        * @param string $phone
+        */
+       public function setPhone($phone) {
+               $this->phone = $phone;
+               return $this;
+       }
+
+       /**
+        * Phone number representing the Payer.
+        * @return string
+        */
+       public function getPhone() {
+               return $this->phone;
+       }
+
+
+       /**
+        * Shipping address of the Payer from their PayPal Account.
+        * @param PayPal\Api\Address $shipping_address
+        */
+       public function setShippingAddress($shipping_address) {
+               $this->shipping_address = $shipping_address;
+               return $this;
+       }
+
+       /**
+        * Shipping address of the Payer from their PayPal Account.
+        * @return PayPal\Api\Address
+        */
+       public function getShippingAddress() {
+               return $this->shipping_address;
+       }
+
+       /**
+        * Shipping address of the Payer from their PayPal Account.
+        * @param PayPal\Api\Address $shipping_address
+        * @deprecated. Instead use setShippingAddress
+        */
+       public function setShipping_address($shipping_address) {
+               $this->shipping_address = $shipping_address;
+               return $this;
+       }
+       /**
+        * Shipping address of the Payer from their PayPal Account.
+        * @return PayPal\Api\Address
+        * @deprecated. Instead use getShippingAddress
+        */
+       public function getShipping_address() {
+               return $this->shipping_address;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php
new file mode 100644 (file)
index 0000000..cf223f0
--- /dev/null
@@ -0,0 +1,299 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\Payment;
+use PayPal\Api\PaymentHistory;
+use PayPal\Transport\PPRestCall;
+
+class Payment extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * Identifier of the payment resource created.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the payment resource created.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        */
+       public function setCreateTime($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was created.
+        * @return string
+        */
+       public function getCreateTime() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        * @deprecated. Instead use setCreateTime
+        */
+       public function setCreate_time($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+       /**
+        * Time the resource was created.
+        * @return string
+        * @deprecated. Instead use getCreateTime
+        */
+       public function getCreate_time() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        */
+       public function setUpdateTime($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @return string
+        */
+       public function getUpdateTime() {
+               return $this->update_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        * @deprecated. Instead use setUpdateTime
+        */
+       public function setUpdate_time($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+       /**
+        * Time the resource was last updated.
+        * @return string
+        * @deprecated. Instead use getUpdateTime
+        */
+       public function getUpdate_time() {
+               return $this->update_time;
+       }
+
+       /**
+        * Intent of the payment - Sale or Authorization or Order.
+        * @param string $intent
+        */
+       public function setIntent($intent) {
+               $this->intent = $intent;
+               return $this;
+       }
+
+       /**
+        * Intent of the payment - Sale or Authorization or Order.
+        * @return string
+        */
+       public function getIntent() {
+               return $this->intent;
+       }
+
+
+       /**
+        * Source of the funds for this payment represented by a PayPal account or a direct credit card.
+        * @param PayPal\Api\Payer $payer
+        */
+       public function setPayer($payer) {
+               $this->payer = $payer;
+               return $this;
+       }
+
+       /**
+        * Source of the funds for this payment represented by a PayPal account or a direct credit card.
+        * @return PayPal\Api\Payer
+        */
+       public function getPayer() {
+               return $this->payer;
+       }
+
+
+       /**
+        * A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
+        * @array
+        * @param PayPal\Api\Transaction $transactions
+        */
+       public function setTransactions($transactions) {
+               $this->transactions = $transactions;
+               return $this;
+       }
+
+       /**
+        * A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
+        * @return PayPal\Api\Transaction
+        */
+       public function getTransactions() {
+               return $this->transactions;
+       }
+
+
+       /**
+        * state of the payment
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * state of the payment
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
+        * @param PayPal\Api\RedirectUrls $redirect_urls
+        */
+       public function setRedirectUrls($redirect_urls) {
+               $this->redirect_urls = $redirect_urls;
+               return $this;
+       }
+
+       /**
+        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
+        * @return PayPal\Api\RedirectUrls
+        */
+       public function getRedirectUrls() {
+               return $this->redirect_urls;
+       }
+
+       /**
+        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
+        * @param PayPal\Api\RedirectUrls $redirect_urls
+        * @deprecated. Instead use setRedirectUrls
+        */
+       public function setRedirect_urls($redirect_urls) {
+               $this->redirect_urls = $redirect_urls;
+               return $this;
+       }
+       /**
+        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
+        * @return PayPal\Api\RedirectUrls
+        * @deprecated. Instead use getRedirectUrls
+        */
+       public function getRedirect_urls() {
+               return $this->redirect_urls;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public function create($apiContext = null) {
+               $payLoad = $this->toJSON();
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment", "POST", $payLoad);
+               $this->fromJson($json);
+               return $this;
+       }
+
+       public static function get($paymentId, $apiContext = null) {
+               if (($paymentId == null) || (strlen($paymentId) <= 0)) {
+                       throw new \InvalidArgumentException("paymentId cannot be null or empty");
+               }
+               $payLoad = "";
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment/$paymentId", "GET", $payLoad);
+               $ret = new Payment();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function execute($paymentExecution, $apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               if (($paymentExecution == null)) {
+                       throw new \InvalidArgumentException("paymentExecution cannot be null or empty");
+               }
+               $payLoad = $paymentExecution->toJSON();
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment/{$this->getId()}/execute", "POST", $payLoad);
+               $ret = new Payment();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public static function all($params, $apiContext = null) {
+               if (($params == null)) {
+                       throw new \InvalidArgumentException("params cannot be null or empty");
+               }
+               $payLoad = "";
+               $allowedParams = array('count' => 1, 'start_id' => 1, 'start_index' => 1, 'start_time' => 1, 'end_time' => 1, 'payee_id' => 1, 'sort_by' => 1, 'sort_order' => 1, );
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad);
+               $ret = new PaymentHistory();
+               $ret->fromJson($json);
+               return $ret;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php
new file mode 100644 (file)
index 0000000..b7048eb
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class PaymentExecution extends PPModel {
+       /**
+        * PayPal assigned Payer ID returned in the approval return url.
+        * @param string $payer_id
+        */
+       public function setPayerId($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+
+       /**
+        * PayPal assigned Payer ID returned in the approval return url.
+        * @return string
+        */
+       public function getPayerId() {
+               return $this->payer_id;
+       }
+
+       /**
+        * PayPal assigned Payer ID returned in the approval return url.
+        * @param string $payer_id
+        * @deprecated. Instead use setPayerId
+        */
+       public function setPayer_id($payer_id) {
+               $this->payer_id = $payer_id;
+               return $this;
+       }
+       /**
+        * PayPal assigned Payer ID returned in the approval return url.
+        * @return string
+        * @deprecated. Instead use getPayerId
+        */
+       public function getPayer_id() {
+               return $this->payer_id;
+       }
+
+       /**
+        * If the amount needs to be updated after obtaining the PayPal Payer info (eg. shipping address), it can be updated using this element.
+        * @array
+        * @param PayPal\Api\Transactions $transactions
+        */
+       public function setTransactions($transactions) {
+               $this->transactions = $transactions;
+               return $this;
+       }
+
+       /**
+        * If the amount needs to be updated after obtaining the PayPal Payer info (eg. shipping address), it can be updated using this element.
+        * @return PayPal\Api\Transactions
+        */
+       public function getTransactions() {
+               return $this->transactions;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php
new file mode 100644 (file)
index 0000000..e9f28af
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class PaymentHistory extends PPModel {
+       /**
+        * A list of Payment resources
+        * @array
+        * @param PayPal\Api\Payment $payments
+        */
+       public function setPayments($payments) {
+               $this->payments = $payments;
+               return $this;
+       }
+
+       /**
+        * A list of Payment resources
+        * @return PayPal\Api\Payment
+        */
+       public function getPayments() {
+               return $this->payments;
+       }
+
+
+       /**
+        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
+        * @param integer $count
+        */
+       public function setCount($count) {
+               $this->count = $count;
+               return $this;
+       }
+
+       /**
+        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
+        * @return integer
+        */
+       public function getCount() {
+               return $this->count;
+       }
+
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @param string $next_id
+        */
+       public function setNextId($next_id) {
+               $this->next_id = $next_id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @return string
+        */
+       public function getNextId() {
+               return $this->next_id;
+       }
+
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @param string $next_id
+        * @deprecated. Instead use setNextId
+        */
+       public function setNext_id($next_id) {
+               $this->next_id = $next_id;
+               return $this;
+       }
+       /**
+        * Identifier of the next element to get the next range of results.
+        * @return string
+        * @deprecated. Instead use getNextId
+        */
+       public function getNext_id() {
+               return $this->next_id;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php
new file mode 100644 (file)
index 0000000..c954b49
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class RedirectUrls extends PPModel {
+       /**
+        * Url where the payer would be redirected to after approving the payment.
+        * @param string $return_url
+        */
+       public function setReturnUrl($return_url) {
+               $this->return_url = $return_url;
+               return $this;
+       }
+
+       /**
+        * Url where the payer would be redirected to after approving the payment.
+        * @return string
+        */
+       public function getReturnUrl() {
+               return $this->return_url;
+       }
+
+       /**
+        * Url where the payer would be redirected to after approving the payment.
+        * @param string $return_url
+        * @deprecated. Instead use setReturnUrl
+        */
+       public function setReturn_url($return_url) {
+               $this->return_url = $return_url;
+               return $this;
+       }
+       /**
+        * Url where the payer would be redirected to after approving the payment.
+        * @return string
+        * @deprecated. Instead use getReturnUrl
+        */
+       public function getReturn_url() {
+               return $this->return_url;
+       }
+
+       /**
+        * Url where the payer would be redirected to after canceling the payment.
+        * @param string $cancel_url
+        */
+       public function setCancelUrl($cancel_url) {
+               $this->cancel_url = $cancel_url;
+               return $this;
+       }
+
+       /**
+        * Url where the payer would be redirected to after canceling the payment.
+        * @return string
+        */
+       public function getCancelUrl() {
+               return $this->cancel_url;
+       }
+
+       /**
+        * Url where the payer would be redirected to after canceling the payment.
+        * @param string $cancel_url
+        * @deprecated. Instead use setCancelUrl
+        */
+       public function setCancel_url($cancel_url) {
+               $this->cancel_url = $cancel_url;
+               return $this;
+       }
+       /**
+        * Url where the payer would be redirected to after canceling the payment.
+        * @return string
+        * @deprecated. Instead use getCancelUrl
+        */
+       public function getCancel_url() {
+               return $this->cancel_url;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php
new file mode 100644 (file)
index 0000000..095200a
--- /dev/null
@@ -0,0 +1,251 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\Refund;
+use PayPal\Transport\PPRestCall;
+
+class Refund extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * Identifier of the refund transaction.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the refund transaction.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        */
+       public function setCreateTime($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was created.
+        * @return string
+        */
+       public function getCreateTime() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        * @deprecated. Instead use setCreateTime
+        */
+       public function setCreate_time($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+       /**
+        * Time the resource was created.
+        * @return string
+        * @deprecated. Instead use getCreateTime
+        */
+       public function getCreate_time() {
+               return $this->create_time;
+       }
+
+       /**
+        * Details including both refunded amount (to Payer) and refunded fee (to Payee).If amount is not specified, it's assumed to be full refund.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Details including both refunded amount (to Payer) and refunded fee (to Payee).If amount is not specified, it's assumed to be full refund.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+       /**
+        * State of the refund transaction.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * State of the refund transaction.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * ID of the Sale transaction being refunded. 
+        * @param string $sale_id
+        */
+       public function setSaleId($sale_id) {
+               $this->sale_id = $sale_id;
+               return $this;
+       }
+
+       /**
+        * ID of the Sale transaction being refunded. 
+        * @return string
+        */
+       public function getSaleId() {
+               return $this->sale_id;
+       }
+
+       /**
+        * ID of the Sale transaction being refunded. 
+        * @param string $sale_id
+        * @deprecated. Instead use setSaleId
+        */
+       public function setSale_id($sale_id) {
+               $this->sale_id = $sale_id;
+               return $this;
+       }
+       /**
+        * ID of the Sale transaction being refunded. 
+        * @return string
+        * @deprecated. Instead use getSaleId
+        */
+       public function getSale_id() {
+               return $this->sale_id;
+       }
+
+       /**
+        * ID of the Capture transaction being refunded. 
+        * @param string $capture_id
+        */
+       public function setCaptureId($capture_id) {
+               $this->capture_id = $capture_id;
+               return $this;
+       }
+
+       /**
+        * ID of the Capture transaction being refunded. 
+        * @return string
+        */
+       public function getCaptureId() {
+               return $this->capture_id;
+       }
+
+       /**
+        * ID of the Capture transaction being refunded. 
+        * @param string $capture_id
+        * @deprecated. Instead use setCaptureId
+        */
+       public function setCapture_id($capture_id) {
+               $this->capture_id = $capture_id;
+               return $this;
+       }
+       /**
+        * ID of the Capture transaction being refunded. 
+        * @return string
+        * @deprecated. Instead use getCaptureId
+        */
+       public function getCapture_id() {
+               return $this->capture_id;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        */
+       public function setParentPayment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        */
+       public function getParentPayment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        * @deprecated. Instead use setParentPayment
+        */
+       public function setParent_payment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        * @deprecated. Instead use getParentPayment
+        */
+       public function getParent_payment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public static function get($refundId, $apiContext = null) {
+               if (($refundId == null) || (strlen($refundId) <= 0)) {
+                       throw new \InvalidArgumentException("refundId cannot be null or empty");
+               }
+               $payLoad = "";
+               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);
+               $ret = new Refund();
+               $ret->fromJson($json);
+               return $ret;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php
new file mode 100644 (file)
index 0000000..7e97776
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class RelatedResources extends PPModel {
+       /**
+        * A sale transaction
+        * @param PayPal\Api\Sale $sale
+        */
+       public function setSale($sale) {
+               $this->sale = $sale;
+               return $this;
+       }
+
+       /**
+        * A sale transaction
+        * @return PayPal\Api\Sale
+        */
+       public function getSale() {
+               return $this->sale;
+       }
+
+
+       /**
+        * An authorization transaction
+        * @param PayPal\Api\Authorization $authorization
+        */
+       public function setAuthorization($authorization) {
+               $this->authorization = $authorization;
+               return $this;
+       }
+
+       /**
+        * An authorization transaction
+        * @return PayPal\Api\Authorization
+        */
+       public function getAuthorization() {
+               return $this->authorization;
+       }
+
+
+       /**
+        * A capture transaction
+        * @param PayPal\Api\Capture $capture
+        */
+       public function setCapture($capture) {
+               $this->capture = $capture;
+               return $this;
+       }
+
+       /**
+        * A capture transaction
+        * @return PayPal\Api\Capture
+        */
+       public function getCapture() {
+               return $this->capture;
+       }
+
+
+       /**
+        * A refund transaction
+        * @param PayPal\Api\Refund $refund
+        */
+       public function setRefund($refund) {
+               $this->refund = $refund;
+               return $this;
+       }
+
+       /**
+        * A refund transaction
+        * @return PayPal\Api\Refund
+        */
+       public function getRefund() {
+               return $this->refund;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php
new file mode 100644 (file)
index 0000000..5fb1284
--- /dev/null
@@ -0,0 +1,235 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+use PayPal\Rest\IResource;
+use PayPal\Rest\Call;
+use PayPal\Rest\ApiContext;
+use PayPal\Api\Sale;
+use PayPal\Api\Refund;
+use PayPal\Transport\PPRestCall;
+
+class Sale extends PPModel implements IResource {
+
+       private static $credential;
+
+       /**
+        *
+        * @deprecated. Pass ApiContext to create/get methods instead
+        */
+       public static function setCredential($credential) {
+               self::$credential = $credential;
+       }
+
+       /**
+        * Identifier of the authorization transaction.
+        * @param string $id
+        */
+       public function setId($id) {
+               $this->id = $id;
+               return $this;
+       }
+
+       /**
+        * Identifier of the authorization transaction.
+        * @return string
+        */
+       public function getId() {
+               return $this->id;
+       }
+
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        */
+       public function setCreateTime($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was created.
+        * @return string
+        */
+       public function getCreateTime() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was created.
+        * @param string $create_time
+        * @deprecated. Instead use setCreateTime
+        */
+       public function setCreate_time($create_time) {
+               $this->create_time = $create_time;
+               return $this;
+       }
+       /**
+        * Time the resource was created.
+        * @return string
+        * @deprecated. Instead use getCreateTime
+        */
+       public function getCreate_time() {
+               return $this->create_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        */
+       public function setUpdateTime($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @return string
+        */
+       public function getUpdateTime() {
+               return $this->update_time;
+       }
+
+       /**
+        * Time the resource was last updated.
+        * @param string $update_time
+        * @deprecated. Instead use setUpdateTime
+        */
+       public function setUpdate_time($update_time) {
+               $this->update_time = $update_time;
+               return $this;
+       }
+       /**
+        * Time the resource was last updated.
+        * @return string
+        * @deprecated. Instead use getUpdateTime
+        */
+       public function getUpdate_time() {
+               return $this->update_time;
+       }
+
+       /**
+        * Amount being collected.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Amount being collected.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+       /**
+        * State of the sale transaction.
+        * @param string $state
+        */
+       public function setState($state) {
+               $this->state = $state;
+               return $this;
+       }
+
+       /**
+        * State of the sale transaction.
+        * @return string
+        */
+       public function getState() {
+               return $this->state;
+       }
+
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        */
+       public function setParentPayment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        */
+       public function getParentPayment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @param string $parent_payment
+        * @deprecated. Instead use setParentPayment
+        */
+       public function setParent_payment($parent_payment) {
+               $this->parent_payment = $parent_payment;
+               return $this;
+       }
+       /**
+        * ID of the Payment resource that this transaction is based on.
+        * @return string
+        * @deprecated. Instead use getParentPayment
+        */
+       public function getParent_payment() {
+               return $this->parent_payment;
+       }
+
+       /**
+        * 
+        * @array
+        * @param PayPal\Api\Links $links
+        */
+       public function setLinks($links) {
+               $this->links = $links;
+               return $this;
+       }
+
+       /**
+        * 
+        * @return PayPal\Api\Links
+        */
+       public function getLinks() {
+               return $this->links;
+       }
+
+
+
+       public static function get($saleId, $apiContext = null) {
+               if (($saleId == null) || (strlen($saleId) <= 0)) {
+                       throw new \InvalidArgumentException("saleId cannot be null or empty");
+               }
+               $payLoad = "";
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/sale/$saleId", "GET", $payLoad);
+               $ret = new Sale();
+               $ret->fromJson($json);
+               return $ret;
+       }
+
+       public function refund($refund, $apiContext = null) {
+               if ($this->getId() == null) {
+                       throw new \InvalidArgumentException("Id cannot be null");
+               }
+               if (($refund == null)) {
+                       throw new \InvalidArgumentException("refund cannot be null or empty");
+               }
+               $payLoad = $refund->toJSON();
+               if ($apiContext == null) {
+                       $apiContext = new ApiContext(self::$credential);
+               }
+               $call = new PPRestCall($apiContext);
+               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/sale/{$this->getId()}/refund", "POST", $payLoad);
+               $ret = new Refund();
+               $ret->fromJson($json);
+               return $ret;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php
new file mode 100644 (file)
index 0000000..a7f4de9
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class ShippingAddress extends Address {
+       /**
+        * Name of the recipient at this address.
+        * @param string $recipient_name
+        */
+       public function setRecipientName($recipient_name) {
+               $this->recipient_name = $recipient_name;
+               return $this;
+       }
+
+       /**
+        * Name of the recipient at this address.
+        * @return string
+        */
+       public function getRecipientName() {
+               return $this->recipient_name;
+       }
+
+       /**
+        * Name of the recipient at this address.
+        * @param string $recipient_name
+        * @deprecated. Instead use setRecipientName
+        */
+       public function setRecipient_name($recipient_name) {
+               $this->recipient_name = $recipient_name;
+               return $this;
+       }
+       /**
+        * Name of the recipient at this address.
+        * @return string
+        * @deprecated. Instead use getRecipientName
+        */
+       public function getRecipient_name() {
+               return $this->recipient_name;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php
new file mode 100644 (file)
index 0000000..d8420aa
--- /dev/null
@@ -0,0 +1,152 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Transaction extends PPModel {
+       /**
+        * Amount being collected.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Amount being collected.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+       /**
+        * Recepient of the funds in this transaction.
+        * @param PayPal\Api\Payee $payee
+        */
+       public function setPayee($payee) {
+               $this->payee = $payee;
+               return $this;
+       }
+
+       /**
+        * Recepient of the funds in this transaction.
+        * @return PayPal\Api\Payee
+        */
+       public function getPayee() {
+               return $this->payee;
+       }
+
+
+       /**
+        * Description of what is being paid for.
+        * @param string $description
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+               return $this;
+       }
+
+       /**
+        * Description of what is being paid for.
+        * @return string
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+
+
+       /**
+        * List of items being paid for.
+        * @param PayPal\Api\ItemList $item_list
+        */
+       public function setItemList($item_list) {
+               $this->item_list = $item_list;
+               return $this;
+       }
+
+       /**
+        * List of items being paid for.
+        * @return PayPal\Api\ItemList
+        */
+       public function getItemList() {
+               return $this->item_list;
+       }
+
+       /**
+        * List of items being paid for.
+        * @param PayPal\Api\ItemList $item_list
+        * @deprecated. Instead use setItemList
+        */
+       public function setItem_list($item_list) {
+               $this->item_list = $item_list;
+               return $this;
+       }
+       /**
+        * List of items being paid for.
+        * @return PayPal\Api\ItemList
+        * @deprecated. Instead use getItemList
+        */
+       public function getItem_list() {
+               return $this->item_list;
+       }
+
+       /**
+        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
+        * @array
+        * @param PayPal\Api\RelatedResources $related_resources
+        */
+       public function setRelatedResources($related_resources) {
+               $this->related_resources = $related_resources;
+               return $this;
+       }
+
+       /**
+        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
+        * @return PayPal\Api\RelatedResources
+        */
+       public function getRelatedResources() {
+               return $this->related_resources;
+       }
+
+       /**
+        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
+        * @array
+        * @param PayPal\Api\RelatedResources $related_resources
+        * @deprecated. Instead use setRelatedResources
+        */
+       public function setRelated_resources($related_resources) {
+               $this->related_resources = $related_resources;
+               return $this;
+       }
+       /**
+        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
+        * @return PayPal\Api\RelatedResources
+        * @deprecated. Instead use getRelatedResources
+        */
+       public function getRelated_resources() {
+               return $this->related_resources;
+       }
+
+       /**
+        * Additional transactions for complex payment (Parallel and Chained) scenarios.
+        * @array
+        * @param PayPal\Api\self $transactions
+        */
+       public function setTransactions($transactions) {
+               $this->transactions = $transactions;
+               return $this;
+       }
+
+       /**
+        * Additional transactions for complex payment (Parallel and Chained) scenarios.
+        * @return PayPal\Api\self
+        */
+       public function getTransactions() {
+               return $this->transactions;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php
new file mode 100644 (file)
index 0000000..2219837
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+namespace PayPal\Api;
+
+use PayPal\Common\PPModel;
+
+class Transactions extends PPModel {
+       /**
+        * Amount being collected.
+        * @param PayPal\Api\Amount $amount
+        */
+       public function setAmount($amount) {
+               $this->amount = $amount;
+               return $this;
+       }
+
+       /**
+        * Amount being collected.
+        * @return PayPal\Api\Amount
+        */
+       public function getAmount() {
+               return $this->amount;
+       }
+
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php
new file mode 100644 (file)
index 0000000..8b4d4e6
--- /dev/null
@@ -0,0 +1,137 @@
+<?php\r
+\r
+namespace PayPal\Auth;\r
+\r
+/**\r
+ * Oauth Token credential\r
+ *\r
+ */\r
+use PayPal\Rest\RestHandler;\r
+use PayPal\Common\PPUserAgent;\r
+use PayPal\Core\PPLoggingManager;\r
+use PayPal\Core\PPConstants;\r
+use PayPal\Core\PPHttpConfig;\r
+use PayPal\Core\PPConnectionManager;\r
+use PayPal\Exception\PPConfigurationException;\r
+\r
+class OAuthTokenCredential {\r
+       \r
+       private static $expiryBufferTime = 120;\r
+       \r
+       private $logger;\r
+       \r
+       /**\r
+        * Client ID as obtained from the developer portal\r
+        */\r
+       private $clientId;\r
+       \r
+       /**\r
+        * Client secret as obtained from the developer portal\r
+        */\r
+       private $clientSecret;\r
+       \r
+       \r
+       /**\r
+        * Generated Access Token\r
+        */\r
+       private $accessToken;   \r
+       \r
+       /**\r
+        * Seconds for with access token is valid\r
+        */\r
+       private $tokenExpiresIn;\r
+       \r
+       /**\r
+        * Last time (in milliseconds) when access token was generated\r
+        */\r
+       private $tokenCreateTime;\r
+       \r
+       /**\r
+        * \r
+        * @param string $clientId client id obtained from the developer portal\r
+        * @param string $clientSecret client secret obtained from the developer portal\r
+        */\r
+       public function __construct($clientId, $clientSecret) {\r
+               $this->clientId = $clientId;\r
+               $this->clientSecret = $clientSecret;            \r
+       }\r
+       \r
+       /**\r
+        * @return the accessToken\r
+        */\r
+       public function getAccessToken($config) {\r
+\r
+               $this->logger = new PPLoggingManager(__CLASS__, $config);\r
+               // Check if Access Token is not null and has not expired.\r
+               // The API returns expiry time as a relative time unit \r
+               // We use a buffer time when checking for token expiry to account\r
+               // for API call delays and any delay between the time the token is\r
+               // retrieved and subsequently used\r
+               if ($this->accessToken != null && \r
+                               (time() - $this->tokenCreateTime) > ($this->tokenExpiresIn - self::$expiryBufferTime)) {                        \r
+                               $this->accessToken = null;                      \r
+               }\r
+               // If accessToken is Null, obtain a new token\r
+               if ($this->accessToken == null) {                       \r
+                       $this->_generateAccessToken($config);\r
+               }\r
+               return $this->accessToken;\r
+       }\r
+       \r
+       /**\r
+        * Generates a new access token\r
+        */\r
+       private function _generateAccessToken($config) {\r
+\r
+               $base64ClientID = base64_encode($this->clientId . ":" . $this->clientSecret);                                                   \r
+               $headers = array(\r
+                       "User-Agent" => PPUserAgent::getValue(RestHandler::$sdkName, RestHandler::$sdkVersion), \r
+                       "Authorization" => "Basic " . $base64ClientID,\r
+                       "Accept" => "*/*"\r
+               );              \r
+               $httpConfiguration = $this->getOAuthHttpConfiguration($config);\r
+               $httpConfiguration->setHeaders($headers);\r
+               \r
+               $connection = PPConnectionManager::getInstance()->getConnection($httpConfiguration, $config);           \r
+               $res = $connection->execute("grant_type=client_credentials");           \r
+               $jsonResponse = json_decode($res, true);\r
+               if($jsonResponse == NULL || \r
+                               !isset($jsonResponse["access_token"]) || !isset($jsonResponse["expires_in"]) ) {\r
+                       $this->accessToken = NULL;\r
+                       $this->tokenExpiresIn = NULL;   \r
+                       $this->logger->warning("Could not generate new Access token. Invalid response from server: " . $jsonResponse);          \r
+               } else {\r
+                       $this->accessToken = $jsonResponse["access_token"];\r
+                       $this->tokenExpiresIn = $jsonResponse["expires_in"];\r
+               }\r
+               $this->tokenCreateTime = time();\r
+               return $this->accessToken;\r
+       }\r
+       \r
+       /*\r
+        * Get HttpConfiguration object for OAuth API\r
+       */\r
+       private function getOAuthHttpConfiguration($config) {\r
+               if (isset($config['oauth.EndPoint'])) {\r
+                       $baseEndpoint = $config['oauth.EndPoint'];\r
+               } else if (isset($config['service.EndPoint'])) {\r
+                       $baseEndpoint = $config['service.EndPoint'];\r
+               } else if (isset($config['mode'])) {\r
+                       switch (strtoupper($config['mode'])) {\r
+                               case 'SANDBOX':\r
+                                       $baseEndpoint = PPConstants::REST_SANDBOX_ENDPOINT;\r
+                                       break;\r
+                               case 'LIVE':\r
+                                       $baseEndpoint = PPConstants::REST_LIVE_ENDPOINT;\r
+                                       break;\r
+                               default:\r
+                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');\r
+                       }\r
+               } else {\r
+                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');\r
+               }               \r
+               \r
+               $baseEndpoint = rtrim(trim($baseEndpoint), '/');                 \r
+               return new PPHttpConfig($baseEndpoint . "/v1/oauth2/token", "POST");\r
+       }\r
+}\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php
new file mode 100755 (executable)
index 0000000..4250b5e
--- /dev/null
@@ -0,0 +1,78 @@
+<?php\r
+namespace PayPal\Rest;\r
+\r
+use PayPal\Common\PPApiContext;\r
+\r
+echo "ADASDASD";\r
+/**\r
+ * \r
+ * Call level parameters such as\r
+ * request id, credentials etc\r
+ */\r
+class ApiContext extends PPApiContext {\r
+       \r
+       /**\r
+        * OAuth Credentials to use for this call\r
+        * @var PayPal/Api/OAuthTokenCredential\r
+        */\r
+       private $credential;\r
+       \r
+       /**\r
+        * Unique request id to be used for this call\r
+        * The user can either generate one as per application\r
+        * needs or let the SDK generate one\r
+        * @var string\r
+        */\r
+       private $requestId;\r
+       \r
+       /**\r
+        * \r
+        */\r
+       public function getCredential() {\r
+               return $this->credential;               \r
+       }\r
+       \r
+       public function getrequestId() {\r
+               if($this->requestId == null) {\r
+                       $this->requestId = $this->generateRequestId();\r
+               }\r
+               return $this->requestId;\r
+       }\r
+       \r
+       \r
+       /**\r
+        * \r
+        * @param PayPal/Api/OAuthTokenCredential $credential\r
+        * @param string $requestId\r
+        */\r
+       public function __construct($credential, $requestId=null) {\r
+               $this->credential = $credential;\r
+               $this->requestId = $requestId;\r
+       }\r
+       \r
+       /**\r
+        * Generates a unique per request id that\r
+        * can be used to set the PayPal-Request-Id header\r
+        * that is used for idemptency\r
+        * @return string\r
+        */\r
+       private function generateRequestId() {\r
+               \r
+               static $pid = -1;\r
+               static $addr = -1;\r
+               \r
+               if ($pid == -1) {\r
+                       $pid = getmypid();\r
+               }\r
+               if ($addr == -1) {\r
+                       if(array_key_exists('SERVER_ADDR', $_SERVER)) {\r
+                               $addr = ip2long($_SERVER['SERVER_ADDR']);\r
+                       } else {\r
+                               $addr  = php_uname('n');\r
+                       }\r
+               }\r
+               \r
+               return $addr . $pid . $_SERVER['REQUEST_TIME'] . mt_rand(0, 0xffff);\r
+       }\r
+}\r
+echo "kkkkk";
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php
new file mode 100644 (file)
index 0000000..395586c
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+namespace PayPal\Rest;
+
+interface IResource {
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php
new file mode 100644 (file)
index 0000000..cbdd2fa
--- /dev/null
@@ -0,0 +1,84 @@
+<?php\r
+namespace PayPal\Rest;\r
+\r
+use PayPal\Auth\OAuthTokenCredential;\r
+use PayPal\Handler\IPPHandler;\r
+use PayPal\Core\PPCredentialManager;\r
+use PayPal\Core\PPConstants;\r
+use PayPal\Exception\PPMissingCredentialException;\r
+use PayPal\Exception\PPInvalidCredentialException;\r
+use PayPal\Exception\PPConfigurationException;\r
+use PayPal\Common\PPUserAgent;\r
+\r
+/**\r
+ * \r
+ * API handler for all REST API calls\r
+ */\r
+class RestHandler implements IPPHandler {\r
+\r
+       private $apiContext;\r
+       \r
+       public static $sdkName = "rest-sdk-php";        \r
+       public static $sdkVersion = "0.6.0";\r
+       \r
+       public function __construct($apiContext) {\r
+               $this->apiContext = $apiContext;\r
+       }\r
+       \r
+       public function handle($httpConfig, $request, $options) {\r
+               \r
+               $credential = $this->apiContext->getCredential();\r
+               $config = $this->apiContext->getConfig();\r
+               \r
+               if($credential == NULL) {\r
+                       // Try picking credentials from the config file\r
+                       $credMgr = PPCredentialManager::getInstance($config);\r
+                       $credValues = $credMgr->getCredentialObject();\r
+                       if(!is_array($credValues)) {\r
+                               throw new PPMissingCredentialException("Empty or invalid credentials passed");\r
+                       }\r
+                       $credential = new OAuthTokenCredential($credValues['clientId'], $credValues['clientSecret']);\r
+               }\r
+               if($credential == NULL || ! ($credential instanceof OAuthTokenCredential) ) {\r
+                       throw new PPInvalidCredentialException("Invalid credentials passed");\r
+               }\r
+\r
+               \r
+               $httpConfig->setUrl(\r
+                       rtrim( trim($this->_getEndpoint($config)), '/') . \r
+                               (isset($options['path']) ? $options['path'] : '')\r
+               );\r
+               \r
+               if(!array_key_exists("User-Agent", $httpConfig->getHeaders())) {\r
+                       $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(self::$sdkName, self::$sdkVersion));\r
+               }               \r
+               if(!is_null($credential) && $credential instanceof OAuthTokenCredential) {\r
+                       $httpConfig->addHeader('Authorization', "Bearer " . $credential->getAccessToken($config));\r
+               }\r
+               if($httpConfig->getMethod() == 'POST' || $httpConfig->getMethod() == 'PUT') {\r
+                       $httpConfig->addHeader('PayPal-Request-Id', $this->apiContext->getRequestId());\r
+               }\r
+               \r
+       }\r
+       \r
+       private function _getEndpoint($config) {\r
+               if (isset($config['service.EndPoint'])) {\r
+                       return $config['service.EndPoint'];\r
+               } else if (isset($config['mode'])) {\r
+                       switch (strtoupper($config['mode'])) {\r
+                               case 'SANDBOX':\r
+                                       return PPConstants::REST_SANDBOX_ENDPOINT;\r
+                                       break;\r
+                               case 'LIVE':\r
+                                       return PPConstants::REST_LIVE_ENDPOINT;\r
+                                       break;\r
+                               default:\r
+                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');\r
+                                       break;\r
+                       }\r
+               } else {\r
+                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml
new file mode 100644 (file)
index 0000000..d8063ef
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="./tests/bootstrap.php"
+         colors="true"
+         processIsolation="false"
+         stopOnFailure="false"
+         syntaxCheck="false"
+         convertErrorsToExceptions="true"
+         convertNoticesToExceptions="true"
+         convertWarningsToExceptions="true"
+         testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader">
+
+    <testsuites>
+        <testsuite name="All">
+            <directory>tests</directory>
+        </testsuite>
+    </testsuites>
+
+    <logging>
+        <log type="junit" target="build/junit.xml" logIncompleteSkipped="false" />
+    </logging>
+
+    <filter>
+        <whitelist>
+            <directory suffix=".php">./lib</directory>
+            <exclude>
+            </exclude>
+        </whitelist>
+    </filter>
+</phpunit>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php
new file mode 100644 (file)
index 0000000..ec271c9
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Address;
+use PayPal\Test\Constants;
+
+class AddressTest extends \PHPUnit_Framework_TestCase {
+
+       private $address;
+
+       public static $line1 = "3909 Witmer Road";
+       public static $line2 = "Niagara Falls"; 
+       public static $city = "Niagara Falls";
+       public static $state = "NY";
+       public static $postalCode = "14305";
+       public static $countryCode = "US";
+       public static $phone = "716-298-1822";
+       public static $type = "Billing";
+
+       public static function createAddress() {
+               $addr = new Address();
+               $addr->setLine1(self::$line1);
+               $addr->setLine2(self::$line2);
+               $addr->setCity(self::$city);
+               $addr->setState(self::$state);
+               $addr->setPostalCode(self::$postalCode);
+               $addr->setCountryCode(self::$countryCode);
+               $addr->setPhone(self::$phone);
+               return $addr;
+       }
+       
+       public function setup() {
+               $this->address = self::createAddress();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$line1, $this->address->getLine1());
+               $this->assertEquals(self::$line2, $this->address->getLine2());
+               $this->assertEquals(self::$city, $this->address->getCity());
+               $this->assertEquals(self::$state, $this->address->getState());
+               $this->assertEquals(self::$postalCode, $this->address->getPostalCode());
+               $this->assertEquals(self::$countryCode, $this->address->getCountryCode());
+               $this->assertEquals(self::$phone, $this->address->getPhone());
+       }
+       
+       public function testSerializeDeserialize() {
+               $a1 = $this->address;
+               
+               $a2 = new Address();
+               $a2->fromJson($a1->toJson());
+               
+               $this->assertEquals($a1, $a2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php
new file mode 100644 (file)
index 0000000..7f24e7b
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Amount;
+use PayPal\Test\Constants;
+
+class AmountTest extends \PHPUnit_Framework_TestCase {
+
+       private $amounts;
+
+       public static $currency = "USD";
+       public static $total = "1.12";  
+
+       public static function createAmount() {
+               $amount = new Amount();
+               $amount->setCurrency(self::$currency);
+               $amount->setTotal(self::$total);
+               
+               return $amount;
+       }
+       
+       public function setup() {
+               $this->amounts['partial'] = self::createAmount();
+               
+               $amount = self::createAmount();
+               $amount->setDetails(DetailsTest::createAmountDetails());
+               $this->amounts['full'] = $amount;
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$currency, $this->amounts['partial']->getCurrency());
+               $this->assertEquals(self::$total, $this->amounts['partial']->getTotal());
+               $this->assertEquals(DetailsTest::$fee, $this->amounts['full']->getDetails()->getFee());
+       }
+       
+       public function testSerializeDeserialize() {
+               $a1 = $this->amounts['partial'];
+               
+               $a2 = new Amount();
+               $a2->fromJson($a1->toJson());
+               
+               $this->assertEquals($a1, $a2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php
new file mode 100644 (file)
index 0000000..63ba8cb
--- /dev/null
@@ -0,0 +1,156 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Amount;
+use PayPal\Api\Authorization;
+use PayPal\Api\Links;
+use PayPal\Test\Constants;
+use PayPal\Api\RedirectUrls;
+use PayPal\Api\Address;
+
+use PayPal\Api\Capture;
+use PayPal\Api\CreditCard;
+use PayPal\Api\Payer;
+use PayPal\Api\Payment;
+use PayPal\Api\FundingInstrument;
+use PayPal\Api\Transaction;
+use PayPal\Exception\PPConnectionException;
+
+class AuthorizationTest extends \PHPUnit_Framework_TestCase {
+       private $authorizations = array();
+       public static $create_time = "2013-02-28T00:00:00Z";
+       public static $id = "AUTH-123";
+       public static $state = "Created";
+       public static $parent_payment = "PAY-12345";
+       public static $currency = "USD";
+       public static $total = "1.12";
+       public static $href = "USD";
+       public static $rel = "1.12";
+       public static $method = "1.12";
+       
+       public static function createAuthorization() {                  
+               $authorization = new Authorization();
+               $authorization->setCreateTime(self::$create_time);
+               $authorization->setId(self::$id);
+               $authorization->setState(self::$state);
+               
+               $authorization->setAmount(AmountTest::createAmount());
+               $authorization->setLinks(array(LinksTest::createLinks()));      
+               
+               return $authorization;
+       }
+       
+       public static function authorize()
+       {
+               $addr = new Address();
+               $addr->setLine1("3909 Witmer Road");
+               $addr->setLine2("Niagara Falls");
+               $addr->setCity("Niagara Falls");
+               $addr->setState("NY");
+               $addr->setPostal_code("14305");
+               $addr->setCountry_code("US");
+               $addr->setPhone("716-298-1822");
+               
+               $card = new CreditCard();
+               $card->setType("visa");
+               $card->setNumber("4417119669820331");
+               $card->setExpire_month("11");
+               $card->setExpire_year("2019");
+               $card->setCvv2("012");
+               $card->setFirst_name("Joe");
+               $card->setLast_name("Shopper");
+               $card->setBilling_address($addr);
+               
+               $fi = new FundingInstrument();
+               $fi->setCredit_card($card);
+               
+               $payer = new Payer();
+               $payer->setPayment_method("credit_card");
+               $payer->setFunding_instruments(array($fi));
+               
+               $amount = new Amount();
+               $amount->setCurrency("USD");
+               $amount->setTotal("1.00");
+               
+               $transaction = new Transaction();
+               $transaction->setAmount($amount);
+               $transaction->setDescription("This is the payment description.");
+               
+               $payment = new Payment();
+               $payment->setIntent("authorize");
+               $payment->setPayer($payer);
+               $payment->setTransactions(array($transaction));
+               
+               $paymnt = $payment->create();
+               $resArray = $paymnt->toArray();
+               
+               return $authId = $resArray['transactions'][0]['related_resources'][0]['authorization']['id'];
+               
+       }
+       public function setup() {
+               $authorization = new Authorization();
+               $authorization->setCreateTime(self::$create_time);
+               $authorization->setId(self::$id);
+               $authorization->setState(self::$state);
+               $authorization->setParentPayment(self::$parent_payment);
+               $this->authorizations['partial'] = $authorization;
+               $this->authorizations['full'] = self::createAuthorization();
+               
+       }
+
+       public function testGetterSetter() {            
+               $authorization = $this->authorizations['partial'];
+               $this->assertEquals(self::$create_time, $authorization->getCreateTime());
+               $this->assertEquals(self::$id, $authorization->getId());
+               $this->assertEquals(self::$state, $authorization->getState());
+               $this->assertEquals(self::$parent_payment, $authorization->getParentPayment());
+               
+               $authorization = $this->authorizations['full'];
+               $this->assertEquals(AmountTest::$currency, $authorization->getAmount()->getCurrency());
+               $this->assertEquals(1, count($authorization->getLinks()));
+       }
+       
+       public function testSerializeDeserialize() {
+               $a1 = $this->authorizations['partial'];
+               $a2 = new Authorization();
+               $a2->fromJson($a1->toJson());
+               $this->assertEquals($a1, $a2);
+       }
+       public function testOperations() {
+               $authId = self::authorize();
+               $auth = Authorization::get($authId);
+               $this->assertNotNull($auth->getId());
+               
+               $amount = new Amount();
+               $amount->setCurrency("USD");
+               $amount->setTotal("1.00");
+               
+               $captur = new Capture();
+               $captur->setId($authId);
+               $captur->setAmount($amount);    
+               
+               $capt = $auth->capture($captur);
+               $this->assertNotNull( $capt->getId());
+               
+               $authId = self::authorize();
+               $auth = Authorization::get($authId);
+               $void = $auth->void();
+               $this->assertNotNull($void->getId());
+
+       }
+       
+       public function testReauthorize(){
+               $authorization = Authorization::get('7GH53639GA425732B');
+       
+               $amount = new Amount();
+               $amount->setCurrency("USD");
+               $amount->setTotal("1.00");
+               
+               $authorization->setAmount($amount);
+               try{
+                       $reauthorization = $authorization->reauthorize();
+               }catch (PPConnectionException $ex){
+                       $this->assertEquals(strpos($ex->getMessage(),"500"), false);
+               }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php
new file mode 100644 (file)
index 0000000..a1162fd
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Capture;
+use PayPal\Api\Refund;
+use PayPal\Api\Authorization;
+use PayPal\Api\Amount;
+use PayPal\Test\Constants;
+
+class CaptureTest extends \PHPUnit_Framework_TestCase {
+
+       private $captures;
+
+       public static $authorization_id = "AUTH-123";
+       public static $create_time = "2013-02-28T00:00:00Z";
+       public static $id = "C-5678";
+       public static $parent_payment = "PAY-123";
+       public static $state = "Created";
+
+       public static function createCapture() {
+               $capture = new Capture();
+               $capture->setCreateTime(self::$create_time);
+               $capture->setId(self::$id);
+               $capture->setParentPayment(self::$parent_payment);
+               $capture->setState(self::$state);               
+               
+               return $capture;
+       }
+       
+       public function setup() {
+               $this->captures['partial'] = self::createCapture();
+               
+               $capture = self::createCapture();
+               $capture->setAmount(AmountTest::createAmount());
+               $capture->setLinks(array(LinksTest::createLinks()));
+               $this->captures['full'] = $capture;
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$create_time, $this->captures['partial']->getCreateTime());
+               $this->assertEquals(self::$id, $this->captures['partial']->getId());
+               $this->assertEquals(self::$parent_payment, $this->captures['partial']->getParentPayment());
+               $this->assertEquals(self::$state, $this->captures['partial']->getState());
+               
+               $this->assertEquals(AmountTest::$currency, $this->captures['full']->getAmount()->getCurrency());
+               $links = $this->captures['full']->getLinks();
+               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
+       }
+       
+       public function testSerializeDeserialize() {
+               $c1 = $this->captures['partial'];
+               
+               $c2 = new Capture();
+               $c2->fromJson($c1->toJson());
+               
+               $this->assertEquals($c1, $c2);
+       }
+       
+       public function testOperations()
+       {
+               $authId = AuthorizationTest::authorize();
+               $auth = Authorization::get($authId);
+               
+               $amount = new Amount();
+               $amount->setCurrency("USD");
+               $amount->setTotal("1.00");
+               
+               $captr = new Capture();
+               $captr->setId($authId);
+               $captr->setAmount($amount);
+               
+               $capt = $auth->capture($captr);
+               $captureId = $capt->getId();
+               $this->assertNotNull($captureId);
+               
+               $refund = new Refund();
+               $refund->setId($captureId);
+               $refund->setAmount($amount);
+               
+               $capture = Capture::get($captureId);
+               $this->assertNotNull($capture->getId());
+               
+               $retund = $capture->refund($refund);
+               $this->assertNotNull($retund->getId());
+               
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php
new file mode 100644 (file)
index 0000000..a7f1b53
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\CreditCardHistory;
+
+use PayPal\Api\Address;
+use PayPal\Api\CreditCard;
+use PayPal\Test\Constants;
+
+class CreditCardHistoryTest extends \PHPUnit_Framework_TestCase {
+       
+       private $cards;
+       
+       public static $id = "id";
+       public static $validUntil = "2013-02-28T00:00:00Z";
+       public static $state = "created";
+       public static $payerId = "payer-id";
+       public static $cardType = "visa";
+       public static $cardNumber = "4417119669820331";
+       public static $expireMonth = 11;
+       public static $expireYear = "2019";
+       public static $cvv = "012";
+       public static $firstName = "V";
+       public static $lastName = "C";
+       
+       public static function createCreditCard() {
+               $card = new CreditCard();
+               $card->setType(self::$cardType);
+               $card->setNumber(self::$cardNumber);
+               $card->setExpireMonth(self::$expireMonth);
+               $card->setExpireYear(self::$expireYear);
+               $card->setCvv2(self::$cvv);
+               $card->setFirstName(self::$firstName);
+               $card->setLastName(self::$lastName);
+               $card->setId(self::$id);
+               $card->setValidUntil(self::$validUntil);
+               $card->setState(self::$state);
+               $card->setPayerId(self::$payerId);
+               return $card;
+       }
+       
+       public function setup() {
+               
+               $card = self::createCreditCard();
+               $card->setBillingAddress(AddressTest::createAddress()); 
+               $card->setLinks(array(LinksTest::createLinks()));
+               $this->cards['full'] = $card;
+               
+               $card = self::createCreditCard();       
+               $this->cards['partial'] = $card;
+       }
+       
+       public function testGetterSetters() {
+               $cardHistory = new CreditCardHistory();
+               $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full']));
+               $cardHistory->setCount(2);
+               
+               $this->assertEquals(2, count($cardHistory->getCreditCards()));
+       }
+
+       
+       public function testSerializationDeserialization() {
+               $cardHistory = new CreditCardHistory();
+               $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full']));
+               $cardHistory->setCount(2);
+       
+               $cardHistoryCopy = new CreditCardHistory();
+               $cardHistoryCopy->fromJson($cardHistory->toJSON());
+               
+               $this->assertEquals($cardHistory, $cardHistoryCopy);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php
new file mode 100644 (file)
index 0000000..27896fe
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Address;
+use PayPal\Api\CreditCard;
+use PayPal\Test\Constants;
+class CreditCardTest extends \PHPUnit_Framework_TestCase {
+       
+       private $cards;
+       
+       public static $id = "id";
+       public static $validUntil = "2013-02-28T00:00:00Z";
+       public static $state = "created";
+       public static $payerId = "payer-id";
+       public static $cardType = "visa";
+       public static $cardNumber = "4417119669820331";
+       public static $expireMonth = 11;
+       public static $expireYear = "2019";
+       public static $cvv = "012";
+       public static $firstName = "V";
+       public static $lastName = "C";
+       
+       public static function createCreditCard() {
+               $card = new CreditCard();
+               $card->setType(self::$cardType);
+               $card->setNumber(self::$cardNumber);
+               $card->setExpireMonth(self::$expireMonth);
+               $card->setExpireYear(self::$expireYear);
+               $card->setCvv2(self::$cvv);
+               $card->setFirstName(self::$firstName);
+               $card->setLastName(self::$lastName);
+               $card->setId(self::$id);
+               $card->setValidUntil(self::$validUntil);
+               $card->setState(self::$state);
+               $card->setPayerId(self::$payerId);
+               return $card;
+       }
+       
+       public function setup() {
+               
+               $card = self::createCreditCard();
+               $card->setBillingAddress(AddressTest::createAddress()); 
+               $card->setLinks(array(LinksTest::createLinks()));
+               $this->cards['full'] = $card;
+               
+               $card = self::createCreditCard();       
+               $this->cards['partial'] = $card;
+       }
+       
+       public function testGetterSetters() {
+               $c = $this->cards['partial'];
+               $this->assertEquals(self::$cardType, $c->getType());
+               $this->assertEquals(self::$cardNumber, $c->getNumber());
+               $this->assertEquals(self::$expireMonth, $c->getExpireMonth());
+               $this->assertEquals(self::$expireYear, $c->getExpireYear());
+               $this->assertEquals(self::$cvv, $c->getCvv2());
+               $this->assertEquals(self::$firstName, $c->getFirstName());
+               $this->assertEquals(self::$lastName, $c->getLastName());
+               $this->assertEquals(self::$id, $c->getId());
+               $this->assertEquals(self::$validUntil, $c->getValidUntil());
+               $this->assertEquals(self::$state, $c->getState());
+               $this->assertEquals(self::$payerId, $c->getPayerId());
+               
+               $c = $this->cards['full'];
+               $this->assertEquals(AddressTest::$line1, $c->getBillingAddress()->getLine1());
+               $link = $c->getLinks();
+               $this->assertEquals(LinksTest::$href, $link[0]->getHref());
+       }
+       
+       public function testSerializeDeserialize() {
+               $c1 = $this->cards['full'];
+               $json = $c1->toJson();
+               
+               $c2 = new CreditCard();
+               $c2->fromJson($json);           
+               
+               $this->assertEquals($c1, $c2);
+       }
+       
+       public function testOperations() {
+               $c1 = $this->cards['full'];
+               
+//             $this->assertNull($c1->getId());
+               $c1->create();          
+               $this->assertNotNull($c1->getId());
+               
+               $c2 = CreditCard::get($c1->getId());
+               $this->assertEquals($c1->getBillingAddress(), $c2->getBillingAddress());
+               $this->assertGreaterThan(0, count($c2->getLinks()));
+               $this->assertEquals(self::$cardType, $c2->getType());
+               $this->assertNotNull($c2->getState());
+               $this->assertEquals(true, $c2->delete());
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php
new file mode 100644 (file)
index 0000000..d1f8db9
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\CreditCardToken;
+use PayPal\Test\Constants;
+
+class CreditCardTokenTest extends \PHPUnit_Framework_TestCase {
+
+       private $ccToken;
+
+       public static $payerId = "PAYER-123";
+       public static $creditCardId = "CC-123";
+
+       public static function createCreditCardToken() {
+               $ccToken = new CreditCardToken();
+               $ccToken->setPayerId(self::$payerId);
+               $ccToken->setCreditCardId(self::$creditCardId);
+               return $ccToken;
+       }
+       
+       public function setup() {
+               $this->ccToken = self::createCreditCardToken();         
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$payerId, $this->ccToken->getPayerId());
+               $this->assertEquals(self::$creditCardId, $this->ccToken->getCreditCardId());
+       }
+       
+       public function testSerializeDeserialize() {
+               $t1 = $this->ccToken;
+               
+               $t2 = new CreditCardToken();
+               $t2->fromJson($t1->toJson());
+               
+               $this->assertEquals($t1, $t2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php
new file mode 100644 (file)
index 0000000..ae1cba9
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Details;
+use PayPal\Test\Constants;
+
+class DetailsTest extends \PHPUnit_Framework_TestCase {
+
+       private $amountDetails;
+
+       public static $subtotal = "2.00";
+       public static $tax = "1.12";
+       public static $shipping = "3.15";
+       public static $fee = "4.99";
+
+       public static function createAmountDetails() {
+               $amountDetails = new Details();
+               $amountDetails->setSubtotal(self::$subtotal);
+               $amountDetails->setTax(self::$tax);
+               $amountDetails->setShipping(self::$shipping);
+               $amountDetails->setFee(self::$fee);
+               
+               return $amountDetails;
+       }
+
+       public function setup() {
+               $this->amountDetails = self::createAmountDetails();
+       }
+       
+       public function testGetterSetters() {
+               $this->assertEquals(self::$subtotal, $this->amountDetails->getSubtotal());
+               $this->assertEquals(self::$tax, $this->amountDetails->getTax());
+               $this->assertEquals(self::$shipping, $this->amountDetails->getShipping());
+               $this->assertEquals(self::$fee, $this->amountDetails->getFee());                
+       }
+       
+       public function testSerializeDeserialize() {
+               $a1 = $this->amountDetails;
+               
+               $a2 = new Details();
+               $a2->fromJson($a1->toJson());
+               
+               $this->assertEquals($a1, $a2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php
new file mode 100644 (file)
index 0000000..cb420d6
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\FundingInstrument;
+use PayPal\Test\Constants;
+
+class FundingInstrumentTest extends \PHPUnit_Framework_TestCase {
+
+       private $fi;
+
+       public static function createFundingInstrument() {
+               $fi = new FundingInstrument();
+               $fi->setCreditCard(CreditCardTest::createCreditCard());
+               $fi->setCreditCardToken(CreditCardTokenTest::createCreditCardToken());
+               return $fi;
+       }
+       
+       public function setup() {
+               $this->fi = self::createFundingInstrument();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(CreditCardTest::$cardNumber, $this->fi->getCreditCard()->getNumber());
+               $this->assertEquals(CreditCardTokenTest::$creditCardId, 
+                               $this->fi->getCreditCardToken()->getCreditCardId());
+       }
+       
+       public function testSerializeDeserialize() {
+               $fi1 = $this->fi;
+               
+               $fi2 = new FundingInstrument();
+               $fi2->fromJson($fi1->toJson());         
+               $this->assertEquals($fi1, $fi2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php
new file mode 100644 (file)
index 0000000..fe5f870
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Item;
+use PayPal\Api\ItemList;
+use PayPal\Test\Constants;
+
+class ItemListTest extends \PHPUnit_Framework_TestCase {
+       
+       private $items = array();
+       
+       private static $name = "item name";
+       private static $price = "1.12";
+       private static $quantity = "10";
+       private static $sku = "AXVTY123";
+       private static $currency = "USD";
+       
+       public static function createItemList() {
+               
+               $item = ItemTest::createItem();
+               
+               $itemList = new ItemList();
+               $itemList->setItems(array($item));
+               $itemList->setShippingAddress(ShippingAddressTest::createAddress());
+               
+               return $itemList;
+       }
+       
+       public function setup() {               
+               $this->items = self::createItemList();
+       }
+       
+       public function testGetterSetters() {
+               $items = $this->items->getItems();              
+               $this->assertEquals(ItemTest::createItem(), $items[0]);
+               $this->assertEquals(ShippingAddressTest::createAddress(), $this->items->getShippingAddress());
+       }
+       
+       public function testSerializeDeserialize() {
+               $itemList = new ItemList();
+               $itemList->fromJson($this->items->toJSON());
+       
+               $this->assertEquals($itemList, $this->items);
+       }
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php
new file mode 100644 (file)
index 0000000..59be288
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Item;
+use PayPal\Test\Constants;
+
+class ItemTest extends \PHPUnit_Framework_TestCase {
+       
+       private $item;
+       
+       public static $name = "item name";
+       public static $price = "1.12";
+       public static $quantity = "10";
+       public static $sku = "AXVTY123";
+       public static $currency = "USD";
+       
+       public static function createItem() {
+               $item = new Item();
+               $item->setName(self::$name);
+               $item->setPrice(self::$price);
+               $item->setQuantity(self::$quantity);
+               $item->setSku(self::$sku);
+               $item->setCurrency(self::$currency);
+               
+               return $item;
+       }
+       public function setup() {               
+               $this->item = ItemTest::createItem();
+       }
+       
+       public function testGetterSetters() {
+               $this->assertEquals(self::$name, $this->item->getName());
+               $this->assertEquals(self::$price, $this->item->getPrice());
+               $this->assertEquals(self::$sku, $this->item->getSku());
+               $this->assertEquals(self::$quantity, $this->item->getQuantity());
+               $this->assertEquals(self::$currency, $this->item->getCurrency());
+       }
+       
+       public function testSerializeDeserialize() {
+               $item = new Item();
+               $item->fromJson($this->item->toJSON());
+       
+               $this->assertEquals($item, $this->item);
+       }
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php
new file mode 100644 (file)
index 0000000..68da69a
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Links;
+use PayPal\Test\Constants;
+
+class LinksTest extends \PHPUnit_Framework_TestCase {
+
+       private $links;
+
+       public static $href = "USD";
+       public static $rel = "1.12";
+       public static $method = "1.12";
+       
+       public static function createLinks() {
+               $links = new Links();
+               $links->setHref(self::$href);
+               $links->setRel(self::$rel);
+               $links->setMethod(self::$method);
+               
+               return $links;
+       }
+       
+       public function setup() {
+               $this->links = self::createLinks();
+       }
+       
+       public function testGetterSetters() {
+               $this->assertEquals(self::$href, $this->links->getHref());
+               $this->assertEquals(self::$rel, $this->links->getRel());
+               $this->assertEquals(self::$method, $this->links->getMethod());
+       }
+       
+       public function testSerializeDeserialize() {
+               $link2 = new Links();
+               $link2->fromJson($this->links->toJSON());
+               $this->assertEquals($this->links, $link2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php
new file mode 100644 (file)
index 0000000..ea9469f
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Payee;
+use PayPal\Test\Constants;
+
+class PayeeTest extends \PHPUnit_Framework_TestCase {
+
+       private $payee;
+
+       public static $email = "test@paypal.com";
+       public static $merchant_id = "1XY12121";
+       public static $phone = "+14081234566";
+       
+
+       public static function createPayee() {
+               $payee = new Payee();
+               $payee->setEmail(self::$email);
+               $payee->setMerchantId(self::$merchant_id);
+               $payee->setPhone(self::$phone);         
+               
+               return $payee;
+       }
+       
+       public function setup() {
+               $this->payee = self::createPayee();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$email, $this->payee->getEmail());
+               $this->assertEquals(self::$merchant_id, $this->payee->getMerchantId());
+               $this->assertEquals(self::$phone, $this->payee->getPhone());
+       }
+       
+       public function testSerializeDeserialize() {
+               $p1 = $this->payee;
+               
+               $p2 = new Payee();
+               $p2->fromJson($p1->toJson());
+               
+               $this->assertEquals($p1, $p2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php
new file mode 100644 (file)
index 0000000..b1f5858
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\PayerInfo;
+use PayPal\Test\Constants;
+
+class PayerInfoTest extends \PHPUnit_Framework_TestCase {
+
+       private $payerInfo;
+
+       public static $email = "test@paypal.com";
+       public static $firstName = "first";
+       public static $lastName = "last";
+       public static $phone = "408-1234-5687";
+       public static $payerId = "PAYER-1234";
+
+       public static function createPayerInfo() {
+               $payerInfo = new PayerInfo();
+               $payerInfo->setEmail(self::$email);
+               $payerInfo->setFirstName(self::$firstName);
+               $payerInfo->setLastName(self::$lastName);
+               $payerInfo->setPhone(self::$phone);
+               $payerInfo->setPayerId(self::$payerId);
+               $payerInfo->setShippingAddress(AddressTest::createAddress());
+               
+               return $payerInfo;
+       }
+       
+       public function setup() {
+               $this->payerInfo = self::createPayerInfo();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$email, $this->payerInfo->getEmail());
+               $this->assertEquals(self::$firstName, $this->payerInfo->getFirstName());
+               $this->assertEquals(self::$lastName, $this->payerInfo->getLastName());
+               $this->assertEquals(self::$phone, $this->payerInfo->getPhone());
+               $this->assertEquals(self::$payerId, $this->payerInfo->getPayerId());
+               $this->assertEquals(AddressTest::$line1, $this->payerInfo->getShippingAddress()->getLine1());
+       }
+       
+       public function testSerializeDeserialize() {
+               $p1 = $this->payerInfo;
+               
+               $p2 = new PayerInfo();
+               $p2->fromJson($p1->toJson());
+               
+               $this->assertEquals($p1, $p2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php
new file mode 100644 (file)
index 0000000..7568a3c
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\FundingInstrument;
+
+use PayPal\Api\Payer;
+use PayPal\Test\Constants;
+
+class PayerTest extends \PHPUnit_Framework_TestCase {
+
+       private $payer;
+
+       private static $paymentMethod = "credit_card";
+
+       public static function createPayer() {
+               $payer = new Payer();
+               $payer->setPaymentMethod(self::$paymentMethod);
+               $payer->setPayerInfo(PayerInfoTest::createPayerInfo());
+               $payer->setFundingInstruments(array(FundingInstrumentTest::createFundingInstrument()));
+               
+               return $payer;
+       }
+       
+       public function setup() {
+               $this->payer = self::createPayer();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$paymentMethod, $this->payer->getPaymentMethod());
+               $this->assertEquals(PayerInfoTest::$email, $this->payer->getPayerInfo()->getEmail());
+               
+               $fi = $this->payer->getFundingInstruments();
+               $this->assertEquals(CreditCardTokenTest::$creditCardId, $fi[0]->getCreditCardToken()->getCreditCardId());
+       }
+       
+       public function testSerializeDeserialize() {
+               $p1 = $this->payer;
+               
+               $p2 = new Payer();
+               $p2->fromJson($p1->toJson());
+               
+               $this->assertEquals($p1, $p2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php
new file mode 100644 (file)
index 0000000..577d282
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\PaymentHistory;
+use PayPal\Test\Constants;
+
+class PaymentHistoryTest extends \PHPUnit_Framework_TestCase {
+       
+       private $history;
+       
+       public static $count = "10";
+       public static $nextId = "11";
+       
+       public static function createPaymentHistory() {
+               $history = new PaymentHistory();
+               $history->setCount(self::$count);
+               $history->setNextId(self::$nextId);
+               $history->setPayments(array(PaymentTest::createPayment()));
+               return $history;
+       }
+       public function setup() {               
+               $this->history = PaymentHistoryTest::createPaymentHistory();
+       }
+       
+       public function testGetterSetters() {
+               $this->assertEquals(self::$count, $this->history->getCount());
+               $this->assertEquals(self::$nextId, $this->history->getNextId());
+               
+       }
+       
+       public function testSerializeDeserialize() {
+               $history = new PaymentHistory();
+               $history->fromJson($this->history->toJSON());
+       
+               $this->assertEquals($history, $this->history);
+       }
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php
new file mode 100644 (file)
index 0000000..2bf9795
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+namespace PayPal\Test\Api;
+use PayPal\Api\RedirectUrls;
+use PayPal\Api\Address;
+use PayPal\Api\Amount;
+use PayPal\Api\CreditCard;
+use PayPal\Api\Payer;
+use PayPal\Api\Payment;
+use PayPal\Api\FundingInstrument;
+use PayPal\Api\Transaction;
+use PayPal\Test\Constants;
+
+class PaymentTest extends \PHPUnit_Framework_TestCase {
+
+       private $payments;      
+
+       public static function createPayment() {
+               
+               $redirectUrls = new RedirectUrls();
+               $redirectUrls->setReturnUrl("http://localhost/return");
+               $redirectUrls->setCancelUrl("http://localhost/cancel");
+               
+               $payment = new Payment();
+               $payment->setIntent("sale");
+               $payment->setRedirectUrls($redirectUrls);
+               $payment->setPayer(PayerTest::createPayer());
+               $payment->setTransactions(array(TransactionTest::createTransaction()));
+               
+               return $payment;                                
+       }
+       
+       public static function createNewPayment() {
+               $payer = new Payer();
+               $payer->setPaymentMethod("credit_card");
+               $payer->setFundingInstruments(array(FundingInstrumentTest::createFundingInstrument()));
+               
+               $transaction = new Transaction();
+               $transaction->setAmount(AmountTest::createAmount());
+               $transaction->setDescription("This is the payment description.");
+               
+               $redirectUrls = new RedirectUrls();
+               $redirectUrls->setReturnUrl("http://localhost/return");
+               $redirectUrls->setCancelUrl("http://localhost/cancel");
+               
+               $payment = new Payment();
+               $payment->setIntent("sale");
+               $payment->setRedirectUrls($redirectUrls);
+               $payment->setPayer($payer);
+               $payment->setTransactions(array($transaction));
+       
+               return $payment;        
+       }
+       
+       public function setup() {               
+               $this->payments['full'] = self::createPayment();
+               $this->payments['new'] = self::createNewPayment();
+       }
+       
+       public function testSerializeDeserialize() {
+               $p2 = new Payment();
+               $p2->fromJson($this->payments['full']->toJSON());               
+               $this->assertEquals($p2, $this->payments['full']);
+       }
+       
+       public function testOperations() {
+
+               $p1 = $this->payments['new'];
+                
+               $p1->create();          
+               $this->assertNotNull($p1->getId());
+               
+               $p2 = Payment::get($p1->getId());
+               $this->assertNotNull($p2);
+               
+               $paymentHistory = Payment::all(array('count' => '10'));
+               $this->assertNotNull($paymentHistory);
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php
new file mode 100644 (file)
index 0000000..657e167
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Refund;
+use PayPal\Test\Constants;
+
+class RefundTest extends \PHPUnit_Framework_TestCase {
+
+       private $refund;
+
+       public static $captureId = "CAP-123";
+       public static $createTime = "2013-02-28T00:00:00Z";
+       public static $id = "R-5678";
+       public static $parentPayment = "PAY-123";
+
+       public static function createRefund() {
+               $refund = new Refund();
+        $refund->setCreateTime(self::$createTime);
+               $refund->setAmount(AmountTest::createAmount());
+               $refund->setCaptureId(self::$captureId);
+               $refund->setId(self::$id);
+               $refund->setLinks(array(LinksTest::createLinks()));
+               $refund->setParentPayment(self::$parentPayment);                
+               
+               return $refund;
+       }
+       
+       public function setup() {
+               $this->refund = self::createRefund();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$captureId, $this->refund->getCaptureId());
+               $this->assertEquals(self::$createTime, $this->refund->getCreateTime());
+               $this->assertEquals(self::$id, $this->refund->getId());
+               $this->assertEquals(self::$parentPayment, $this->refund->getParentPayment());           
+               $this->assertEquals(AmountTest::$currency, $this->refund->getAmount()->getCurrency());
+               $links = $this->refund->getLinks();
+               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
+       }
+       
+       public function testSerializeDeserialize() {
+               $r1 = $this->refund;
+               
+               $r2 = new Refund();
+               $r2->fromJson($r1->toJson());
+               
+               $this->assertEquals($r1, $r2);
+       }
+       
+       public function testOperations() {
+       
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php
new file mode 100644 (file)
index 0000000..c977395
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\RelatedResources;
+use PayPal\Test\Constants;
+
+class RelatedResourcesTest extends \PHPUnit_Framework_TestCase {
+
+       private $RelatedResources;
+
+       public static function createRelatedResources() {
+               $relatedResources = new RelatedResources();
+               $relatedResources->setAuthorization(AuthorizationTest::createAuthorization());
+               $relatedResources->setCapture(CaptureTest::createCapture());
+               return $relatedResources;
+       }
+       
+       public function setup() {
+               $this->relatedResources = self::createRelatedResources();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(AuthorizationTest::$create_time, $this->relatedResources->getAuthorization()->getCreateTime());
+               $this->assertEquals(CaptureTest::$create_time, $this->relatedResources->getCapture()->getCreateTime());
+       }
+       
+       public function testSerializeDeserialize() {
+               $s1 = $this->relatedResources;
+               
+               $s2 = new RelatedResources();
+               $s2->fromJson($s1->toJson());
+               
+               $this->assertEquals($s1, $s2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php
new file mode 100644 (file)
index 0000000..b4c6972
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\Refund;
+use PayPal\Api\Sale;
+use PayPal\Test\Constants;
+use PayPal\Test\Api\AmountTest;
+use PayPal\Test\Api\PaymentTest;
+use PayPal\Test\Api\LinksTest;
+
+class SaleTest extends \PHPUnit_Framework_TestCase {
+
+       private $sale;
+
+       public static $captureId = "CAP-123";
+       public static $createTime = "2013-02-28T00:00:00Z";
+       public static $id = "R-5678";
+       public static $parentPayment = "PAY-123";
+       public static $state = "Created";
+
+       public static function createSale() {
+               $sale = new Sale();
+               $sale->setAmount(AmountTest::createAmount());
+               $sale->setCreateTime(self::$createTime);
+               $sale->setId(self::$id);
+               $sale->setLinks(array(LinksTest::createLinks()));
+               $sale->setParentPayment(self::$parentPayment);          
+               $sale->setState(self::$state);
+               return $sale;
+       }
+       
+       public function setup() {
+               $this->sale = self::createSale();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$createTime, $this->sale->getCreateTime());
+               $this->assertEquals(self::$id, $this->sale->getId());
+               $this->assertEquals(self::$parentPayment, $this->sale->getParentPayment());
+               $this->assertEquals(self::$state, $this->sale->getState());
+               $this->assertEquals(AmountTest::$currency, $this->sale->getAmount()->getCurrency());
+               $links = $this->sale->getLinks();
+               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
+       }
+       
+       public function testSerializeDeserialize() {
+               $s1 = $this->sale;
+               
+               $s2 = new Sale();
+               $s2->fromJson($s1->toJson());
+               
+               $this->assertEquals($s1, $s2);
+       }
+       
+       public function testOperations() {
+               $payment = PaymentTest::createNewPayment();                     
+               $payment->create();
+               
+               $transactions = $payment->getTransactions();
+               $resources = $transactions[0]->getRelatedResources();           
+               $saleId = $resources[0]->getSale()->getId();
+               
+               $sale = Sale::get($saleId);
+               $this->assertNotNull($sale);            
+               
+               $refund = new Refund();
+               $refund->setAmount(AmountTest::createAmount());
+               $sale->refund($refund);
+               
+               $this->setExpectedException('\InvalidArgumentException');
+               $sale->refund(NULL);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php
new file mode 100644 (file)
index 0000000..6ca8b93
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+namespace PayPal\Test\Api;
+
+use PayPal\Api\ShippingAddress;
+use PayPal\Test\Constants;
+
+class ShippingAddressTest extends \PHPUnit_Framework_TestCase {
+
+       private $address;
+
+       public static $line1 = "3909 Witmer Road";
+       public static $line2 = "Niagara Falls"; 
+       public static $city = "Niagara Falls";
+       public static $state = "NY";
+       public static $postalCode = "14305";
+       public static $countryCode = "US";
+       public static $phone = "716-298-1822";
+       public static $recipientName = "TestUser";
+
+       public static function createAddress() {
+               $addr = new ShippingAddress();
+               $addr->setLine1(self::$line1);
+               $addr->setLine2(self::$line2);
+               $addr->setCity(self::$city);
+               $addr->setState(self::$state);
+               $addr->setPostalCode(self::$postalCode);
+               $addr->setCountryCode(self::$countryCode);
+               $addr->setPhone(self::$phone);
+               $addr->setRecipientName(self::$recipientName);
+               return $addr;
+       }
+       
+       public function setup() {
+               $this->address = self::createAddress();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(self::$line1, $this->address->getLine1());
+               $this->assertEquals(self::$line2, $this->address->getLine2());
+               $this->assertEquals(self::$city, $this->address->getCity());
+               $this->assertEquals(self::$state, $this->address->getState());
+               $this->assertEquals(self::$postalCode, $this->address->getPostalCode());
+               $this->assertEquals(self::$countryCode, $this->address->getCountryCode());
+               $this->assertEquals(self::$phone, $this->address->getPhone());
+               $this->assertEquals(self::$recipientName, $this->address->getRecipientName());
+       }
+       
+       public function testSerializeDeserialize() {
+               $a1 = $this->address;
+               
+               $a2 = new ShippingAddress();
+               $a2->fromJson($a1->toJson());
+               
+               $this->assertEquals($a1, $a2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php
new file mode 100644 (file)
index 0000000..f2e0ba3
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+
+namespace PayPal\Test\Api;
+
+use PayPal\Api\SubTransaction;
+
+use PayPal\Api\Transaction;
+use PayPal\Test\Constants;
+
+class TransactionTest extends \PHPUnit_Framework_TestCase {
+
+       private $transaction;
+
+       public static $description = "desc . . . ";
+       public static $total = "1.12";  
+
+       public static function createTransaction() {
+               $transaction = new Transaction();
+               $transaction->setAmount(AmountTest::createAmount());
+               $transaction->setDescription(self::$description);
+               $transaction->setItemList(ItemListTest::createItemList());
+               $transaction->setPayee(PayeeTest::createPayee());
+               $transaction->setRelatedResources( array(RelatedResourcesTest::createRelatedResources()) );
+               return $transaction;
+       }
+       
+       public function setup() {
+               $this->transaction = self::createTransaction();
+       }
+
+       public function testGetterSetter() {
+               $this->assertEquals(AmountTest::$currency, $this->transaction->getAmount()->getCurrency());
+               $this->assertEquals(self::$description, $this->transaction->getDescription());
+               $items = $this->transaction->getItemList()->getItems();
+               $this->assertEquals(ItemTest::$quantity, $items[0]->getQuantity());
+               $this->assertEquals(PayeeTest::$email, $this->transaction->getPayee()->getEmail());
+               $resources = $this->transaction->getRelatedResources();
+               $this->assertEquals(AuthorizationTest::$create_time, $resources[0]->getAuthorization()->getCreateTime());
+       }
+       
+       public function testSerializeDeserialize() {
+               $t1 = $this->transaction;
+               
+               $t2 = new Transaction();
+               $t2->fromJson($t1->toJson());
+               
+               $this->assertEquals($t1, $t2);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
new file mode 100644 (file)
index 0000000..5dfe13e
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+\r
+// namespace PayPal\Test\Common;\r
+\r
+use PayPal\Auth\OAuthTokenCredential;\r
+use PayPal\Test\Constants;\r
+use PayPal\Core\PPConfigManager;\r
+use PayPal\Exception\PPConnectionException;\r
+class OAuthTokenCredentialTest extends PHPUnit_Framework_TestCase {\r
+       \r
+       public function testGetAccessToken() {\r
+               $cred = new OAuthTokenCredential(Constants::CLIENT_ID, Constants::CLIENT_SECRET);\r
+               $config = PPConfigManager::getInstance()->getConfigHashmap();\r
+               \r
+               $token = $cred->getAccessToken($config);                \r
+               $this->assertNotNull($token);\r
+               \r
+               // Check that we get the same token when issuing a new call before token expiry\r
+               $newToken = $cred->getAccessToken($config);\r
+               $this->assertNotNull($newToken);\r
+               $this->assertEquals($token, $newToken);\r
+               \r
+//             sleep(60*8);\r
+//             $newToken = $cred->getAccessToken();\r
+//             $this->assertNotNull($newToken);\r
+//             $this->assertNotEqual($token, $newToken);\r
+               \r
+       }\r
+       \r
+       public function testInvalidCredentials() {\r
+               $this->setExpectedException('PayPal\Exception\PPConnectionException');\r
+               $cred = new OAuthTokenCredential('dummy', 'secret');            \r
+               $this->assertNull($cred->getAccessToken(PPConfigManager::getInstance()->getConfigHashmap()));\r
+       }\r
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php
new file mode 100644 (file)
index 0000000..3470847
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+namespace PayPal\Test\Common;
+use PayPal\Common\PPModel;
+class ArrayClass extends PPModel {
+
+       public function setName($name) {
+               $this->name = $name;
+       }
+       public function getName() {
+               return $this->name;
+       }
+
+       public function setDescription($desc) {
+               $this->desc = $desc;
+       }
+       public function getDescription() {
+               return $this->desc;
+       }
+       
+       public function setTags($tags) {
+               if(!is_array($tags)) {
+                       $tags = array($tags);
+               }
+               $this->tags = $tags;
+       }
+       public function getTags() {
+               return $this->tags;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php
new file mode 100644 (file)
index 0000000..824b684
--- /dev/null
@@ -0,0 +1,21 @@
+<?php\r
+namespace PayPal\Test\Common;\r
+use PayPal\Common\PPArrayUtil;\r
+\r
+class ArrayUtilTest extends \PHPUnit_Framework_TestCase {\r
+       \r
+       public function testIsAssocArray() {\r
+               \r
+               $arr = array(1, 2, 3);\r
+               $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));    \r
+               \r
+               $arr = array(\r
+                       'name' => 'John Doe',\r
+                       'City' => 'San Jose'\r
+               );\r
+               $this->assertEquals(true, PPArrayUtil::isAssocArray($arr));\r
+               \r
+               $arr[] = 'CA';\r
+               $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));\r
+       }\r
+}\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php
new file mode 100644 (file)
index 0000000..a9a294b
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+namespace PayPal\Test\Common;
+use PayPal\Common\PPModel;
+class ChildClass extends SimpleClass {
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php
new file mode 100644 (file)
index 0000000..2c5d477
--- /dev/null
@@ -0,0 +1,66 @@
+<?php \r
+namespace PayPal\Test\Common;\r
+use PayPal\Common\PPModel;\r
+use PayPal\Test\Common\ArrayClass;\r
+use PayPal\Test\Common\SimpleClass;\r
+use PayPal\Test\Common\NestedClass;\r
+class ModelTest extends \PHPUnit_Framework_TestCase {\r
+       \r
+       public function testSimpleClassConversion() {\r
+               $o = new SimpleClass();\r
+               $o->setName("test");\r
+               $o->setDescription("description");\r
+\r
+               $this->assertEquals("test", $o->getName());\r
+               $this->assertEquals("description", $o->getDescription());\r
+               \r
+               $json = $o->toJSON();           \r
+               $this->assertEquals('{"name":"test","desc":"description"}', $json);\r
+               \r
+               $newO = new SimpleClass();\r
+               $newO->fromJson($json);\r
+               $this->assertEquals($o, $newO);\r
+               \r
+       }\r
+       \r
+       \r
+       public function testArrayClassConversion() {\r
+               $o = new ArrayClass();\r
+               $o->setName("test");\r
+               $o->setDescription("description");\r
+               $o->setTags(array('payment', 'info', 'test'));\r
+               \r
+               $this->assertEquals("test", $o->getName());\r
+               $this->assertEquals("description", $o->getDescription());\r
+               $this->assertEquals(array('payment', 'info', 'test'), $o->getTags());\r
+               \r
+               $json = $o->toJSON();\r
+               $this->assertEquals('{"name":"test","desc":"description","tags":["payment","info","test"]}', $json);\r
+       \r
+               $newO = new ArrayClass();\r
+               $newO->fromJson($json);\r
+               $this->assertEquals($o, $newO); \r
+       }\r
+       \r
+       public function testNestedClassConversion() {\r
+               $n = new ArrayClass();\r
+               $n->setName("test");\r
+               $n->setDescription("description");\r
+//             $n->setTags(array('payment', 'info', 'test'));\r
+               $o = new NestedClass();\r
+               $o->setId('123');\r
+               $o->setInfo($n);\r
+               \r
+               $this->assertEquals("123", $o->getId());\r
+               $this->assertEquals("test", $o->getInfo()->getName());          \r
+//             $this->assertEquals(array('payment', 'info', 'test'), $o->getInfo()->getTags());\r
+               \r
+               $json = $o->toJSON();\r
+//             $this->assertEquals('{"id":"123","info":{"name":"test","desc":"description","tags":["payment","info","test"]}}', $json);\r
+               $this->assertEquals('{"id":"123","info":{"name":"test","desc":"description"}}', $json);\r
+               \r
+               $newO = new NestedClass();\r
+               $newO->fromJson($json);\r
+               $this->assertEquals($o, $newO);\r
+       }\r
+}\r
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php
new file mode 100644 (file)
index 0000000..06e5e00
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+namespace PayPal\Test\Common;
+use PayPal\Common\PPModel;
+class NestedClass extends PPModel {
+       
+       public function setId($id) {
+               $this->id = $id;
+       }
+       public function getId() {
+               return $this->id;
+       }
+       
+       /**
+        * 
+        * @param PayPal\Test\Common\ArrayClass $info
+        */
+       public function setInfo($info) {
+               $this->info = $info;
+       }
+       /**
+        * 
+        * @return PayPal\Test\Common\ArrayClass
+        */
+       public function getInfo() {
+               return $this->info;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php
new file mode 100644 (file)
index 0000000..86732b1
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+namespace PayPal\Test\Common;
+use PayPal\Common\PPModel;
+class SimpleClass extends PPModel {
+
+       public function setName($name) {
+               $this->name = $name;
+       }
+       public function getName() {
+               return $this->name;
+       }
+       
+       public function setDescription($desc) {
+               $this->desc = $desc;
+       }
+       public function getDescription() {
+               return $this->desc;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php
new file mode 100644 (file)
index 0000000..d945374
--- /dev/null
@@ -0,0 +1,26 @@
+<?php\r
+\r
+use PayPal\Common\PPUserAgent;\r
+\r
+class UserAgentTest extends PHPUnit_Framework_TestCase {\r
+       \r
+       public function testGetValue() {\r
+               $ua = PPUserAgent::getValue("name", "version");\r
+               list($id, $version, $features) = sscanf($ua, "PayPalSDK/%s %s (%s)");\r
+               \r
+               // Check that we pass the useragent in the expected format\r
+               $this->assertNotNull($id);\r
+               $this->assertNotNull($version);\r
+               $this->assertNotNull($features);\r
+               \r
+               $this->assertEquals("name", $id);\r
+               $this->assertEquals("version", $version);\r
+               \r
+               // Check that we pass in these mininal features\r
+               $this->assertThat($features, $this->stringContains("OS="));\r
+               $this->assertThat($features, $this->stringContains("Bit="));\r
+               $this->assertThat($features, $this->stringContains("Lang="));\r
+               $this->assertThat($features, $this->stringContains("V="));\r
+               $this->assertGreaterThan(5, count(explode(';', $features)));\r
+       }\r
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php
new file mode 100644 (file)
index 0000000..7c424e3
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+namespace PayPal\Test;
+
+class Constants {
+       const CLIENT_ID = 'EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM';
+       const CLIENT_SECRET = 'EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM';
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php
new file mode 100644 (file)
index 0000000..3da124e
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+
+// namespace PayPal\Test\Rest;
+
+use PayPal\Auth\OAuthTokenCredential;
+
+use PayPal\Rest\Call;
+use PayPal\Test\Constants;
+
+class CallTest  {
+
+       public function testExecuteWithExplicitCredentials() {
+               $cred = new OAuthTokenCredential(Constants::CLIENT_ID, Constants::CLIENT_SECRET);
+               $data = '"request":"test message"';
+
+               $call = new Call();
+               $ret = $call->execute('/v1/payments/echo', "POST", $data, $cred);
+               $this->assertEquals($data, $ret);
+       }
+
+       public function testExecuteWithInvalidCredentials() {
+
+               $cred = new OAuthTokenCredential('test', 'dummy');
+               $data = '"request":"test message"';
+
+               $call = new Call();
+               $this->setExpectedException('\PPConnectionException');
+               $ret = $call->execute('/v1/payments/echo', "POST", $data, $cred);
+
+       }
+
+
+       public function testExecuteWithDefaultCredentials() {
+
+               $data = '"request":"test message"';
+
+               $call = new Call();
+               $ret = $call->execute('/v1/payments/echo', "POST", $data);
+               $this->assertEquals($data, $ret);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php
new file mode 100644 (file)
index 0000000..d249596
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+// Include the composer autoloader
+$loader = require dirname(__DIR__) . '/vendor/autoload.php';
+$loader->add('PayPal\\Test', __DIR__);
+define("PP_CONFIG_PATH", __DIR__);
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini
new file mode 100644 (file)
index 0000000..f73b92a
--- /dev/null
@@ -0,0 +1,35 @@
+;Account credentials from developer portal
+[Account]
+acct1.ClientId = EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM
+acct1.ClientSecret = EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM
+
+
+;Connection Information
+[Http]
+http.ConnectionTimeOut = 30
+http.Retry = 1
+;http.Proxy=http://[username:password]@hostname[:port][/path]
+
+
+;Service Configuration
+[Service]
+service.EndPoint="https://api.sandbox.paypal.com"
+; Uncomment this line for integrating with the live endpoint 
+; service.EndPoint="https://api.paypal.com"
+
+
+;Logging Information
+[Log]
+
+log.LogEnabled=true
+
+# When using a relative path, the log file is created
+# relative to the .php file that is the entry point
+# for this request. You can also provide an absolute
+# path here
+log.FileName=PayPal.log
+
+# Logging level can be one of FINE, INFO, WARN or ERROR
+# Logging is most verbose in the 'FINE' level and
+# decreases as you proceed towards ERROR
+log.LogLevel=FINE
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore
new file mode 100644 (file)
index 0000000..0db5431
--- /dev/null
@@ -0,0 +1,14 @@
+tests/reports
+build
+.DS_Store
+*.log
+
+# IDE
+.project
+.settings
+.buildpath
+*.bak
+
+# Composer
+vendor
+composer.lock
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md
new file mode 100644 (file)
index 0000000..bfa023a
--- /dev/null
@@ -0,0 +1,18 @@
+
+CHANGELOG
+========= 
+V2.4.0 (May 20, 2013)
+---------------------------------------------------------------------------------------
+   * Bugfix - removing deprecated methods like setAccessToken, getAccessToken from baseService 
+   * Bugfix - adding correct thirdparty auth header
+   
+V2.4.0 (May 20, 2013)
+---------------------------------------------------------------------------------------
+   * Updating SDK to use NameSpaces
+   
+
+V1.4.0 (April 26, 2013)
+---------------------------------------------------------------------------------------
+   * Adding support for Openid Connect
+   
+
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt
new file mode 100644 (file)
index 0000000..ad030e5
--- /dev/null
@@ -0,0 +1,41 @@
+PAYPAL, INC.
+
+SDK LICENSE
+
+NOTICE TO USER:  PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement.  Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
+
+As used in this Agreement, "PayPal" means PayPal, Inc.  "Software" means the software code accompanying this agreement.   "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.   
+
+1.  LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
+
+Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose.  You may not modify the Documentation.
+
+No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement.  You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
+
+If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution.  You may distribute the Software in object code form under your own license, provided that your license agreement:
+
+(a)    complies with the terms and conditions of this license agreement; 
+
+(b)    effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
+
+(c)    effectively excludes all liability for damages on behalf of PayPal;
+
+(d)    states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
+
+(e)    states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.  
+
+2.  DISCLAIMER OF WARRANTY
+PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE.  Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations.  Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance.  Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you.  To the extent permissible, any implied warranties are limited to ninety (90) days.
+
+
+3.  LIMITATION OF LIABILITY
+PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION.  IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION. 
+
+4.  TRADEMARK USAGE
+PayPal is a trademark PayPal, Inc. in the United States and other countries.  Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.  
+
+5.  TERM
+Your rights under this Agreement shall terminate if you fail to comply with any of the material  terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance.  If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable. 
+
+6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof.  If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.  Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA. 
+
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md
new file mode 100644 (file)
index 0000000..035c047
--- /dev/null
@@ -0,0 +1,42 @@
+### PayPal Core SDK - V2.4.0
+
+#### Prerequisites
+
+ * PHP 5.3 and above
+ * curl extension with support for OpenSSL
+ * PHPUnit 3.5 for running test suite (Optional)
+ * Composer
+
+#### Configuration
+  
+#### OpenID Connect Integration
+
+   1. Redirect your buyer to `PPOpenIdSession::getAuthorizationUrl($redirectUri, array('openid', 'address'));` to obtain authorization. The second argument is the list of access privileges that you want from the buyer.
+   2. Capture the authorization code that is available as a query parameter (`code`) in the redirect url
+   3. Exchange the authorization code for a access token, refresh token, id token combo
+
+
+```php
+    $token = PPOpenIdTokeninfo::createFromAuthorizationCode(
+               array(
+                       'code' => $authCode
+               )
+       );
+```
+   4. The access token is valid for a predefined duration and can be used for seamless XO or for retrieving user information
+
+
+```php
+   $user = PPOpenIdUserinfo::getUserinfo(
+               array(
+                       'access_token' => $token->getAccessToken()
+               )       
+       );
+```
+   5. If the access token has expired, you can obtain a new access token using the refresh token from the 3'rd step.
+
+```php
+   $token->createFromRefreshToken(array('openid', 'address'));
+```
+   6. Redirect your buyer to `PPOpenIdSession::getLogoutUrl($redirectUri, $idToken);` to log him out of paypal. 
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml
new file mode 100644 (file)
index 0000000..0496420
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project>
+<project name="PayPal_Core_SDK" default="build">
+
+       <property name="tests.dir" value="tests"/>
+       <property name="tests.out.dir" value="tests\reports"/>
+       
+       <condition property="PHPUNIT_BIN" value="phpunit.bat" else="phpunit">
+               <os family="windows" />
+       </condition>
+
+       <target name="clean">
+               <delete dir="${tests.out.dir}" />
+       </target>
+
+       <target name="test">
+               <mkdir dir="${tests.out.dir}" />
+               <exec dir="${basedir}" executable="${PHPUNIT_BIN}" failonerror="true">
+                       <arg line="--testdox --bootstrap ${tests.dir}\PPBootStrap.php --log-junit ${tests.out.dir}\phpunit.xml ${tests.dir}" />
+               </exec>
+       </target>
+
+       <target name="build" depends="clean, test" />
+</project>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json
new file mode 100644 (file)
index 0000000..961fb47
--- /dev/null
@@ -0,0 +1,23 @@
+{
+    "name": "paypal/sdk-core-php",
+    "description": "PayPal Core SDK for PHP",
+    "keywords": ["paypal", "php", "sdk"],
+    "type": "library",
+    "homepage": "https://github.com/paypal/sdk-core-php",
+    "license": "Apache2",
+    "authors": [
+        {
+            "name": "PayPal",
+            "homepage": "https://github.com/paypal/sdk-core-php/contributors"
+        }
+    ],
+    "require": {
+        "php": ">=5.3.0",
+        "ext-curl": "*"
+    },
+    "autoload": {
+        "psr-0": {
+            "PayPal": "lib/"
+        }
+    } 
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php
new file mode 100644 (file)
index 0000000..da994c4
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+namespace PayPal\Auth;
+/**
+ * Interface that represents API credentials
+ */
+abstract class IPPCredential
+{
+       /**
+        * 
+        * @var IPPThirdPartyAuthorization
+        */
+       protected $thirdPartyAuthorization;
+       
+       public function setThirdPartyAuthorization($thirdPartyAuthorization) {
+               $this->thirdPartyAuthorization = $thirdPartyAuthorization;
+       }
+       
+       public function getThirdPartyAuthorization() {
+               return $this->thirdPartyAuthorization;
+       }
+       
+       public abstract function validate();
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php
new file mode 100644 (file)
index 0000000..f019dfa
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+namespace PayPal\Auth;
+/**
+ * 
+ * Marker interface for implementations of third party authorization.
+ * Third-party authorization allows you to make an API call on some 
+ * other account\92s behalf 
+ */
+interface IPPThirdPartyAuthorization {
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php
new file mode 100644 (file)
index 0000000..22bf706
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+namespace PayPal\Auth\Oauth;
+//PayPal specific modification
+//Method to be called for generating signature
+
+class AuthSignature {
+
+       public function genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
+
+               $authServer = new OAuthServer(new MockOAuthDataStore());
+               $hmac_method = new OAuthSignatureMethodHmacSha1();
+               $authServer->add_signature_method($hmac_method);
+
+               $sig_method = $hmac_method;
+               $authConsumer = new OAuthConsumer($key, $secret, NULL);
+               $authToken = NULL;
+               $authToken = new OAuthToken($token, $tokenSecret);
+
+               //$params is the query param array which is required only in the httpMethod is "GET"
+               $params = array();
+               //TODO: set the Query parameters to $params if httpMethod is "GET"
+
+               $acc_req = OAuthRequest::from_consumer_and_token($authConsumer, $authToken, $httpMethod, $endpoint, $params);
+               $acc_req->sign_request($sig_method,$authConsumer, $authToken);
+               return  OAuthutil::parseQueryString($acc_req);
+       }
+       
+       public static function generateFullAuthString($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
+               $authSignature = new AuthSignature();
+               $response = $authSignature->genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint);
+               return "token=" . $token . 
+                          ",signature=" . $response['oauth_signature'] .
+                      ",timestamp=" . $response['oauth_timestamp'];            
+       }
+       
+}
+?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php
new file mode 100644 (file)
index 0000000..c9f0833
--- /dev/null
@@ -0,0 +1,54 @@
+<?php //vim: foldmethod=marker
+namespace PayPal\Auth\Oauth;
+class MockOAuthDataStore extends OAuthDataStore {/*{{{*/
+    private $consumer;
+    private $request_token;
+    private $access_token;
+    private $nonce;
+
+    function __construct() {/*{{{*/
+        $this->consumer = new OAuthConsumer("key", "secret", NULL);
+        $this->request_token = new OAuthToken("requestkey", "requestsecret", 1);
+        $this->access_token = new OAuthToken("accesskey", "accesssecret", 1);
+        $this->nonce = "nonce";
+    }/*}}}*/
+
+    function lookup_consumer($consumer_key) {/*{{{*/
+        if ($consumer_key == $this->consumer->key) return $this->consumer;
+        return NULL;
+    }/*}}}*/
+
+    function lookup_token($consumer, $token_type, $token) {/*{{{*/
+        $token_attrib = $token_type . "_token";
+        if ($consumer->key == $this->consumer->key
+            && $token == $this->$token_attrib->key) {
+            return $this->$token_attrib;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
+        if ($consumer->key == $this->consumer->key
+            && (($token && $token->key == $this->request_token->key)
+                || ($token && $token->key == $this->access_token->key))
+            && $nonce == $this->nonce) {
+            return $this->nonce;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function new_request_token($consumer, $callback = NULL) {/*{{{*/
+        if ($consumer->key == $this->consumer->key) {
+            return $this->request_token;
+        }
+        return NULL;
+    }/*}}}*/
+
+    function new_access_token($token, $consumer, $verifier = NULL) {/*{{{*/
+        if ($consumer->key == $this->consumer->key
+            && $token->key == $this->request_token->key) {
+            return $this->access_token;
+        }
+        return NULL;
+    }/*}}}*/
+}/*}}}*/
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php
new file mode 100644 (file)
index 0000000..95bb48e
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthConsumer {
+       public $key;
+       public $secret;
+
+       function __construct($key, $secret, $callback_url=NULL) {
+               $this->key = $key;
+               $this->secret = $secret;
+               $this->callback_url = $callback_url;
+       }
+
+       function __toString() {
+               return "OAuthConsumer[key=$this->key,secret=$this->secret]";
+       }
+}
+?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php
new file mode 100644 (file)
index 0000000..2133acc
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthDataStore {
+       function lookup_consumer($consumer_key) {
+               // implement me
+       }
+
+       function lookup_token($consumer, $token_type, $token) {
+               // implement me
+       }
+
+       function lookup_nonce($consumer, $token, $nonce, $timestamp) {
+               // implement me
+       }
+
+       function new_request_token($consumer, $callback = null) {
+               // return a new token attached to this consumer
+       }
+
+       function new_access_token($token, $consumer, $verifier = null) {
+               // return a new access token attached to this consumer
+               // for the user associated with this token if the request token
+               // is authorized
+               // should also invalidate the request token
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php
new file mode 100644 (file)
index 0000000..fe86dd8
--- /dev/null
@@ -0,0 +1,297 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthRequest {
+       public $parameters;
+       protected $http_method;
+       protected $http_url;
+       // for debug purposes
+       public $base_string;
+       public static $version = '1.0';
+       public static $POST_INPUT = 'php://input';
+
+       function __construct($http_method, $http_url, $parameters=NULL) {
+               $parameters = ($parameters) ? $parameters : array();
+               $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
+               $this->parameters = $parameters;
+               $this->http_method = $http_method;
+               $this->http_url = $http_url;
+       }
+
+
+       /**
+        * attempt to build up a request from what was passed to the server
+        */
+       public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
+               $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
+               ? 'http'
+               : 'https';
+               $http_url = ($http_url) ? $http_url : $scheme .
+                              '://' . $_SERVER['HTTP_HOST'] .
+                              ':' .
+               $_SERVER['SERVER_PORT'] .
+               $_SERVER['REQUEST_URI'];
+               $http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
+
+               // We weren't handed any parameters, so let's find the ones relevant to
+               // this request.
+               // If you run XML-RPC or similar you should use this to provide your own
+               // parsed parameter-list
+               if (!$parameters) {
+                       // Find request headers
+                       $request_headers = OAuthUtil::get_headers();
+
+                       // Parse the query-string to find GET parameters
+                       $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
+
+                       // It's a POST request of the proper content-type, so parse POST
+                       // parameters and add those overriding any duplicates from GET
+                       if ($http_method == "POST"
+                       &&  isset($request_headers['Content-Type'])
+                       && strstr($request_headers['Content-Type'],
+                     'application/x-www-form-urlencoded')
+                       ) {
+                               $post_data = OAuthUtil::parse_parameters(
+                               file_get_contents(self::$POST_INPUT)
+                               );
+                               $parameters = array_merge($parameters, $post_data);
+                       }
+
+                       // We have a Authorization-header with OAuth data. Parse the header
+                       // and add those overriding any duplicates from GET or POST
+                       if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') {
+                               $header_parameters = OAuthUtil::split_header(
+                               $request_headers['Authorization']
+                               );
+                               $parameters = array_merge($parameters, $header_parameters);
+                       }
+
+               }
+
+               return new OAuthRequest($http_method, $http_url, $parameters);
+       }
+
+       /**
+        * pretty much a helper function to set up the request
+        */
+       public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
+               $parameters = ($parameters) ?  $parameters : array();
+               $defaults = array("oauth_version" => OAuthRequest::$version,
+               // "oauth_nonce" => OAuthRequest::generate_nonce(),
+               "oauth_timestamp" => OAuthRequest::generate_timestamp(),
+
+                      "oauth_consumer_key" => $consumer->key);
+               if ($token)
+               $defaults['oauth_token'] = $token->key;
+
+               $parameters = array_merge($defaults, $parameters);
+               ksort($parameters);
+               return new OAuthRequest($http_method, $http_url, $parameters);
+       }
+
+       public function set_parameter($name, $value, $allow_duplicates = true) {
+               if ($allow_duplicates && isset($this->parameters[$name])) {
+                       // We have already added parameter(s) with this name, so add to the list
+                       if (is_scalar($this->parameters[$name])) {
+                               // This is the first duplicate, so transform scalar (string)
+                               // into an array so we can add the duplicates
+                               $this->parameters[$name] = array($this->parameters[$name]);
+                       }
+
+                       $this->parameters[$name][] = $value;
+               } else {
+                       $this->parameters[$name] = $value;
+               }
+       }
+
+       public function get_parameter($name) {
+               return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
+       }
+
+       public function get_parameters() {
+               return $this->parameters;
+       }
+
+       public function unset_parameter($name) {
+               unset($this->parameters[$name]);
+       }
+
+       /**
+        * The request parameters, sorted and concatenated into a normalized string.
+        * @return string
+        */
+       public function get_signable_parameters() {
+               // Grab all parameters
+               $params = $this->parameters;
+               ksort($params);
+               // Remove oauth_signature if present
+               // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
+               if (isset($params['oauth_signature'])) {
+                       unset($params['oauth_signature']);
+               }
+               foreach($params as $key => $value)
+               {
+                       $res[]=$key."=".$value;
+               }
+
+               return implode('&', $res);
+               //return OAuthUtil::build_http_query($params);
+       }
+
+       /**
+        * Returns the base string of this request
+        *
+        * The base string defined as the method, the url
+        * and the parameters (normalized), each urlencoded
+        * and the concated with &.
+        */
+       public function get_signature_base_string() {
+               $parts = array(
+               $this->get_normalized_http_method(),
+               $this->get_normalized_http_url(),
+               $this->get_signable_parameters()
+               );
+
+               $parts = OAuthUtil::urlencode_rfc3986($parts);
+
+               return implode('&', $parts);
+       }
+
+       /**
+        * just uppercases the http method
+        */
+       public function get_normalized_http_method() {
+               return strtoupper($this->http_method);
+       }
+
+       /**
+        * parses the url and rebuilds it to be
+        * scheme://host/path
+        */
+       public function get_normalized_http_url() {
+               $parts = parse_url($this->http_url);
+
+               $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
+               $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
+               $host = (isset($parts['host'])) ? $parts['host'] : '';
+               $path = (isset($parts['path'])) ? $parts['path'] : '';
+
+               if (($scheme == 'https' && $port != '443')
+               || ($scheme == 'http' && $port != '80')) {
+                       $host = "$host:$port";
+               }
+               return "$scheme://$host$path";
+       }
+
+       /**
+        * builds a url usable for a GET request
+        */
+       public function to_url() {
+               $post_data = $this->to_postdata();
+               $out = $this->get_normalized_http_url();
+               if ($post_data) {
+                       $out .= '?'.$post_data;
+               }
+               return $out;
+       }
+
+       /**
+        * builds the data one would send in a POST request
+        */
+       public function to_postdata() {
+               return OAuthUtil::build_http_query($this->parameters);
+       }
+
+       /**
+        * builds the Authorization: header
+        */
+       public function to_header($realm=null) {
+               $first = true;
+               if($realm) {
+                       $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
+                       $first = false;
+               } else
+               $out = 'Authorization: OAuth';
+
+               $total = array();
+               foreach ($this->parameters as $k => $v) {
+                       if (substr($k, 0, 5) != "oauth") continue;
+                       if (is_array($v)) {
+                               throw new OAuthException('Arrays not supported in headers');
+                       }
+                       $out .= ($first) ? ' ' : ',';
+                       $out .= OAuthUtil::urlencode_rfc3986($k) .
+              '="' .
+                       OAuthUtil::urlencode_rfc3986($v) .
+              '"';
+                       $first = false;
+               }
+               return $out;
+       }
+
+       public function __toString() {
+               return $this->to_url();
+       }
+
+
+       public function sign_request($signature_method,$consumer, $token) {
+                       
+               $empty=false;
+               $msg=array();
+               if( $token->key==null){
+                       $msg[] = 'Token key';
+               }
+               if($token->secret==null){
+                       $msg[] = 'Token secret';
+               }
+               if($consumer->key == null){
+
+                       $msg[] = 'Consumer key';
+               }
+               if($consumer->secret == null){
+
+                       $msg[] = 'Consumer secret';
+               }
+               if($this->http_url == null){
+
+                       $msg[] ='Endpoint';
+               }
+               if($this->http_method == null){
+
+                       $msg[] ='HTTP method';
+               }
+               if(count($msg))
+               {
+                       throw new OAuthException('Enter valid '. implode(',',$msg));
+               }
+               $this->set_parameter(
+      "oauth_signature_method",
+               $signature_method->get_name(),
+               false );
+
+               $signature = $this->build_signature($signature_method, $consumer, $token);
+               $this->set_parameter("oauth_signature", $signature, false);
+
+       }
+
+       public function build_signature($signature_method, $consumer, $token) {
+               $signature = $signature_method->build_signature($this, $consumer, $token);
+               return $signature;
+       }
+
+       /**
+        * util function: current timestamp
+        */
+       private static function generate_timestamp() {
+               return time();
+       }
+
+       /**
+        * util function: current nonce
+        */
+       private static function generate_nonce() {
+               $mt = microtime();
+               $rand = mt_rand();
+
+               return md5($mt . $rand); // md5s look nicer than numbers
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php
new file mode 100644 (file)
index 0000000..48c3257
--- /dev/null
@@ -0,0 +1,223 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthServer {
+       protected $timestamp_threshold = 300; // in seconds, five minutes
+       protected $version = '1.0';             // hi blaine
+       protected $signature_methods = array();
+
+       protected $data_store;
+
+       function __construct($data_store) {
+               $this->data_store = $data_store;
+       }
+
+       public function add_signature_method($signature_method) {
+               $this->signature_methods[$signature_method->get_name()] =
+               $signature_method;
+       }
+
+       // high level functions
+
+       /**
+        * process a request_token request
+        * returns the request token on success
+        */
+       public function fetch_request_token(&$request) {
+               $this->get_version($request);
+
+               $consumer = $this->get_consumer($request);
+
+               // no token required for the initial token request
+               $token = NULL;
+
+               $this->check_signature($request, $consumer, $token);
+
+               // Rev A change
+               $callback = $request->get_parameter('oauth_callback');
+               $new_token = $this->data_store->new_request_token($consumer, $callback);
+
+               return $new_token;
+       }
+
+       /**
+        * process an access_token request
+        * returns the access token on success
+        */
+       public function fetch_access_token(&$request) {
+               $this->get_version($request);
+
+               $consumer = $this->get_consumer($request);
+
+               // requires authorized request token
+               $token = $this->get_token($request, $consumer, "request");
+
+               $this->check_signature($request, $consumer, $token);
+
+               // Rev A change
+               $verifier = $request->get_parameter('oauth_verifier');
+               $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
+
+               return $new_token;
+       }
+
+       /**
+        * verify an api call, checks all the parameters
+        */
+       public function verify_request(&$request) {
+               $this->get_version($request);
+               $consumer = $this->get_consumer($request);
+               $token = $this->get_token($request, $consumer, "access");
+               $this->check_signature($request, $consumer, $token);
+               return array($consumer, $token);
+       }
+
+       // Internals from here
+       /**
+        * version 1
+        */
+       private function get_version(&$request) {
+               $version = $request->get_parameter("oauth_version");
+               if (!$version) {
+                       // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
+                       // Chapter 7.0 ("Accessing Protected Ressources")
+                       $version = '1.0';
+               }
+               if ($version !== $this->version) {
+                       throw new OAuthException("OAuth version '$version' not supported");
+               }
+               return $version;
+       }
+
+       /**
+        * figure out the signature with some defaults
+        */
+       private function get_signature_method($request) {
+               $signature_method = $request instanceof OAuthRequest
+               ? $request->get_parameter("oauth_signature_method")
+               : NULL;
+
+               if (!$signature_method) {
+                       // According to chapter 7 ("Accessing Protected Ressources") the signature-method
+                       // parameter is required, and we can't just fallback to PLAINTEXT
+                       throw new OAuthException('No signature method parameter. This parameter is required');
+               }
+
+               if (!in_array($signature_method,
+               array_keys($this->signature_methods))) {
+                       throw new OAuthException(
+        "Signature method '$signature_method' not supported " .
+        "try one of the following: " .
+                       implode(", ", array_keys($this->signature_methods))
+                       );
+               }
+               return $this->signature_methods[$signature_method];
+       }
+
+       /**
+        * try to find the consumer for the provided request's consumer key
+        */
+       private function get_consumer($request) {
+               $consumer_key = $request instanceof OAuthRequest
+               ? $request->get_parameter("oauth_consumer_key")
+               : NULL;
+
+               if (!$consumer_key) {
+                       throw new OAuthException("Invalid consumer key");
+               }
+
+               $consumer = $this->data_store->lookup_consumer($consumer_key);
+               if (!$consumer) {
+                       throw new OAuthException("Invalid consumer");
+               }
+
+               return $consumer;
+       }
+
+       /**
+        * try to find the token for the provided request's token key
+        */
+       private function get_token($request, $consumer, $token_type="access") {
+               $token_field = $request instanceof OAuthRequest
+               ? $request->get_parameter('oauth_token')
+               : NULL;
+
+               $token = $this->data_store->lookup_token(
+               $consumer, $token_type, $token_field
+               );
+               if (!$token) {
+                       throw new OAuthException("Invalid $token_type token: $token_field");
+               }
+               return $token;
+       }
+
+       /**
+        * all-in-one function to check the signature on a request
+        * should guess the signature method appropriately
+        */
+       private function check_signature($request, $consumer, $token) {
+               // this should probably be in a different method
+               $timestamp = $request instanceof OAuthRequest
+               ? $request->get_parameter('oauth_timestamp')
+               : NULL;
+               $nonce = $request instanceof OAuthRequest
+               ? $request->get_parameter('oauth_nonce')
+               : NULL;
+
+               $this->check_timestamp($timestamp);
+               $this->check_nonce($consumer, $token, $nonce, $timestamp);
+
+               $signature_method = $this->get_signature_method($request);
+
+               $signature = $request->get_parameter('oauth_signature');
+               $valid_sig = $signature_method->check_signature(
+               $request,
+               $consumer,
+               $token,
+               $signature
+               );
+
+               if (!$valid_sig) {
+                       throw new OAuthException("Invalid signature");
+               }
+       }
+
+       /**
+        * check that the timestamp is new enough
+        */
+       private function check_timestamp($timestamp) {
+               if( ! $timestamp )
+               throw new OAuthException(
+        'Missing timestamp parameter. The parameter is required'
+        );
+
+        // verify that timestamp is recentish
+        $now = time();
+        if (abs($now - $timestamp) > $this->timestamp_threshold) {
+               throw new OAuthException(
+        "Expired timestamp, yours $timestamp, ours $now"
+               );
+        }
+       }
+
+       /**
+        * check that the nonce is not repeated
+        */
+       private function check_nonce($consumer, $token, $nonce, $timestamp) {
+               if( ! $nonce )
+               throw new OAuthException(
+        'Missing nonce parameter. The parameter is required'
+        );
+
+        // verify that the nonce is uniqueish
+        $found = $this->data_store->lookup_nonce(
+        $consumer,
+        $token,
+        $nonce,
+        $timestamp
+        );
+        if ($found) {
+               throw new OAuthException("Nonce already used: $nonce");
+        }
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php
new file mode 100644 (file)
index 0000000..2e557d9
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+namespace PayPal\Auth\Oauth;
+/**
+ * A class for implementing a Signature Method
+ * See section 9 ("Signing Requests") in the spec
+ */
+abstract class OAuthSignatureMethod {
+       /**
+        * Needs to return the name of the Signature Method (ie HMAC-SHA1)
+        * @return string
+        */
+       abstract public function get_name();
+
+       /**
+        * Build up the signature
+        * NOTE: The output of this function MUST NOT be urlencoded.
+        * the encoding is handled in OAuthRequest when the final
+        * request is serialized
+        * @param OAuthRequest $request
+        * @param OAuthConsumer $consumer
+        * @param OAuthToken $token
+        * @return string
+        */
+       abstract public function build_signature($request, $consumer, $token);
+
+       /**
+        * Verifies that a given signature is correct
+        * @param OAuthRequest $request
+        * @param OAuthConsumer $consumer
+        * @param OAuthToken $token
+        * @param string $signature
+        * @return bool
+        */
+       public function check_signature($request, $consumer, $token, $signature) {
+               $built = $this->build_signature($request, $consumer, $token);
+               return $built == $signature;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php
new file mode 100644 (file)
index 0000000..2c35c97
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+namespace PayPal\Auth\Oauth;
+/**
+ * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
+ * where the Signature Base String is the text and the key is the concatenated values (each first
+ * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
+ * character (ASCII code 38) even if empty.
+ *   - Chapter 9.2 ("HMAC-SHA1")
+ */
+class OAuthSignatureMethodHmacSha1 extends OAuthSignatureMethod {
+       function get_name() {
+               return "HMAC-SHA1";
+       }
+
+       public function build_signature($request, $consumer, $token) {
+               $base_string = $request->get_signature_base_string();
+               $base_string=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $base_string);//convert base string to lowercase
+               $request->base_string = $base_string;
+
+               $key_parts = array(
+               $consumer->secret,
+               ($token) ? $token->secret : ""
+               );
+
+               $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
+               $key = implode('&', $key_parts);
+               $key=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $key);//convert to lowercase
+               return base64_encode(hash_hmac('sha1', $base_string, $key, true));
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php
new file mode 100644 (file)
index 0000000..c29ebf3
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+namespace PayPal\Auth\Oauth;
+/**
+ * The PLAINTEXT method does not provide any security protection and SHOULD only be used
+ * over a secure channel such as HTTPS. It does not use the Signature Base String.
+ *   - Chapter 9.4 ("PLAINTEXT")
+ */
+class OAuthSignatureMethodPLAINTEXT extends OAuthSignatureMethod {
+       public function get_name() {
+               return "PLAINTEXT";
+       }
+
+       /**
+        * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
+        * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
+        * empty. The result MUST be encoded again.
+        *   - Chapter 9.4.1 ("Generating Signatures")
+        *
+        * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
+        * OAuthRequest handles this!
+        */
+       public function build_signature($request, $consumer, $token) {
+               $key_parts = array(
+               $consumer->secret,
+               ($token) ? $token->secret : ""
+               );
+
+               $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
+               $key = implode('&', $key_parts);
+               $request->base_string = $key;
+
+               return $key;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php
new file mode 100644 (file)
index 0000000..8dbcc5e
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+namespace PayPal\Auth\Oauth;
+/**
+ * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
+ * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
+ * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
+ * verified way to the Service Provider, in a manner which is beyond the scope of this
+ * specification.
+ *   - Chapter 9.3 ("RSA-SHA1")
+ */
+abstract class OAuthSignatureMethodRsaSha1 extends OAuthSignatureMethod {
+       public function get_name() {
+               return "RSA-SHA1";
+       }
+
+       // Up to the SP to implement this lookup of keys. Possible ideas are:
+       // (1) do a lookup in a table of trusted certs keyed off of consumer
+       // (2) fetch via http using a url provided by the requester
+       // (3) some sort of specific discovery code based on request
+       //
+       // Either way should return a string representation of the certificate
+       protected abstract function fetch_public_cert(&$request);
+
+       // Up to the SP to implement this lookup of keys. Possible ideas are:
+       // (1) do a lookup in a table of trusted certs keyed off of consumer
+       //
+       // Either way should return a string representation of the certificate
+       protected abstract function fetch_private_cert(&$request);
+
+       public function build_signature($request, $consumer, $token) {
+               $base_string = $request->get_signature_base_string();
+               $request->base_string = $base_string;
+
+               // Fetch the private key cert based on the request
+               $cert = $this->fetch_private_cert($request);
+
+               // Pull the private key ID from the certificate
+               $privatekeyid = openssl_get_privatekey($cert);
+
+               // Sign using the key
+               $ok = openssl_sign($base_string, $signature, $privatekeyid);
+
+               // Release the key resource
+               openssl_free_key($privatekeyid);
+
+               return base64_encode($signature);
+       }
+
+       public function check_signature($request, $consumer, $token, $signature) {
+               $decoded_sig = base64_decode($signature);
+
+               $base_string = $request->get_signature_base_string();
+
+               // Fetch the public key cert based on the request
+               $cert = $this->fetch_public_cert($request);
+
+               // Pull the public key ID from the certificate
+               $publickeyid = openssl_get_publickey($cert);
+
+               // Check the computed signature against the one passed in the query
+               $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
+
+               // Release the key resource
+               openssl_free_key($publickeyid);
+
+               return $ok == 1;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php
new file mode 100644 (file)
index 0000000..50563e7
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthToken {
+       // access tokens and request tokens
+       public $key;
+       public $secret;
+
+       /**
+        * key = the token
+        * secret = the token secret
+        */
+       function __construct($key, $secret) {
+               $this->key = $key;
+               $this->secret = $secret;
+       }
+
+       /**
+        * generates the basic string serialization of a token that a server
+        * would respond to request_token and access_token calls with
+        */
+       function to_string() {
+               return "oauth_token=" .
+               OAuthUtil::urlencode_rfc3986($this->key) .
+           "&oauth_token_secret=" .
+               OAuthUtil::urlencode_rfc3986($this->secret);
+       }
+
+       function __toString() {
+               return $this->to_string();
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php
new file mode 100644 (file)
index 0000000..8c7d34c
--- /dev/null
@@ -0,0 +1,169 @@
+<?php
+namespace PayPal\Auth\Oauth;
+class OAuthUtil {
+       public static function urlencode_rfc3986($input) {
+               if (is_array($input)) {
+                       return array_map(array('PayPal\Auth\Oauth\OAuthUtil', 'urlencode_rfc3986'), $input);
+               } else if (is_scalar($input)) {
+                       $tmp1=str_replace('%7E', '~', rawurlencode($input));
+                       $tmp2=str_replace(".","%2E",$tmp1);
+                       $tmp3=str_replace("*","%2A",$tmp2);
+                       $tmp4=str_replace( '+', ' ',$tmp3);
+                       $tmp=str_replace("-","%2D",$tmp4);
+                       return $tmp;
+                       /*$tmp1=str_replace('%7E', '~', rawurlencode($input));
+                        $tmp2= str_replace(".","%2E",$tmp1);
+                               
+                               
+                        return $tmp;*/
+               }
+               else {
+                       return '';
+               }
+       }
+       public static function parseQueryString($str) {
+               $op = array();
+               $pairs = explode("&", $str);
+               foreach ($pairs as $pair) {
+                       list($k, $v) = array_map("urldecode", explode("=", $pair));
+                       $op[$k] = $v;
+               }
+               return $op;
+       }
+       //parses string to associative array -modified for PayPal Signature
+
+
+       // This decode function isn't taking into consideration the above
+       // modifications to the encoding process. However, this method doesn't
+       // seem to be used anywhere so leaving it as is.
+       public static function urldecode_rfc3986($string) {
+               return urldecode($string);
+       }
+
+       // Utility function for turning the Authorization: header into
+       // parameters, has to do some unescaping
+       // Can filter out any non-oauth parameters if needed (default behaviour)
+       // May 28th, 2010 - method updated to tjerk.meesters for a speed improvement.
+       //                  see http://code.google.com/p/oauth/issues/detail?id=163
+       public static function split_header($header, $only_allow_oauth_parameters = true) {
+               $params = array();
+               if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) {
+                       foreach ($matches[1] as $i => $h) {
+                               $params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]);
+                       }
+                       if (isset($params['realm'])) {
+                               unset($params['realm']);
+                       }
+               }
+               return $params;
+       }
+
+       // helper to try to sort out headers for people who aren't running apache
+       public static function get_headers() {
+               if (function_exists('apache_request_headers')) {
+                       // we need this to get the actual Authorization: header
+                       // because apache tends to tell us it doesn't exist
+                       $headers = apache_request_headers();
+
+                       // sanitize the output of apache_request_headers because
+                       // we always want the keys to be Cased-Like-This and arh()
+                       // returns the headers in the same case as they are in the
+                       // request
+                       $out = array();
+                       foreach ($headers AS $key => $value) {
+                               $key = str_replace(
+            " ",
+            "-",
+                               ucwords(strtolower(str_replace("-", " ", $key)))
+                               );
+                               $out[$key] = $value;
+                       }
+               } else {
+                       // otherwise we don't have apache and are just going to have to hope
+                       // that $_SERVER actually contains what we need
+                       $out = array();
+                       if( isset($_SERVER['CONTENT_TYPE']) )
+                       $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
+                       if( isset($_ENV['CONTENT_TYPE']) )
+                       $out['Content-Type'] = $_ENV['CONTENT_TYPE'];
+
+                       foreach ($_SERVER as $key => $value) {
+                               if (substr($key, 0, 5) == "HTTP_") {
+                                       // this is chaos, basically it is just there to capitalize the first
+                                       // letter of every word that is not an initial HTTP and strip HTTP
+                                       // code from przemek
+                                       $key = str_replace(
+            " ",
+            "-",
+                                       ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
+                                       );
+                                       $out[$key] = $value;
+                               }
+                       }
+               }
+               return $out;
+       }
+
+       // This function takes a input like a=b&a=c&d=e and returns the parsed
+       // parameters like this
+       // array('a' => array('b','c'), 'd' => 'e')
+       public static function parse_parameters( $input ) {
+               if (!isset($input) || !$input) return array();
+
+               $pairs = explode('&', $input);
+
+               $parsed_parameters = array();
+               foreach ($pairs as $pair) {
+                       $split = explode('=', $pair, 2);
+                       $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
+                       $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
+
+                       if (isset($parsed_parameters[$parameter])) {
+                               // We have already recieved parameter(s) with this name, so add to the list
+                               // of parameters with this name
+
+                               if (is_scalar($parsed_parameters[$parameter])) {
+                                       // This is the first duplicate, so transform scalar (string) into an array
+                                       // so we can add the duplicates
+                                       $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
+                               }
+
+                               $parsed_parameters[$parameter][] = $value;
+                       } else {
+                               $parsed_parameters[$parameter] = $value;
+                       }
+               }
+               return $parsed_parameters;
+       }
+
+       public static function build_http_query($params) {
+               if (!$params) return '';
+
+               // Urlencode both keys and values
+               $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
+               $values = OAuthUtil::urlencode_rfc3986(array_values($params));
+               $params = array_combine($keys, $values);
+
+               // Parameters are sorted by name, using lexicographical byte value ordering.
+               // Ref: Spec: 9.1.1 (1)
+               uksort($params, 'strcmp');
+
+               $pairs = array();
+               foreach ($params as $parameter => $value) {
+                       if (is_array($value)) {
+                               // If two or more parameters share the same name, they are sorted by their value
+                               // Ref: Spec: 9.1.1 (1)
+                               // June 12th, 2010 - changed to sort because of issue 164 by hidetaka
+                               sort($value, SORT_STRING);
+                               foreach ($value as $duplicate_value) {
+                                       $pairs[] = $parameter . '=' . $duplicate_value;
+                               }
+                       } else {
+                               $pairs[] = $parameter . '=' . $value;
+                       }
+               }
+               // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
+               // Each name-value pair is separated by an '&' character (ASCII code 38)
+               return implode('&', $pairs);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php
new file mode 100644 (file)
index 0000000..4cee501
--- /dev/null
@@ -0,0 +1,95 @@
+<?php
+namespace PayPal\Auth\Openid;
+use PayPal\Common\PPModel;
+/**
+ * End-User's preferred address.
+ */
+class PPOpenIdAddress extends PPModel {
+
+               /**
+                * Full street address component, which may include house number, street name.
+                * @param string $street_address
+                */
+                public function setStreetAddress($street_address) {
+                       $this->street_address = $street_address;
+                       return $this;
+                }
+               
+               /**
+                * Full street address component, which may include house number, street name.
+                * @return string
+                */
+                public function getStreetAddress() {
+                       return $this->street_address;
+                }
+                
+               /**
+                * City or locality component.
+                * @param string $locality
+                */
+                public function setLocality($locality) {
+                       $this->locality = $locality;
+                       return $this;
+                }
+               
+               /**
+                * City or locality component.
+                * @return string
+                */
+                public function getLocality() {
+                       return $this->locality;
+                }
+                
+               /**
+                * State, province, prefecture or region component.
+                * @param string $region
+                */
+                public function setRegion($region) {
+                       $this->region = $region;
+                       return $this;
+                }
+               
+               /**
+                * State, province, prefecture or region component.
+                * @return string
+                */
+                public function getRegion() {
+                       return $this->region;
+                }
+                
+               /**
+                * Zip code or postal code component.
+                * @param string $postal_code
+                */
+                public function setPostalCode($postal_code) {
+                       $this->postal_code = $postal_code;
+                       return $this;
+                }
+               
+               /**
+                * Zip code or postal code component.
+                * @return string
+                */
+                public function getPostalCode() {
+                       return $this->postal_code;
+                }
+                
+               /**
+                * Country name component.
+                * @param string $country
+                */
+                public function setCountry($country) {
+                       $this->country = $country;
+                       return $this;
+                }
+               
+               /**
+                * Country name component.
+                * @return string
+                */
+                public function getCountry() {
+                       return $this->country;
+                }
+                
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php
new file mode 100644 (file)
index 0000000..1c5e051
--- /dev/null
@@ -0,0 +1,61 @@
+<?php
+namespace PayPal\Auth\Openid;
+namespace PayPal\Common\PPModel;
+/**
+ * Error resource
+ */
+class PPOpenIdError extends PPModel {
+
+               /**
+                * A single ASCII error code from the following enum.
+                * @param string $error
+                */
+                public function setError($error) {
+                       $this->error = $error;
+                       return $this;
+                }
+               
+               /**
+                * A single ASCII error code from the following enum.
+                * @return string
+                */
+                public function getError() {
+                       return $this->error;
+                }
+                
+               /**
+                * A resource ID that indicates the starting resource in the returned results.
+                * @param string $error_description
+                */
+                public function setErrorDescription($error_description) {
+                       $this->error_description = $error_description;
+                       return $this;
+                }
+               
+               /**
+                * A resource ID that indicates the starting resource in the returned results.
+                * @return string
+                */
+                public function getErrorDescription() {
+                       return $this->error_description;
+                }
+                
+               /**
+                * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
+                * @param string $error_uri
+                */
+                public function setErrorUri($error_uri) {
+                       $this->error_uri = $error_uri;
+                       return $this;
+                }
+               
+               /**
+                * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
+                * @return string
+                */
+                public function getErrorUri() {
+                       return $this->error_uri;
+                }
+                
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php
new file mode 100644 (file)
index 0000000..ba76f0a
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+namespace PayPal\Auth\Openid;
+use PayPal\Core\PPConstants;
+use PayPal\Common\PPApiContext;
+use PayPal\Core\PPConstants;
+class PPOpenIdSession {
+
+       /**
+        * Returns the PayPal URL to which the user must be redirected to
+        * start the authentication / authorization process.
+        *
+        * @param string $redirectUri Uri on merchant website to where
+        *                              the user must be redirected to post paypal login
+        * @param array $scope The access privilges that you are requesting for
+        *                              from the user. Pass empty array for all scopes.
+        *                              See https://developer.paypal.com/webapps/developer/docs/classic/loginwithpaypal/ht_OpenIDConnect/#parameters for more
+        * @param PPApiContext $apiContext Optional API Context
+        */
+       public static function getAuthorizationUrl($redirectUri, $scope, $apiContext=null) {
+
+               if(is_null($apiContext)) {
+                       $apiContext = new PPApiContext();
+               }
+               $config = $apiContext->getConfig();
+
+               $scope = count($scope) != 0 ? $scope : array('openid', 'profile', 'address', 'email', 'phone', 'https://uri.paypal.com/services/paypalattributes');
+               if(!in_array('openid', $scope)) {
+                       $scope[] = 'openid';
+               }
+               $params = array(
+                               'client_id' => $config['acct1.ClientId'],
+                               'response_type' => 'code',
+                               'scope' => implode(" ", $scope),
+                               'redirect_uri' => $redirectUri
+               );
+               return sprintf("%s/v1/authorize?%s", self::getBaseUrl($config), http_build_query($params));
+       }
+
+
+       /**
+        * Returns the URL to which the user must be redirected to
+        * logout from the OpenID provider (i.e. PayPal)
+        *
+        * @param string $redirectUri Uri on merchant website to where
+        *                              the user must be redirected to post logout
+        * @param string $idToken id_token from the TokenInfo object
+        * @param PayPal/Rest/APIContext $apiContext Optional API Context
+        */
+       public static function getLogoutUrl($redirectUri, $idToken, $apiContext=null) {
+               
+               if(is_null($apiContext)) {
+                       $apiContext = new PPApiContext();
+               }
+               $config = $apiContext->getConfig();
+               
+               PPConstants::OPENID_REDIRECT_LIVE_URL;
+               $params = array(
+                               'id_token' => $idToken,
+                               'redirect_uri' => $redirectUri,
+                               'logout' => 'true'
+               );
+               return sprintf("%s/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params));
+       }
+
+       private static function getBaseUrl($config) {
+
+               if(array_key_exists('openid.RedirectUri', $config)) {
+                       return $config['openid.RedirectUri'];
+               } else if (array_key_exists('mode', $config)) {
+                       switch(strtoupper($config['mode'])) {
+                               case 'SANDBOX':
+                                       return PPConstants::OPENID_REDIRECT_SANDBOX_URL;
+                               case 'LIVE':
+                                       return PPConstants::OPENID_REDIRECT_LIVE_URL;   
+                       }
+               }
+               return ;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php
new file mode 100644 (file)
index 0000000..cdb90d0
--- /dev/null
@@ -0,0 +1,181 @@
+<?php
+namespace PayPal\Auth\Openid;
+use PayPal\Common\PPModel;
+/**
+ * Token grant resource
+ */
+class PPOpenIdTokeninfo extends PPModel {
+
+               /**
+                * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
+                * @param string $scope
+                */
+                public function setScope($scope) {
+                       $this->scope = $scope;
+                       return $this;
+                }
+               
+               /**
+                * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
+                * @return string
+                */
+                public function getScope() {
+                       return $this->scope;
+                }
+                
+               /**
+                * The access token issued by the authorization server.
+                * @param string $access_token
+                */
+                public function setAccessToken($access_token) {
+                       $this->access_token = $access_token;
+                       return $this;
+                }
+               
+               /**
+                * The access token issued by the authorization server.
+                * @return string
+                */
+                public function getAccessToken() {
+                       return $this->access_token;
+                }
+                
+               /**
+                * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
+                * @param string $refresh_token
+                */
+                public function setRefreshToken($refresh_token) {
+                       $this->refresh_token = $refresh_token;
+                       return $this;
+                }
+               
+               /**
+                * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
+                * @return string
+                */
+                public function getRefreshToken() {
+                       return $this->refresh_token;
+                }
+                
+               /**
+                * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1).  Value is case insensitive.
+                * @param string $token_type
+                */
+                public function setTokenType($token_type) {
+                       $this->token_type = $token_type;
+                       return $this;
+                }
+               
+               /**
+                * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1).  Value is case insensitive.
+                * @return string
+                */
+                public function getTokenType() {
+                       return $this->token_type;
+                }
+                
+               /**
+                * The id_token is a session token assertion that denotes the user's authentication status
+                * @param string $id_token
+                */
+                public function setIdToken($id_token) {
+                       $this->id_token = $id_token;
+                       return $this;
+                }
+               
+               /**
+                * The id_token is a session token assertion that denotes the user's authentication status
+                * @return string
+                */
+                public function getIdToken() {
+                       return $this->id_token;
+                }
+                
+               /**
+                * The lifetime in seconds of the access token.
+                * @param integer $expires_in
+                */
+                public function setExpiresIn($expires_in) {
+                       $this->expires_in = $expires_in;
+                       return $this;
+                }
+               
+               /**
+                * The lifetime in seconds of the access token.
+                * @return integer
+                */
+                public function getExpiresIn() {
+                       return $this->expires_in;
+                }
+                
+
+        /**
+                * Creates an Access Token from an Authorization Code.
+                *
+                * @path /v1/identity/openidconnect/tokenservice
+                * @method POST
+                * @param array $params (allowed values are grant_type, code and redirect_uri)
+                *                              (optional) grant_type is the Token grant type. Defaults to authorization_code
+                *                              code is Authorization code previously received from the authorization server
+                *                              redirect_uri Redirection endpoint that must match the one provided during the 
+                *                                      authorization request that ended in receiving the authorization code.
+                * @param PPApiContext $apiContext Optional API Context   
+                * @return PPOpenIdTokeninfo
+                */
+               public static function createFromAuthorizationCode($params, $apiContext=null) {
+                       static $allowedParams = array('grant_type' => 1, 'code' => 1, 'redirect_uri' => 1);
+                       if(is_null($apiContext)) {
+                               $apiContext = new PPApiContext();
+                       }
+                       
+                       if(!array_key_exists('grant_type', $params)) {
+                               $params['grant_type'] = 'authorization_code';
+                       }       
+                       
+                       $call = new PPRestCall($apiContext);
+                       $token = new PPOpenIdTokeninfo();
+                       $token->fromJson(
+                               $call->execute(array('PPOpenIdHandler'),
+                                       "/v1/identity/openidconnect/tokenservice" , "POST", 
+                                       http_build_query(array_intersect_key($params, $allowedParams)),
+                                       array('Content-Type' => 'application/x-www-form-urlencoded')
+                       ));
+                       return $token;
+               }
+        /**
+                * Creates an Access Token from an Refresh Token.
+                *
+                * @path /v1/identity/openidconnect/tokenservice
+                * @method POST
+                * @param array $params (allowed values are grant_type and scope)
+                *                              (optional) refresh_token refresh token. If one is not passed, refresh token from the current object is used.
+                *                              (optional) grant_type is the Token grant type. Defaults to refresh_token
+                *                              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
+                */
+               public function createFromRefreshToken($params, $apiContext=null) {
+                       
+                       static $allowedParams = array('grant_type' => 1, 'refresh_token' => 1, 'scope' => 1);
+                       if(is_null($apiContext)) {
+                               $apiContext = new PPApiContext();
+                       }
+                                                       
+                       if(!array_key_exists('grant_type', $params)) {
+                               $params['grant_type'] = 'refresh_token';
+                       }
+                       if(!array_key_exists('refresh_token', $params)) {
+                               $params['refresh_token'] = $this->getRefreshToken();
+                       }
+                                               
+                       
+                       $call = new PPRestCall($apiContext);                    
+                       $this->fromJson(
+                               $call->execute(array('PPOpenIdHandler'), 
+                                       "/v1/identity/openidconnect/tokenservice", "POST",
+                                       http_build_query(array_intersect_key($params, $allowedParams)),
+                                       array('Content-Type' => 'application/x-www-form-urlencoded')
+                       ));
+                       return $this;
+               }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php
new file mode 100644 (file)
index 0000000..29ff51f
--- /dev/null
@@ -0,0 +1,400 @@
+<?php
+namespace PayPal\Auth\Openid;
+use PayPal\Common\PPModel;
+/**
+ * OpenIdConnect UserInfo Resource
+ */
+class PPOpenIdUserinfo extends PPModel {
+
+               /**
+                * Subject - Identifier for the End-User at the Issuer.
+                * @param string $user_id
+                */
+                public function setUserId($user_id) {
+                       $this->user_id = $user_id;
+                       return $this;
+                }
+               
+               /**
+                * Subject - Identifier for the End-User at the Issuer.
+                * @return string
+                */
+                public function getUserId() {
+                       return $this->user_id;
+                }
+                
+               /**
+                * Subject - Identifier for the End-User at the Issuer.
+                * @param string $sub
+                */
+                public function setSub($sub) {
+                       $this->sub = $sub;
+                       return $this;
+                }
+               
+               /**
+                * Subject - Identifier for the End-User at the Issuer.
+                * @return string
+                */
+                public function getSub() {
+                       return $this->sub;
+                }
+                
+               /**
+                * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
+                * @param string $name
+                */
+                public function setName($name) {
+                       $this->name = $name;
+                       return $this;
+                }
+               
+               /**
+                * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
+                * @return string
+                */
+                public function getName() {
+                       return $this->name;
+                }
+                
+               /**
+                * Given name(s) or first name(s) of the End-User
+                * @param string $given_name
+                */
+                public function setGivenName($given_name) {
+                       $this->given_name = $given_name;
+                       return $this;
+                }
+               
+               /**
+                * Given name(s) or first name(s) of the End-User
+                * @return string
+                */
+                public function getGivenName() {
+                       return $this->given_name;
+                }
+                
+               /**
+                * Surname(s) or last name(s) of the End-User.
+                * @param string $family_name
+                */
+                public function setFamilyName($family_name) {
+                       $this->family_name = $family_name;
+                       return $this;
+                }
+               
+               /**
+                * Surname(s) or last name(s) of the End-User.
+                * @return string
+                */
+                public function getFamilyName() {
+                       return $this->family_name;
+                }
+                
+               /**
+                * Middle name(s) of the End-User.
+                * @param string $middle_name
+                */
+                public function setMiddleName($middle_name) {
+                       $this->middle_name = $middle_name;
+                       return $this;
+                }
+               
+               /**
+                * Middle name(s) of the End-User.
+                * @return string
+                */
+                public function getMiddleName() {
+                       return $this->middle_name;
+                }
+                
+               /**
+                * URL of the End-User's profile picture.
+                * @param string $picture
+                */
+                public function setPicture($picture) {
+                       $this->picture = $picture;
+                       return $this;
+                }
+               
+               /**
+                * URL of the End-User's profile picture.
+                * @return string
+                */
+                public function getPicture() {
+                       return $this->picture;
+                }
+                
+               /**
+                * End-User's preferred e-mail address.
+                * @param string $email
+                */
+                public function setEmail($email) {
+                       $this->email = $email;
+                       return $this;
+                }
+               
+               /**
+                * End-User's preferred e-mail address.
+                * @return string
+                */
+                public function getEmail() {
+                       return $this->email;
+                }
+                
+               /**
+                * True if the End-User's e-mail address has been verified; otherwise false.
+                * @param boolean $email_verified
+                */
+                public function setEmailVerified($email_verified) {
+                       $this->email_verified = $email_verified;
+                       return $this;
+                }
+               
+               /**
+                * True if the End-User's e-mail address has been verified; otherwise false.
+                * @return boolean
+                */
+                public function getEmailVerified() {
+                       return $this->email_verified;
+                }
+                
+               /**
+                * End-User's gender.
+                * @param string $gender
+                */
+                public function setGender($gender) {
+                       $this->gender = $gender;
+                       return $this;
+                }
+               
+               /**
+                * End-User's gender.
+                * @return string
+                */
+                public function getGender() {
+                       return $this->gender;
+                }
+                
+               /**
+                * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
+                * @param string $birthday
+                */
+                public function setBirthday($birthday) {
+                       $this->birthday = $birthday;
+                       return $this;
+                }
+               
+               /**
+                * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
+                * @return string
+                */
+                public function getBirthday() {
+                       return $this->birthday;
+                }
+                
+               /**
+                * Time zone database representing the End-User's time zone
+                * @param string $zoneinfo
+                */
+                public function setZoneinfo($zoneinfo) {
+                       $this->zoneinfo = $zoneinfo;
+                       return $this;
+                }
+               
+               /**
+                * Time zone database representing the End-User's time zone
+                * @return string
+                */
+                public function getZoneinfo() {
+                       return $this->zoneinfo;
+                }
+                
+               /**
+                * End-User's locale.
+                * @param string $locale
+                */
+                public function setLocale($locale) {
+                       $this->locale = $locale;
+                       return $this;
+                }
+               
+               /**
+                * End-User's locale.
+                * @return string
+                */
+                public function getLocale() {
+                       return $this->locale;
+                }
+                
+               /**
+                * End-User's language.
+                * @param string $language
+                */
+                public function setLanguage($language) {
+                       $this->language = $language;
+                       return $this;
+                }
+               
+               /**
+                * End-User's language.
+                * @return string
+                */
+                public function getLanguage() {
+                       return $this->language;
+                }
+                
+               /**
+                * End-User's verified status.
+                * @param boolean $verified
+                */
+                public function setVerified($verified) {
+                       $this->verified = $verified;
+                       return $this;
+                }
+               
+               /**
+                * End-User's verified status.
+                * @return boolean
+                */
+                public function getVerified() {
+                       return $this->verified;
+                }
+                
+               /**
+                * End-User's preferred telephone number.
+                * @param string $phone_number
+                */
+                public function setPhoneNumber($phone_number) {
+                       $this->phone_number = $phone_number;
+                       return $this;
+                }
+               
+               /**
+                * End-User's preferred telephone number.
+                * @return string
+                */
+                public function getPhoneNumber() {
+                       return $this->phone_number;
+                }
+                
+               /**
+                * End-User's preferred address.
+                * @param PPOpenIdAddress $address
+                */
+                public function setAddress($address) {
+                       $this->address = $address;
+                       return $this;
+                }
+               
+               /**
+                * End-User's preferred address.
+                * @return PPOpenIdAddress
+                */
+                public function getAddress() {
+                       return $this->address;
+                }
+                
+               /**
+                * Verified account status.
+                * @param boolean $verified_account
+                */
+                public function setVerifiedAccount($verified_account) {
+                       $this->verified_account = $verified_account;
+                       return $this;
+                }
+               
+               /**
+                * Verified account status.
+                * @return boolean
+                */
+                public function getVerifiedAccount() {
+                       return $this->verified_account;
+                }
+                
+               /**
+                * Account type.
+                * @param string $account_type
+                */
+                public function setAccountType($account_type) {
+                       $this->account_type = $account_type;
+                       return $this;
+                }
+               
+               /**
+                * Account type.
+                * @return string
+                */
+                public function getAccountType() {
+                       return $this->account_type;
+                }
+                
+               /**
+                * Account holder age range.
+                * @param string $age_range
+                */
+                public function setAgeRange($age_range) {
+                       $this->age_range = $age_range;
+                       return $this;
+                }
+               
+               /**
+                * Account holder age range.
+                * @return string
+                */
+                public function getAgeRange() {
+                       return $this->age_range;
+                }
+                
+               /**
+                * Account payer identifier.
+                * @param string $payer_id
+                */
+                public function setPayerId($payer_id) {
+                       $this->payer_id = $payer_id;
+                       return $this;
+                }
+               
+               /**
+                * Account payer identifier.
+                * @return string
+                */
+                public function getPayerId() {
+                       return $this->payer_id;
+                }
+                
+
+        /**
+                * returns user details
+                *
+                * @path /v1/identity/openidconnect/userinfo
+                * @method GET
+                * @param array $params (allowed values are access_token)
+                *                                      access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls  
+                * @param PPApiContext $apiContext Optional API Context
+                * @return PPOpenIdUserinfo
+                */
+               public static function getUserinfo($params, $apiContext=null) {
+                       static $allowedParams = array( 'schema' => 1);
+                       if(is_null($apiContext)) {
+                               $apiContext = new PPApiContext();
+                       }
+                                               
+                       if(!array_key_exists('schema', $params)) {
+                               $params['schema'] = 'openid';
+                       }                       
+                       $requestUrl = "/v1/identity/openidconnect/userinfo?"
+                                       . http_build_query(array_intersect_key($params, $allowedParams));                       
+                       $call = new PPRestCall($apiContext);
+                       $ret = new PPOpenIdUserinfo();
+                       $ret->fromJson(
+                               $call->execute(array('PPOpenIdHandler'), $requestUrl, "GET", "", 
+                                       array(
+                                               'Authorization' => "Bearer " . $params['access_token'],
+                                               'Content-Type'=> 'x-www-form-urlencoded'
+                                       )
+                               )
+                       );
+                       return $ret;
+               }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php
new file mode 100644 (file)
index 0000000..a33ab96
--- /dev/null
@@ -0,0 +1,103 @@
+<?php
+namespace PayPal\Auth;
+use PayPal\Exception\PPMissingCredentialException;
+use PayPal\Auth\IPPCredential;
+/**
+ * 
+ * Client certificate based credentials
+ */
+class PPCertificateCredential extends IPPCredential {
+       
+       /**
+        * API username
+        * @var string
+        */
+       protected $userName;
+       
+       /**
+        * API password
+        * @var string
+        */
+       protected $password;
+
+       /**
+        * Path to PEM encoded API certificate on local filesystem
+        * @var string
+        */
+       protected $certificatePath;
+
+       /**
+        * Password used to protect the API certificate
+        * @var string
+        */
+       protected $certificatePassPhrase;
+       
+       /**
+        * Application Id that uniquely identifies an application that uses the
+        * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
+        * The application Id is issued by PayPal.
+        * Test application Ids are available for the sandbox environment
+        * @var string
+        */
+       protected $applicationId;       
+       
+       /**
+        * Constructs a new certificate credential object
+        * 
+        * @param string $userName      API username
+        * @param string $password      API password
+        * @param string $certPath      Path to PEM encoded client certificate file
+        * @param string $certificatePassPhrase password need to use the certificate
+        */
+       public function __construct($userName, $password, $certPath, $certificatePassPhrase=NULL) {
+               $this->userName = trim($userName);
+               $this->password = trim($password);
+               $this->certificatePath = trim($certPath);
+               $this->certificatePassPhrase = $certificatePassPhrase; 
+               $this->validate();
+       }
+       
+       public function validate() {
+               
+               if (empty($this->userName)) {
+                       throw new PPMissingCredentialException("username cannot be empty");
+               }
+               if (empty($this->password)) {
+                       throw new PPMissingCredentialException("password cannot be empty");
+               }               
+               if (empty($this->certificatePath)) {
+                       throw new PPMissingCredentialException("certificate cannot be empty");
+               }
+       }
+
+       public function getUserName() {
+               return $this->userName;
+       }
+
+       public function getPassword() {
+               return $this->password;
+       }
+       
+       public function getCertificatePath() {
+               if (realpath($this->certificatePath)) {
+                       return realpath($this->certificatePath);
+               } else if(defined('PP_CONFIG_PATH')) {
+                       return constant('PP_CONFIG_PATH') . DIRECTORY_SEPARATOR . $this->certificatePath;
+               } else {
+                       return realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".."  .DIRECTORY_SEPARATOR . ".."     . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . $this->certificatePath);
+               }
+       }
+
+       public function getCertificatePassPhrase() {
+               return $this->certificatePassPhrase;
+       }
+       
+       public function setApplicationId($applicationId) {
+               $this->applicationId = trim($applicationId);
+       }
+       
+       public function getApplicationId() {
+               return $this->applicationId;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php
new file mode 100644 (file)
index 0000000..d1e6f49
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+namespace PayPal\Auth;
+use PayPal\Exception\PPMissingCredentialException;
+/**
+ * API signature (3-token) based credentials
+ */
+class PPSignatureCredential extends IPPCredential {
+
+       /**
+        * API username
+        * @var string
+        */
+       protected $userName;
+
+       /**
+        * API password
+        * @var string
+        */
+       protected $password;
+       /**
+        * API Signature
+        * @var string
+        */
+       protected $signature;
+
+       /**
+        * Application Id that uniquely identifies an application that uses the
+        * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
+        * Application Ids are issued by PayPal.
+        * Test application Ids are available for the sandbox environment
+        * @var string
+        */
+       protected $applicationId;
+
+       public function __construct($userName, $password, $signature) {
+               $this->userName = trim($userName);
+               $this->password = trim($password);
+               $this->signature = trim($signature);
+               $this->validate();
+       }
+
+       public function validate() {
+
+               if (empty($this->userName)) {
+                       throw new PPMissingCredentialException("username cannot be empty");
+               }
+               if (empty($this->password)) {
+                       throw new PPMissingCredentialException("password cannot be empty");
+               }
+               // Signature can be empty if using 3-rd party auth tokens from permissions API
+       }
+
+       public function getUserName() {
+               return $this->userName;
+       }
+       public function getPassword() {
+               return $this->password;
+       }
+       public function getSignature() {
+               return $this->signature;
+       }
+
+       public function setApplicationId($applicationId) {
+               $this->applicationId = trim($applicationId);
+       }
+       public function getApplicationId() {
+               return $this->applicationId;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php
new file mode 100644 (file)
index 0000000..27f1f8f
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+namespace PayPal\Auth;
+/**
+ *
+ * Represents the older subject based "third party authorization"
+ * New apps can use the more flexible token based authorization
+ */
+class PPSubjectAuthorization implements IPPThirdPartyAuthorization {
+
+       /**
+        * Paypal emailid of the party who has granted API rights
+        * to the API caller. Your API username must have been 
+        * granted permission by this third-party to make any particular 
+        * PayPal API request.
+        * @var string
+        */
+       private $subject;
+       
+       public function __construct($subject) {
+               $this->subject = $subject;
+       }
+       
+       public function getSubject() {
+               return $this->subject;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php
new file mode 100644 (file)
index 0000000..d9a80e7
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+namespace PayPal\Auth;
+use PayPal\Auth\IPPThirdPartyAuthorization;
+/**
+ *
+ * Represents token based third party authorization
+ * Token based authorization credentials are obtained using
+ * the Permissions API
+ */
+class PPTokenAuthorization implements IPPThirdPartyAuthorization {
+       
+       /**
+        * Permanent access token that identifies the relationship 
+        * between the authorizing user and the API caller.
+        * @var string
+        */
+       private $accessToken;
+       
+       /**
+        * The token secret/password that will need to be used when 
+        * generating the signature.
+        * @var string
+        */
+       private $tokenSecret;
+       
+       public function __construct($accessToken, $tokenSecret) {
+               $this->accessToken = $accessToken;
+               $this->tokenSecret = $tokenSecret;
+       }
+       
+       public function getAccessToken() {
+               return $this->accessToken;
+       }
+       
+       public function getTokenSecret() {
+               return $this->tokenSecret;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php
new file mode 100644 (file)
index 0000000..5affd24
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+namespace PayPal\Common;
+use PayPal\Core\PPConfigManager;
+/**
+ * 
+ * Container for Call level parameters such as
+ * SDK configuration 
+ */
+class PPApiContext {
+       
+       /**
+        * 
+        * @var array Dynamic SDK configuration
+        */
+       protected $config;
+       
+       public function setConfig($config) {
+               $this->config = $config;
+       }
+       
+       public function getConfig() {
+               if(!isset($this->config)) {
+                       $this->config = PPConfigManager::getInstance()->getConfigHashmap();
+               }
+               return $this->config;
+       }
+       
+       public function __construct($config=null) {
+               if(!is_null($config)) {
+                       $this->config = $config;
+               }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php
new file mode 100644 (file)
index 0000000..a93fe19
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+namespace PayPal\Common;
+class PPArrayUtil {
+       
+       /**
+        * 
+        * @param array $arr
+        * @return true if $arr is an associative array
+        */
+       public static function isAssocArray(array $arr) {
+               foreach($arr as $k => $v) {
+                       if(is_int($k)) {
+                               return false;
+                       }
+               }
+               return true;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php
new file mode 100644 (file)
index 0000000..ec4ae90
--- /dev/null
@@ -0,0 +1,84 @@
+<?php 
+namespace PayPal\Common;
+
+/**
+ * Generic Model class that all API domain classes extend
+ * Stores all member data in a hashmap that enables easy 
+ * JSON encoding/decoding
+ */
+class PPModel {
+
+       private $_propMap = array();    
+               
+       public function __get($key) {
+               return $this->_propMap[$key];
+       }
+       
+       public function __set($key, $value) {
+               $this->_propMap[$key] = $value;
+       }
+       
+       public function __isset($key) {
+               return isset($this->_propMap[$key]);
+       }
+       
+       public function __unset($key) {
+               unset($this->_propMap[$key]);
+       }
+       
+       
+       private function _convertToArray($param) {
+               $ret = array();         
+               foreach($param as $k => $v) {
+                       if($v instanceof PPModel ) {                            
+                               $ret[$k] = $v->toArray();
+                       } else if (is_array($v)) {
+                               $ret[$k] = $this->_convertToArray($v);
+                       } else {
+                               $ret[$k] = $v;
+                       }
+               }
+               return $ret;
+       }
+       
+       public function fromArray($arr) {
+               
+               foreach($arr as $k => $v) {
+                       if(is_array($v)) {
+                               $clazz = PPReflectionUtil::getPropertyClass(get_class($this), $k);
+                               
+                               if(PPArrayUtil::isAssocArray($v)) {
+                                       $o = new $clazz();
+                                       $o->fromArray($v);
+                                       $this->__set($k, $o);
+                               } else {
+                                       $arr =  array();                
+                                       foreach($v as $nk => $nv) {
+                                               if(is_array($nv)) {
+                                                       $o = new $clazz();
+                                                       $o->fromArray($nv);
+                                                       $arr[$nk] = $o;
+                                               } else {
+                                                       $arr[$nk] = $nv;
+                                               }
+                                       }
+                                       $this->__set($k, $arr);
+                               } 
+                       }else {
+                               $this->$k = $v;
+                       }
+               }
+       }
+       
+       public function fromJson($json) {
+               $this->fromArray(json_decode($json, true));
+       }
+       
+       public function toArray() {             
+               return $this->_convertToArray($this->_propMap);
+       }
+       
+       public function toJSON() {              
+               return json_encode($this->toArray());
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php
new file mode 100644 (file)
index 0000000..83bfd8f
--- /dev/null
@@ -0,0 +1,74 @@
+<?php
+namespace PayPal\Common;
+class PPReflectionUtil {
+       
+       
+       /**
+        * @var array|ReflectionMethod[]
+        */
+       private static $propertiesRefl = array();
+       
+       /**
+        * @var array|string[]
+        */
+       private static $propertiesType = array();
+       
+       
+       /**
+        * 
+        * @param string $class
+        * @param string $propertyName
+        */
+       public static function getPropertyClass($class, $propertyName) {
+               
+               if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {               
+//                     if (substr($annotations['param'], -2) === '[]') {
+//                             $param = substr($annotations['param'], 0, -2);
+//                     }
+                       $param = $annotations['return'];
+               }
+               
+               if(isset($param)) {
+                       $anno = explode(' ', $param);
+                       return $anno[0];
+               } else {
+                       return 'string';
+               }
+       }
+       
+       
+       /**
+        * @param string $class
+        * @param string $propertyName
+        * @throws RuntimeException
+        * @return string
+        */
+       public static function propertyAnnotations($class, $propertyName)
+       {
+               $class = is_object($class) ? get_class($class) : $class;
+               if (!class_exists('ReflectionProperty')) {
+                       throw new \RuntimeException("Property type of " . $class . "::{$propertyName} cannot be resolved");
+               }
+       
+               if ($annotations =& self::$propertiesType[$class][$propertyName]) {
+                       return $annotations;
+               }
+               
+               if (!($refl =& self::$propertiesRefl[$class][$propertyName])) {
+                       $getter = method_exists($class, "get" . ucfirst($propertyName)) ? "get". ucfirst($propertyName)
+                               : "get". preg_replace("/([_-\s]?([a-z0-9]+))/e", "ucwords('\\2')", $propertyName);
+                       $refl = new \ReflectionMethod($class, $getter);
+                       self::$propertiesRefl[$class][$propertyName] = $refl;
+               }
+       
+               // todo: smarter regexp
+               if (!preg_match_all('~\@([^\s@\(]+)[\t ]*(?:\(?([^\n@]+)\)?)?~i', $refl->getDocComment(), $annots, PREG_PATTERN_ORDER)) {
+                       return NULL;
+               }
+               foreach ($annots[1] as $i => $annot) {
+                       $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
+               }
+       
+               return $annotations;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php
new file mode 100644 (file)
index 0000000..551c93b
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+namespace PayPal\Common;
+class PPUserAgent {
+
+       /**
+        * Returns the value of the User-Agent header
+        * Add environment values and php version numbers
+        * @param string $sdkName
+        * @param string $sdkVersion
+        */
+       public static function getValue($sdkName, $sdkVersion) {
+               
+               $featureList = array(
+                       'lang=PHP',
+                       'v=' . PHP_VERSION,
+                       'bit=' . self::_getPHPBit(),
+                       'os=' . str_replace(' ' , '_', php_uname('s') . ' ' . php_uname('r')),
+                       'machine=' . php_uname('m')
+               );
+               if(defined('OPENSSL_VERSION_TEXT')) {
+                       $opensslVersion = explode(' ', OPENSSL_VERSION_TEXT);
+                       $featureList[] = 'openssl='. $opensslVersion[1];
+               }
+               if(function_exists('curl_version')) {
+                       $curlVersion = curl_version();
+                       $featureList[] = 'curl=' . $curlVersion['version'];
+               }
+               return sprintf("PayPalSDK/%s %s (%s)", $sdkName, $sdkVersion, implode(';', $featureList));
+       }
+       
+       private static function _getPHPBit() {
+               switch(PHP_INT_SIZE) {
+                       case 4:
+                               return '32';
+                       case 8:
+                               return '64';
+                       default:
+                               return PHP_INT_SIZE;
+               }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php
new file mode 100644 (file)
index 0000000..876b408
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPLoggingManager;
+use PayPal\Formatter\FormatterFactory;
+use PayPal\Core\PPRequest;
+use PayPal\Core\PPHttpConfig;
+use PayPal\Handler\PPAuthenticationHandler;
+use PayPal\Auth\PPTokenAuthorization;
+
+class PPAPIService {
+
+       public $endpoint;
+       public $config;
+       public $options = array();
+       public $serviceName;
+       private $logger;
+       private $handlers = array();
+       private $serviceBinding;
+       private $port;
+       private $apiMethod;
+       public function __construct($port, $serviceName, $serviceBinding, $handlers=array(), $config) {
+               
+               $this->config = $config;
+               $this->serviceName = $serviceName;
+               $this->port = $port;
+
+               $this->logger = new PPLoggingManager(__CLASS__, $this->config);
+               $this->handlers = $handlers;
+               $this->serviceBinding = $serviceBinding;
+               
+       }
+
+       public function setServiceName($serviceName) {
+               $this->serviceName = $serviceName;
+       }
+
+       public function addHandler($handler) {
+               $this->handlers[] = $handler;
+       }
+
+       public function makeRequest($apiMethod, $params, $apiUsername = null) {
+               
+               $this->apiMethod = $apiMethod;
+               if(is_string($apiUsername) || is_null($apiUsername)) {
+                       // $apiUsername is optional, if null the default account in config file is taken
+                       $credMgr = PPCredentialManager::getInstance($this->config);
+                       $apiCredential = clone($credMgr->getCredentialObject($apiUsername ));
+               } else {
+                       $apiCredential = $apiUsername; //TODO: Aargh
+               }
+           if((isset($this->config['accessToken']) && isset($this->config['tokenSecret']))) {
+                       $apiCredential->setThirdPartyAuthorization(
+                                       new PPTokenAuthorization($this->config['accessToken'], $this->config['tokenSecret']));
+               }
+
+
+               $request = new PPRequest($params, $this->serviceBinding);
+               $request->setCredential($apiCredential);
+               $httpConfig = new PPHttpConfig(null, PPHttpConfig::HTTP_POST);
+               $this->runHandlers($httpConfig, $request);
+
+               $formatter = FormatterFactory::factory($this->serviceBinding);
+               $payload = $formatter->toString($request);
+               $connection = PPConnectionManager::getInstance()->getConnection($httpConfig, $this->config);
+               $this->logger->info("Request: $payload");
+               $response = $connection->execute($payload);
+               $this->logger->info("Response: $response");
+
+               return array('request' => $payload, 'response' => $response);
+       }
+
+       private function runHandlers($httpConfig, $request) {
+       
+               $this->getOptions();
+               
+               foreach($this->handlers as $handlerClass) {
+                       $handler = new $handlerClass();
+                       $handler->handle($httpConfig, $request, $this->options);
+               }
+               $handler = new PPAuthenticationHandler();
+               $handler->handle($httpConfig, $request, $this->options);
+       }
+       
+       private function getOptions()
+       {
+               $this->options['port'] = $this->port;
+               $this->options['serviceName'] = $this->serviceName;
+               $this->options['serviceBinding'] = $this->serviceBinding;
+               $this->options['config'] = $this->config;
+               $this->options['apiMethod'] = $this->apiMethod;
+       }       
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php
new file mode 100644 (file)
index 0000000..fc6de3f
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPAPIService;
+class PPBaseService {
+
+    // SDK Name
+       protected  static $SDK_NAME = "paypal-php-sdk";
+       // SDK Version
+       protected static $SDK_VERSION = "2.1.96";
+       
+       private $serviceName;
+       private $serviceBinding;
+       private $handlers;
+       
+   /*
+    * Setters and getters for Third party authentication (Permission Services)
+    */
+       protected $accessToken;
+       protected $tokenSecret;
+       
+       protected $lastRequest;
+       protected $lastResponse;
+       
+       
+       
+       // config hash map
+       public $config;
+
+       /**
+        * Compute the value that needs to sent for the PAYPAL_REQUEST_SOURCE
+        * parameter when making API calls
+        */
+       public static function getRequestSource()
+       {
+               return str_replace(" ", "-", self::$SDK_NAME) . "-" . self::$SDK_VERSION;
+       }
+       
+
+    public function getLastRequest() {
+               return $this->lastRequest;
+       }
+    public function setLastRequest($lastRqst) {
+               $this->lastRequest = $lastRqst;
+       }
+    public function getLastResponse() {
+               return $this->lastResponse;
+       }
+    public function setLastResponse($lastRspns) {
+               $this->lastResponse = $lastRspns;
+       }
+
+       public function __construct($serviceName, $serviceBinding, $handlers=array(), $config = null) {
+               $this->serviceName = $serviceName;
+               $this->serviceBinding = $serviceBinding;
+               $this->handlers = $handlers;
+               if($config == null)
+               {
+                       $configFile = PPConfigManager::getInstance();
+                       $this->config = $configFile->getConfigHashmap();
+               }
+               else 
+               {
+                       $this->config = PPConfigManager::mergrDefaults($config);
+               }
+       }
+
+       public function getServiceName() {
+               return $this->serviceName;
+       }
+
+       /**
+        * 
+        * @param string $method - API method to call
+        * @param object $requestObject Request object 
+        * @param mixed $apiCredential - Optional API credential - can either be
+        *              a username configured in sdk_config.ini or a ICredential object
+        *      created dynamically             
+        */
+       public function call($port, $method, $requestObject, $apiUserName = NULL) {             
+               $service = new PPAPIService($port, $this->serviceName, 
+                               $this->serviceBinding, $this->handlers,$this->config);          
+               $ret = $service->makeRequest($method, $requestObject, $apiUserName);
+               $this->lastRequest = $ret['request'];
+               $this->lastResponse = $ret['response'];
+               return $this->lastResponse;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php
new file mode 100644 (file)
index 0000000..f03560e
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPConfigManager;
+use PayPal\Exception\PPConfigurationException;
+/**
+ * PPConfigManager loads the SDK configuration file and
+ * hands out appropriate config params to other classes
+ */
+
+
+class PPConfigManager {
+
+       public $config;
+       /**
+        * @var PPConfigManager
+        */
+       
+       //default config values
+       public static $defaults = array(
+               "http.ConnectionTimeOut" => "30",
+               "http.Retry" => "5",
+       );
+       
+       private static $instance;
+
+       private function __construct(){
+               if(defined('PP_CONFIG_PATH')) {
+                       $configFile = constant('PP_CONFIG_PATH') . '/sdk_config.ini';
+               } else {                
+                       $configFile = implode(DIRECTORY_SEPARATOR,
+                               array(dirname(__FILE__), "..", "config", "sdk_config.ini"));
+               }
+               $this->load($configFile);
+       }
+
+       // create singleton object for PPConfigManager
+       public static function getInstance()
+       {
+               if ( !isset(self::$instance) ) {
+                       self::$instance = new PPConfigManager();
+               }
+               return self::$instance;
+       }
+
+       //used to load the file
+       private function load($fileName) {
+
+               $this->config = @parse_ini_file($fileName);
+               if($this->config == NULL || count($this->config) == 0) {
+                       throw new PPConfigurationException("Config file $fileName not found","303");
+               }
+       }
+
+       /**
+        * simple getter for configuration params
+        * If an exact match for key is not found,
+        * does a "contains" search on the key
+        */
+       public function get($searchKey){
+
+               if(array_key_exists($searchKey, $this->config))
+               {
+                       return $this->config[$searchKey];
+               }
+               else {
+                       $arr = array();
+                       foreach ($this->config as $k => $v){
+                               if(strstr($k, $searchKey)){
+                                       $arr[$k] = $v;
+                               }
+                       }
+                       
+                       return $arr;
+               }
+
+       }
+
+       /**
+        * Utility method for handling account configuration
+        * return config key corresponding to the API userId passed in
+        *
+        * If $userId is null, returns config keys corresponding to
+        * all configured accounts
+        */
+       public function getIniPrefix($userId = null) {
+
+               if($userId == null) {
+                       $arr = array();
+                       foreach ($this->config as $key => $value) {
+                               $pos = strpos($key, '.');
+                               if(strstr($key, "acct")){
+                                       $arr[] = substr($key, 0, $pos);
+                               }
+                       }
+                       return array_unique($arr);
+               } else {
+                       $iniPrefix = array_search($userId, $this->config);
+                       $pos = strpos($iniPrefix, '.');
+                       $acct = substr($iniPrefix, 0, $pos);
+                       
+                       return $acct;
+               }
+       }
+       
+       /**
+        * returns the config file hashmap
+        * 
+        */
+       public function getConfigHashmap()
+       {
+               return $this->config;
+       }
+       
+       /**
+        * use  the default configuration if it is not passed in hashmap
+        */
+       public static function mergrDefaults($config)
+       {
+               return array_merge(PPConfigManager::$defaults, $config);
+       }
+}
+
+    
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php
new file mode 100644 (file)
index 0000000..0b4a93c
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPConnectionManager;
+use PayPal\Core\PPHttpConnection;
+class PPConnectionManager
+{
+       /**
+        * reference to singleton instance
+        * @var PPConnectionManager
+        */
+       private static $instance;
+
+       private function __construct()
+       {
+       }
+
+       public static function getInstance() {
+               if( self::$instance == null ) {
+                       self::$instance = new PPConnectionManager();
+               }
+               return self::$instance;
+       }
+
+       /**
+        * This function returns a new PPHttpConnection object
+        */
+       public function getConnection($httpConfig, $config) {
+               if(isset( $config["http.ConnectionTimeOut"] )) {
+                       $httpConfig->setHttpTimeout( $config["http.ConnectionTimeOut"] );
+               }
+               if(isset( $config["http.Proxy"] )) {
+                       $httpConfig->setHttpProxy($config["http.Proxy"] );
+               }
+               if(isset( $config["http.Retry"] )) {
+                       $retry =  $config["http.Retry"];
+                       $httpConfig->setHttpRetryCount($retry ) ;
+               }
+               
+               return new PPHttpConnection($httpConfig, $config);
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php
new file mode 100644 (file)
index 0000000..da09c92
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+namespace PayPal\Core;
+class PPConstants
+{
+    const MERCHANT_SANDBOX_SIGNATURE_ENDPOINT = "https://api-3t.sandbox.paypal.com/2.0";
+    const MERCHANT_SANDBOX_CERT_ENDPOINT = "https://api.sandbox.paypal.com/2.0";
+    const PLATFORM_SANDBOX_ENDPOINT = "https://svcs.sandbox.paypal.com/";
+    const REST_SANDBOX_ENDPOINT = "https://api.sandbox.paypal.com/";
+    const IPN_SANDBOX_ENDPOINT = "https://www.sandbox.paypal.com/cgi-bin/webscr";
+    const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect";
+
+    const MERCHANT_LIVE_SIGNATURE_ENDPOINT = "https://api-3t.paypal.com/2.0";
+    const MERCHANT_LIVE_CERT_ENDPOINT = "https://api.paypal.com/2.0";
+    const PLATFORM_LIVE_ENDPOINT = "https://svcs.paypal.com/";
+    const REST_LIVE_ENDPOINT = "https://api.paypal.com/";
+    const IPN_LIVE_ENDPOINT = "https://ipnpb.paypal.com/cgi-bin/webscr";
+    const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com/webapps/auth/protocol/openidconnect";
+}
+
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php
new file mode 100644 (file)
index 0000000..c9b1a43
--- /dev/null
@@ -0,0 +1,155 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPCredentialManager;
+use PayPal\Auth\PPSignatureCredential;
+use PayPal\Auth\PPCertificateCredential;
+use PayPal\Auth\PPSubjectAuthorization;
+use PayPal\Exception\PPInvalidCredentialException;
+use PayPal\Exception\PPMissingCredentialException;
+
+class PPCredentialManager
+{
+       private static $instance;
+       //hashmap to contain credentials for accounts.
+       private $credentialHashmap = array();
+       /**
+        * Contains the API username of the default account to use
+        * when authenticating API calls.
+        * @var string
+        */
+       private $defaultAccountName;
+       
+       /*
+        * Constructor initialize credential for multiple accounts specified in property file.
+        */
+       private function __construct($config){
+               try {
+                       $this->initCredential($config);
+               } catch (Exception $e) {
+                       $this->credentialHashmap = array();
+                       throw $e;
+               }               
+       }
+       
+       /*
+        * Create singleton instance for this class.
+        */
+       public static function getInstance($config)
+       {
+               
+                       return self::$instance = new PPCredentialManager($config);
+               
+       }
+       
+       /*
+        * Load credentials for multiple accounts, with priority given to Signature credential. 
+        */
+       private function initCredential($config){
+       //      $configMgr = PPConfigManager::getInstance();
+               $suffix = 1;
+               $prefix = "acct";
+
+       //      $credArr = $configMgr->get($prefix);
+       //      $arrayPartKeys = $configMgr->getIniPrefix();
+               
+               if(array_key_exists($prefix, $config))
+               {
+                       $credArr =  $this->config[$searchKey];
+               }
+               else {
+                       $arr = array();
+                       foreach ($config as $k => $v){
+                               if(strstr($k, $prefix)){
+                                       $arr[$k] = $v;
+                               }
+                       }
+                               
+                       $credArr =  $arr;
+               }
+               
+               $arr = array();
+               foreach ($config as $key => $value) {
+                       $pos = strpos($key, '.');
+                       if(strstr($key, "acct")){
+                               $arr[] = substr($key, 0, $pos);
+                       }
+               }
+               $arrayPartKeys =  array_unique($arr);
+               
+               if(count($arrayPartKeys) == 0)
+                       throw new PPMissingCredentialException("No valid API accounts have been configured");
+
+               $key = $prefix.$suffix;
+               while (in_array($key, $arrayPartKeys)){
+                                                       
+                       if(isset($credArr[$key.".Signature"]) 
+                                       && $credArr[$key.".Signature"] != null && $credArr[$key.".Signature"] != ""){
+                                       
+                               $userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
+                               $password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
+                               $signature = isset($credArr[$key.'.Signature']) ? $credArr[$key.'.Signature'] : "";
+                               
+                               $this->credentialHashmap[$userName] = new PPSignatureCredential($userName, $password, $signature);
+                               if (isset($credArr[$key.'.AppId'])) {                           
+                                       $this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
+                               }
+                               
+                       } elseif (isset($credArr[$key.".CertPath"]) 
+                                       && $credArr[$key.".CertPath"] != null && $credArr[$key.".CertPath"] != ""){
+                                               
+                               $userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
+                               $password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
+                               $certPassPhrase = isset($credArr[$key.'.CertKey']) ? $credArr[$key.'.CertKey'] : "";    
+                               $certPath = isset($credArr[$key.'.CertPath']) ? $credArr[$key.'.CertPath'] : "";                                
+                               
+                               $this->credentialHashmap[$userName] = new PPCertificateCredential($userName, $password, $certPath, $certPassPhrase);
+                               if (isset($credArr[$key.'.AppId'])) {
+                                       $this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
+                               }                               
+                       } elseif (isset($credArr[$key.".ClientId"]) && isset($credArr[$key.".ClientId"]) ){
+                               $userName = $key;
+                               $this->credentialHashmap[$userName] = array('clientId' => $credArr[$key.".ClientId"], 
+                                               'clientSecret' => $credArr[$key.".ClientSecret"]);
+                       }
+                       if($userName && isset($credArr[$key . ".Subject"]) && trim($credArr[$key . ".Subject"]) != "" ) {
+                               $this->credentialHashmap[$userName]->setThirdPartyAuthorization(
+                                               new PPSubjectAuthorization($credArr[$key . ".Subject"]));
+                       }
+                       
+                       if ($userName && $this->defaultAccountName == null) {
+                               if(array_key_exists($key. '.UserName', $credArr)) {
+                                       $this->defaultAccountName = $credArr[$key . '.UserName'];
+                               } else {
+                                       $this->defaultAccountName = $key;
+                               }
+                       }
+                       $suffix++;
+                       $key = $prefix.$suffix;
+               }
+
+       }
+
+       /*
+        * Obtain Credential Object based on UserId provided.
+        */
+       public function getCredentialObject($userId = null){
+               
+               if($userId == null) {                   
+                       $credObj = $this->credentialHashmap[$this->defaultAccountName];
+               } else if (array_key_exists($userId, $this->credentialHashmap)) {
+                       $credObj = $this->credentialHashmap[$userId];
+               }
+                       
+               if (empty($credObj)) {
+                       throw new PPInvalidCredentialException("Invalid userId $userId");
+               }
+               return $credObj;
+       }
+       
+       
+       public function __clone()
+       {
+               trigger_error('Clone is not allowed.', E_USER_ERROR);
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php
new file mode 100644 (file)
index 0000000..a8523bc
--- /dev/null
@@ -0,0 +1,158 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Exception\PPConfigurationException;
+class PPHttpConfig {
+
+       /**
+        * Some default options for curl
+        * These are typically overridden by PPConnectionManager
+        */
+       public static $DEFAULT_CURL_OPTS = array(
+               CURLOPT_SSLVERSION => 3,
+               CURLOPT_CONNECTTIMEOUT => 10,
+               CURLOPT_RETURNTRANSFER => TRUE,
+               CURLOPT_TIMEOUT        => 60,   // maximum number of seconds to allow cURL functions to execute
+               CURLOPT_USERAGENT      => 'PayPal-PHP-SDK',
+               CURLOPT_HTTPHEADER     => array(),
+               CURLOPT_SSL_VERIFYHOST => 2,
+               CURLOPT_SSL_VERIFYPEER => 1
+       );      
+       
+       const HEADER_SEPARATOR = ';';   
+       const HTTP_GET = 'GET';
+       const HTTP_POST = 'POST';
+
+       private $headers = array();
+
+       private $curlOptions;
+
+       private $url;
+
+       private $method;
+       /***
+        * Number of times to retry a failed HTTP call
+        */
+       private $retryCount;
+
+       /**
+        * 
+        * @param string $url
+        * @param string $method  HTTP method (GET, POST etc) defaults to POST
+        */
+       public function __construct($url=null, $method=self::HTTP_POST) {
+               $this->url = $url;
+               $this->method = $method;
+               $this->curlOptions = self::$DEFAULT_CURL_OPTS;
+       }
+       
+       public function getUrl() {
+               return $this->url;
+       }
+       
+       public function getMethod() {
+               return $this->method;
+       }
+       
+       public function getHeaders() {
+               return $this->headers;
+       }
+       
+       public function getHeader($name) {
+               if(array_key_exists($name, $this->headers)) {
+                       return $this->headers[$name];
+               }
+               return NULL;
+       }
+
+       public function setUrl($url) {
+               $this->url = $url;
+       }
+       
+       public function setHeaders(array $headers) {
+               $this->headers = $headers;
+       }
+
+       public function addHeader($name, $value, $overWrite=true) {
+               if(!array_key_exists($name, $this->headers) || $overWrite) {
+                       $this->headers[$name] = $value;
+               } else {
+                       $this->headers[$name] = $this->headers[$name] . HEADER_SEPARATOR . $value;                      
+               }
+       }
+       
+       public function removeHeader($name) {
+               unset($this->headers[$name]);
+       }
+
+       
+       
+       public function getCurlOptions() {
+               return $this->curlOptions;
+       }
+
+       public function addCurlOption($name, $value) {
+               $this->curlOptions[$name] = $value;
+       }
+
+       public function setCurlOptions($options) {
+               $this->curlOptions = $options;
+       }
+
+       
+
+       /**
+        * Set ssl parameters for certificate based client authentication
+        *
+        * @param string $certPath - path to client certificate file (PEM formatted file)
+        */
+       public function setSSLCert($certPath, $passPhrase=NULL) {               
+               $this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath);
+               if(isset($passPhrase) && trim($passPhrase) != "") {
+                       $this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase;
+               }
+       }
+
+       /**
+        * Set connection timeout in seconds
+        * @param integer $timeout
+        */
+       public function setHttpTimeout($timeout) {
+               $this->curlOptions[CURLOPT_CONNECTTIMEOUT] = $timeout;
+       }
+
+       /**
+        * Set HTTP proxy information
+        * @param string $proxy
+        * @throws PPConfigurationException
+        */
+       public function setHttpProxy($proxy) {
+               $urlParts = parse_url($proxy);
+               if($urlParts == false || !array_key_exists("host", $urlParts))
+                       throw new PPConfigurationException("Invalid proxy configuration ".$proxy);
+
+               $this->curlOptions[CURLOPT_PROXY] = $urlParts["host"];
+               if(isset($urlParts["port"]))
+                       $this->curlOptions[CURLOPT_PROXY] .=  ":" . $urlParts["port"];
+               if(isset($urlParts["user"]))
+                       $this->curlOptions[URLOPT_PROXYUSERPWD] = $urlParts["user"] . ":" . $urlParts["pass"];
+       }       
+       
+       /**
+        * @param integer $retry
+        */
+       public function setHttpRetryCount($retryCount) {
+               $this->retryCount = $retryCount;
+       }       
+
+       public function getHttpRetryCount() {
+               return $this->retryCount;
+       }
+       
+       /**
+        * Sets the User-Agent string on the HTTP request
+        * @param string $userAgentString
+        */
+       public function setUserAgent($userAgentString) {
+               $this->curlOptions[CURLOPT_USERAGENT] = $userAgentString;
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php
new file mode 100644 (file)
index 0000000..2c39520
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPLoggingManager;
+use PayPal\Exception\PPConfigurationException;
+use PayPal\Exception\PPConnectionException;
+
+/**
+ * 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
+{
+
+       private $httpConfig;
+
+       /**
+        * HTTP status codes for which a retry must be attempted
+        */
+       private static $retryCodes = array('401', '403', '404', );
+
+       private $logger;
+
+       public function __construct($httpConfig, $config)
+       {
+               if( !function_exists("curl_init") ) {
+                       throw new PPConfigurationException("Curl module is not available on this system");
+               }
+               $this->httpConfig = $httpConfig;
+               $this->logger = new PPLoggingManager(__CLASS__, $config);
+       }       
+
+       private function getHttpHeaders() {
+               
+               $ret = array();
+               foreach($this->httpConfig->getHeaders() as $k=>$v) {
+                       $ret[] = "$k: $v";
+               }
+               return $ret;
+       }
+       
+       /**
+        * Executes an HTTP request
+        *
+        * @param string $data query string OR POST content as a string
+        * @throws PPConnectionException
+        */
+       public function execute($data) {
+               $this->logger->fine("Connecting to " . $this->httpConfig->getUrl());                    
+               $this->logger->fine("Payload " . $data);
+
+               $ch = curl_init($this->httpConfig->getUrl());
+               curl_setopt_array($ch, $this->httpConfig->getCurlOptions());            
+               curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl());             
+               curl_setopt($ch, CURLOPT_HEADER, false);
+               curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());
+               
+               switch($this->httpConfig->getMethod()) {
+                       case 'POST':
+                               curl_setopt($ch, CURLOPT_POST, true);
+                               curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
+                               break;
+               }
+               if($this->httpConfig->getMethod() != NULL) {
+                       curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->httpConfig->getMethod());
+               }
+               foreach($this->getHttpHeaders() as $header) {
+                       //TODO: Strip out credentials and other secure info when logging.
+                       $this->logger->info("Adding header $header");
+               }
+               $result = curl_exec($ch);
+               if ((curl_errno($ch) == 60) && ($this->httpConfig->getMethod() != "DELETE")) {
+                       $this->logger->info("Invalid or no certificate authority found - Retrying using bundled CA certs file");
+                       curl_setopt($ch, CURLOPT_CAINFO,
+                       dirname(__FILE__) . '/cacert.pem');
+                       $result = curl_exec($ch);
+               }
+               $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+               $retries = 0;
+               if(in_array($httpStatus, self::$retryCodes) && $this->httpConfig->getHttpRetryCount() != null) {
+                       $this->logger->info("Got $httpStatus response from server. Retrying");
+
+                       do      {
+                               $result = curl_exec($ch);
+                               $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+                       } while (in_array($httpStatus, self::$retryCodes) && (++$retries < $this->httpConfig->getHttpRetryCount()) );
+               }
+               if ( curl_errno($ch) ) {
+                       $ex = new PPConnectionException($this->httpConfig->getUrl(), curl_error($ch), curl_errno($ch));
+                       curl_close($ch);
+                       throw $ex;
+               }
+
+               curl_close($ch);
+
+               if(in_array($httpStatus, self::$retryCodes)) {
+                       $ex = new PPConnectionException($this->httpConfig->getUrl() , 
+                                       "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. Retried $retries times.");
+                       $ex->setData($result);
+                       throw $ex;
+               } else if($httpStatus < 200 || $httpStatus >=300) {
+                       $ex = new PPConnectionException($this->httpConfig->getUrl() , 
+                                       "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}.");
+                       $ex->setData($result);
+                       throw $ex;
+               }
+               return $result;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php
new file mode 100644 (file)
index 0000000..cc817e3
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+namespace PayPal\Core;
+/**
+ * Simple Logging Manager.
+ * This does an error_log for now
+ * Potential frameworks to use are PEAR logger, log4php from Apache
+ */
+
+class PPLoggingLevel {
+
+       // FINE Logging Level
+       const FINE = 3;
+
+       // INFO Logging Level
+       const INFO = 2;
+
+       // WARN Logging Level
+       const WARN = 1;
+
+       // ERROR Logging Level
+       const ERROR = 0;
+}
+
+class PPLoggingManager {
+
+       // Default Logging Level
+       const DEFAULT_LOGGING_LEVEL = 0;
+
+       // Logger name
+       private $loggerName;
+
+       // Log enabled
+       private $isLoggingEnabled;
+
+       // Configured logging level
+       private $loggingLevel;
+
+       // Configured logging file
+       private $loggerFile;
+
+       public function __construct($loggerName, $config = null) {
+               $this->loggerName = $loggerName;
+               if($config == null) {
+                       $config = PPConfigManager::getInstance()->getConfigHashmap();
+               }               
+               $this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1');            
+                
+               if($this->isLoggingEnabled) {
+                       $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;
+               }
+       }
+
+       private function log($message, $level=PPLoggingLevel::INFO) {
+               if($this->isLoggingEnabled && ($level <= $this->loggingLevel)) {
+                       error_log( $this->loggerName . ": $message\n", 3, $this->loggerFile);
+               }
+       }
+
+       public function error($message) {
+               $this->log($message, PPLoggingLevel::ERROR);
+       }
+
+       public function warning($message) {
+               $this->log($message, PPLoggingLevel::WARN);
+       }
+
+       public function info($message) {
+               $this->log($message, PPLoggingLevel::INFO);
+       }
+
+       public function fine($message) {
+               $this->log($message, PPLoggingLevel::FINE);
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php
new file mode 100644 (file)
index 0000000..82be10a
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+namespace PayPal\Core;
+use PayPal\Core\PPUtils;
+/**
+ * @author 
+ */
+abstract class PPMessage
+{
+
+       /**
+        * @param string $prefix
+        * @return string
+        */
+       public function toNVPString($prefix = '')
+       {
+               $nvp = array();
+               foreach (get_object_vars($this) as $property => $defaultValue) {
+                       
+                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+                               continue;
+                       }
+
+                       if (is_object($propertyValue)) {
+                               $nvp[] = $propertyValue->toNVPString($prefix . $property . '.'); // prefix
+
+                       } elseif (is_array($defaultValue) || is_array($propertyValue)) {
+                               foreach (array_values($propertyValue) as $i => $item) {
+                                       if (!is_object($item)){
+                        $nvp[] = $prefix . $property . "($i)" . '=' . urlencode($item);
+                                       }else{
+                        $nvp[] = $item->toNVPString($prefix . $property . "($i).");
+                    }
+                               }
+
+                       } else {
+                               // Handle classes with attributes
+                               if($property == 'value' && ($anno = PPUtils::propertyAnnotations($this, $property)) != NULL && isset($anno['value']) ) {
+                                       $nvpKey = substr($prefix, 0, -1); // Remove the ending '.'
+                               } else {
+                                       $nvpKey = $prefix . $property ;
+                               }
+                               $nvp[] = $nvpKey . '=' . urlencode($propertyValue);
+                       }
+               }
+
+               return implode('&', $nvp);
+       }
+
+
+
+       /**
+        * @param array $map
+        * @param string $prefix
+        */
+       public function init(array $map = array(), $prefix = '')
+       {
+               if (empty($map)) {
+                       return;
+               }
+
+               $map = PPUtils::lowerKeys($map);
+
+               foreach (get_object_vars($this) as $property => $defaultValue) {
+                       if (array_key_exists($propKey = strtolower($prefix . $property), $map) &&
+                                       $this->isBuiltInType(($type = PPUtils::propertyType($this, $property)))){
+                               $type = PPUtils::propertyType($this, $property);                                
+                               $this->{$property} = urldecode($map[$propKey]);
+                               continue; // string
+
+                       } elseif (!$filtered = PPUtils::filterKeyPrefix($map, $propKey)) {
+                               continue; // NULL
+                       }
+               
+                       if (!class_exists($type = PPUtils::propertyType($this, $property)) && !$this->isBuiltInType($type)) {
+                               trigger_error("Class $type not found.", E_USER_NOTICE);
+                               continue; // just ignore
+                       }
+
+                       if (is_array($defaultValue) || PPUtils::isPropertyArray($this, $property)) { // array of objects                                
+                               if($this->isBuiltInType($type)) { // Array of simple types                                      
+                                       foreach($filtered as $key => $value) {
+                                               $this->{$property}[trim($key, "()")] = urldecode($value);
+                                       }
+                               } else { // Array of complex objects    
+                                       $delim = '.';                                   
+                                       for ($i = 0; $itemValues = PPUtils::filterKeyPrefix($filtered, "($i)") ;$i++) {                                 
+                                               $this->{$property}[$i] = $item = new $type();
+                                               $item->init(PPUtils::filterKeyPrefix($itemValues, "."));
+                                               if(array_key_exists("", $itemValues)) {
+                                                       $item->value = urldecode($itemValues[""]);
+                                               }
+                                       }
+                                       // Handle cases where we have a list of objects
+                                       // with just the value present and all attributes values are null 
+                                       foreach($filtered as $key => $value) {                                          
+                                               $idx = trim($key, "()");                                                
+                                               if(is_numeric($idx) && (is_null($this->{$property}) || !array_key_exists($idx, $this->{$property})) ) {
+                                                       $this->{$property}[$idx] = new $type;
+                                                       $this->{$property}[$idx]->value = urldecode($value);
+                                               }                                               
+                                       }
+                               }                               
+                       } else { // one object
+                               $this->{$property} = new $type();
+                               $this->{$property}->init(PPUtils::filterKeyPrefix($filtered, '.')); // unprefix
+                               if(array_key_exists("", $filtered)) {
+                                       $this->{$property}->value = urldecode($filtered[""]);
+                               }
+                       }
+               }
+       }
+
+       private function isBuiltInType($typeName) {
+               static $types = array('string', 'int', 'integer', 'bool', 'boolean', 'float', 'decimal', 'long', 'datetime', 'double');
+               return in_array(strtolower($typeName), $types);
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php
new file mode 100644 (file)
index 0000000..22e7f69
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+namespace PayPal\Core;
+/**
+ * Encapsulates API request information
+ *
+ */
+class PPRequest {
+       
+       /**
+        * Request Object
+        *
+        * @var object
+        */
+       private $requestObject;
+       
+       /**
+        * Optional credentials associated with
+        * the request
+        * @var ICredential
+        */
+       private $credential;
+               
+       /**
+        * Transport binding for this request.
+        * Can be NVP, SOAP etc
+        * @var string
+        */
+       private $bindingType;
+
+       /**
+        * 
+        * Holder for any binding specific info
+        * @var array
+        */
+       private $bindingInfo = array();
+       
+       public function __construct($requestObject, $bindingType) {
+               $this->requestObject = $requestObject;
+               $this->bindingType = $bindingType;
+       }
+
+       public function getRequestObject() {
+               return $this->requestObject;
+       }
+       
+       public function getBindingType() {
+               return $this->bindingType;
+       }
+       
+       public function getBindingInfo($name=NULL) {
+               if(isset($name)) {
+                       return $this->bindingInfo[$name];
+               }
+               return $this->bindingInfo;
+       }
+       
+       /**
+        * 
+        * @param string $name
+        * @param mixed $value
+        */
+       public function addBindingInfo($name, $value) {
+               $this->bindingInfo[$name] = $value;
+       }
+       
+       public function setCredential($credential) {
+               $this->credential = $credential;
+       }
+       
+       public function getCredential() {
+               return $this->credential;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php
new file mode 100644 (file)
index 0000000..3ef6d8b
--- /dev/null
@@ -0,0 +1,397 @@
+<?php
+namespace PayPal\Core;
+class PPUtils
+{
+
+       /**
+        *
+        * Convert a Name Value Pair (NVP) formatted string into
+        * an associative array taking care to urldecode array values
+        *
+        * @param string $nvpString
+        * @return array
+        */
+       public static function nvpToMap($nvpString)
+       {
+               $ret = array();
+               $params = explode("&", $nvpString);
+               foreach ($params as $p) {
+                       list($k, $v) = explode("=", $p);
+                       $ret[$k] = urldecode($v);
+               }
+               return $ret;
+       }
+
+
+
+       /**
+        * Returns true if the array contains a key like $key
+        *
+        * @param array $map
+        * @param string $key
+        * @return bool
+        */
+       public static function array_match_key($map, $key)
+       {
+               $replace = str_replace(array(
+                               '(',
+                               ')',
+                               '.'
+               ), array(
+                               '\(',
+                               '\)',
+                               '\.'
+               ), $key);
+
+               $pattern = "/$replace*/";
+
+               foreach ($map as $k => $v) {
+                       preg_match($pattern, $k, $matches);
+                       if (count($matches) > 0) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+
+
+       /**
+        * Get the local IP address. The client address is a required
+        * request parameter for some API calls
+        */
+       public static function getLocalIPAddress()
+       {
+               if (array_key_exists("SERVER_ADDR", $_SERVER)) {
+                       // SERVER_ADDR is available only if we are running the CGI SAPI
+                       return $_SERVER['SERVER_ADDR'];
+
+               } else {
+                       if (function_exists("gethostname")) {
+                               // gethostname is available only in PHP >= v5.3
+                               return gethostbyname(gethostname());
+
+                       } else {
+                               // fallback if nothing works
+                               return "127.0.0.1";
+                       }
+               }
+       }
+
+       public static function xmlToArray($xmlInput)
+       {
+               $xml = simplexml_load_string($xmlInput);
+
+               $ns = $xml->getNamespaces(true);
+               $soap = $xml->children($ns['SOAP-ENV']);
+               $getChild = $soap->Body->children();
+               $array = array();
+               $ret = PPUtils::convertXmlObjToArr($getChild, $array);
+               return $ret;
+       }
+
+
+
+       private static function convertXmlObjToArr($obj, &$arr)
+       {
+               $children = $obj->children();
+               foreach ($children as $elementName => $node) {
+                       $nextIdx = count($arr);
+                       $arr[$nextIdx] = array();
+                       $arr[$nextIdx]['name'] = strtolower((string)$elementName);
+                       $arr[$nextIdx]['attributes'] = array();
+                       $attributes = $node->attributes();
+                       foreach ($attributes as $attributeName => $attributeValue) {
+                               $attribName = strtolower(trim((string)$attributeName));
+                               $attribVal = trim((string)$attributeValue);
+                               $arr[$nextIdx]['attributes'][$attribName] = $attribVal;
+                       }
+                       $text = (string)$node;
+                       $text = trim($text);
+                       if (strlen($text) > 0) {
+                               $arr[$nextIdx]['text'] = $text;
+                       }
+                       $arr[$nextIdx]['children'] = array();
+                       PPutils::convertXmlObjToArr($node, $arr[$nextIdx]['children']);
+               }
+               return $arr;
+       }
+
+
+
+       /**
+        * Escapes invalid xml characters
+        *
+        * @param $textContent = xml data to be escaped
+        * @return string
+        */
+       public static function escapeInvalidXmlCharsRegex($textContent)
+       {
+               return htmlspecialchars($textContent, (1 | 2), 'UTF-8', false);
+       }
+
+
+
+       /**
+        * @param array $map
+        * @param string $keyPrefix
+        * @return array
+        */
+       public static function filterKeyPrefix(array $map, $keyPrefix)
+       {
+               $filtered = array();
+               foreach ($map as $key => $val) {
+                       if (($pos = stripos($key, $keyPrefix)) !== 0) {
+                               continue;
+                       }
+
+                       $filtered[substr_replace($key, '', 0, strlen($keyPrefix))] = $val;
+               }
+
+               return $filtered;
+       }
+
+
+
+       /**
+        * @var array|ReflectionProperty[]
+        */
+       private static $propertiesRefl = array();
+
+       /**
+        * @var array|string[]
+        */
+       private static $propertiesType = array();
+
+
+
+       /**
+        * @param string $class
+        * @param string $propertyName
+        * @throws RuntimeException
+        * @return string
+        */
+       public static function propertyAnnotations($class, $propertyName)
+       {
+               $class = is_object($class) ? get_class($class) : $class;
+               if (!class_exists('ReflectionProperty')) {
+                       throw new \RuntimeException("Property type of " . $class . "::{$propertyName} cannot be resolved");
+               }
+
+               if ($annotations =& self::$propertiesType[$class][$propertyName]) {
+                       return $annotations;
+               }
+
+               if (!($refl =& self::$propertiesRefl[$class][$propertyName])) {
+                       $refl = new \ReflectionProperty($class, $propertyName);
+               }
+
+               // todo: smarter regexp
+               if (!preg_match_all('~\@([^\s@\(]+)[\t ]*(?:\(?([^\n@]+)\)?)?~i', $refl->getDocComment(), $annots, PREG_PATTERN_ORDER)) {
+                       return NULL;
+               }
+               foreach ($annots[1] as $i => $annot) {
+                       $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
+               }
+
+               return $annotations;
+       }
+
+       /**
+        * @param string $class
+        * @param string $propertyName
+        * @return string
+        */
+       public static function isAttributeProperty($class, $propertyName) {
+               if (($annotations = self::propertyAnnotations($class, $property))) {
+                       return $annotations['attribute'];
+               }
+               return FALSE;
+       }
+
+       /**
+        * @param string $class
+        * @param string $propertyName
+        * @return string
+        */
+       public static function isPropertyArray($class, $propertyName) {
+               if (($annotations = self::propertyAnnotations($class, $propertyName))) {
+                       if (isset($annotations['var']) && substr($annotations['var'], -2) === '[]') {
+                               return TRUE;
+
+                       } elseif (isset($annotations['array'])) {
+                               return TRUE;
+                       }
+               }
+
+               return FALSE;
+       }
+
+
+
+       /**
+        * @param string $class
+        * @param string $propertyName
+        * @throws RuntimeException
+        * @return string
+        */
+       public static function propertyType($class, $propertyName)
+       {
+               if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['var'])) {
+                       if (substr($annotations['var'], -2) === '[]') {
+                               return substr($annotations['var'], 0, -2);
+                       }
+
+                       return $annotations['var'];
+               }
+
+               return 'string';
+       }
+
+       /**
+        * @param object $object
+        * @return array
+        */
+       public static function objectProperties($object)
+       {
+               $props = array();
+               foreach (get_object_vars($object) as $property => $default) {
+                       $annotations = self::propertyAnnotations($object, $property);
+                       if (isset($annotations['name'])) {
+                               $props[strtolower($annotations['name'])] = $property;
+                       }
+
+                       $props[strtolower($property)] = $property;
+               }
+
+               return $props;
+       }
+
+
+
+       /**
+        * @param array $array
+        * @return array
+        */
+       public static function lowerKeys(array $array)
+       {
+               $ret = array();
+               foreach ($array as $key => $value) {
+                       $ret[strtolower($key)] = $value;
+               }
+
+               return $ret;
+       }
+
+}
+
+
+
+/**
+ * XMLToArray Generator Class
+ *
+ * @author  :  MA Razzaque Rupom <rupom_315@yahoo.com>, <rupom.bd@gmail.com>
+ *             Moderator, phpResource (LINK1http://groups.yahoo.com/group/phpresource/LINK1)
+ *             URL: LINK2http://www.rupom.infoLINK2
+ * @version :  1.0
+ * @date       06/05/2006
+ * Purpose  : Creating Hierarchical Array from XML Data
+ * Released : Under GPL
+ */
+class XmlToArray
+{
+
+       var $xml = '';
+
+
+
+       /**
+        * Default Constructor
+        *
+        * @param $xml = xml data
+        * @return none
+        */
+       function XmlToArray($xml)
+       {
+               $this->xml = $xml;
+       }
+
+
+
+       /**
+        * _struct_to_array($values, &$i)
+        *
+        * This is adds the contents of the return xml into the array for easier processing.
+        * Recursive, Static
+        *
+        * @access    private
+        * @param    array  $values this is the xml data in an array
+        * @param    int    $i  this is the current location in the array
+        * @return    Array
+        */
+       function _struct_to_array($values, &$i)
+       {
+               $child = array();
+               if (isset($values[$i]['value'])) {
+                       array_push($child, $values[$i]['value']);
+               }
+
+               while ($i++ < count($values)) {
+                       switch ($values[$i]['type']) {
+                               case 'cdata':
+                                       array_push($child, $values[$i]['value']);
+                                       break;
+
+                               case 'complete':
+                                       $name = $values[$i]['tag'];
+                                       if (!empty($name)) {
+                                               $child[$name] = ($values[$i]['value']) ? ($values[$i]['value']) : '';
+                                               if (isset($values[$i]['attributes'])) {
+                                                       $child[$name] = $values[$i]['attributes'];
+                                               }
+                                       }
+                                       break;
+
+                               case 'open':
+                                       $name = $values[$i]['tag'];
+                                       $size = isset($child[$name]) ? sizeof($child[$name]) : 0;
+                                       $child[$name][$size] = $this->_struct_to_array($values, $i);
+                                       break;
+
+                               case 'close':
+                                       return $child;
+                                       break;
+                       }
+               }
+               return $child;
+       }
+
+
+
+       /**
+        * createArray($data)
+        *
+        * This is adds the contents of the return xml into the array for easier processing.
+        *
+        * @access    public
+        * @return    Array
+        */
+       function createArray()
+       {
+               $xml = $this->xml;
+               $values = array();
+               $index = array();
+               $array = array();
+               $parser = xml_parser_create();
+               xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
+               xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+               xml_parse_into_struct($parser, $xml, $values, $index);
+               xml_parser_free($parser);
+               $i = 0;
+               $name = $values[$i]['tag'];
+               $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';
+               $array[$name] = $this->_struct_to_array($values, $i);
+               return $array;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php
new file mode 100644 (file)
index 0000000..123bf4b
--- /dev/null
@@ -0,0 +1,186 @@
+<?php
+namespace PayPal\Core;
+/**
+ * @author 
+ */
+abstract class PPXmlMessage
+{
+
+       /**
+        * @return string
+        */
+       public function toSOAP()
+       {
+               return $this->toXMLString();
+       }
+
+
+
+       /**
+        * @return string
+        */
+       public function toXMLString()
+       {
+               if (count($properties = get_object_vars($this)) >= 2 && array_key_exists('value', $properties)) {
+                       $attributes = array();
+                       foreach (array_keys($properties) as $property) {
+                               if ($property === 'value') continue;
+                               if (($annots = PPUtils::propertyAnnotations($this, $property)) && isset($annots['attribute'])) {
+                                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+                                               $attributes[] = NULL;
+                                               continue;
+                                       }
+
+                                       $attributes[] = $property . '="' . PPUtils::escapeInvalidXmlCharsRegex($propertyValue) . '"';
+                               }
+                       }
+
+                       if (count($attributes)) {
+                               return implode(' ', $attributes) . '>' . PPUtils::escapeInvalidXmlCharsRegex($this->value);
+                       }
+               }
+
+               $xml = array();
+               foreach ($properties as $property => $defaultValue) {
+                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
+                               continue;
+                       }
+
+                       if (is_array($defaultValue) || is_array($propertyValue)) {
+                               foreach ($propertyValue as $item) {
+                                       if (!is_object($item)) {
+                                               $xml[] = $this->buildProperty($property, $item);
+                                       }else{
+                                               $xml[] = $this->buildProperty($property, $item);
+                                       }
+                               }
+
+                       } else {
+                               $xml[] = $this->buildProperty($property, $propertyValue);
+                       }
+               }
+
+               return implode($xml);
+       }
+
+
+
+       /**
+        * @param string $property
+        * @param PPXmlMessage|string $value
+        * @param string $namespace
+        * @return string
+        */
+       private function buildProperty($property, $value, $namespace = 'ebl')
+       {
+               $annotations = PPUtils::propertyAnnotations($this, $property);
+               if (!empty($annotations['namespace'])) {
+                       $namespace = $annotations['namespace'];
+               }
+               if (!empty($annotations['name'])) {
+                       $property = $annotations['name'];
+               }
+
+               $el = '<' . $namespace . ':' . $property;
+               if (!is_object($value)) {
+                       $el .= '>' . PPUtils::escapeInvalidXmlCharsRegex($value);
+
+               } else {
+                       if (substr($value = $value->toXMLString(), 0, 1) === '<' || $value=='') {
+                               $el .= '>' . $value;
+
+                       } else {
+                               $el .= ' ' . $value;
+                       }
+               }
+
+               return $el . '</' . $namespace . ':' . $property . '>';
+       }
+
+
+
+       /**
+        * @param array $map
+        * @param string $prefix
+        */
+       public function init(array $map = array(), $prefix = '')
+       {
+               if (empty($map)) {
+                       return;
+               }
+
+               if (($first = reset($map)) && !is_array($first) && !is_numeric(key($map))) {
+                       parent::init($map, $prefix);
+                       return;
+               }
+
+               $propertiesMap = PPUtils::objectProperties($this);
+               $arrayCtr = array();            
+               foreach ($map as $element) {
+               
+                       if (empty($element) || empty($element['name'])) {
+                               continue;
+
+                       } elseif (!array_key_exists($property = strtolower($element['name']), $propertiesMap)) {
+                               if (!preg_match('~^(.+)[\[\(](\d+)[\]\)]$~', $property, $m)) {
+                                       continue;
+                               }
+
+                               $element['name'] = $m[1];
+                               $element['num'] = $m[2];
+                       }
+                       $element['name'] = $propertiesMap[strtolower($element['name'])];
+                       if(PPUtils::isPropertyArray($this, $element['name'])) {                         
+                               $arrayCtr[$element['name']] = isset($arrayCtr[$element['name']]) ? ($arrayCtr[$element['name']]+1) : 0;                         
+                               $element['num'] = $arrayCtr[$element['name']];
+                       } 
+                       if (!empty($element["attributes"]) && is_array($element["attributes"])) {
+                               foreach ($element["attributes"] as $key => $val) {
+                                       $element["children"][] = array(
+                                               'name' => $key,
+                                               'text' => $val,
+                                       );
+                               }
+
+                               if (isset($element['text'])) {
+                                       $element["children"][] = array(
+                                               'name' => 'value',
+                                               'text' => $element['text'],
+                                       );
+                               }
+
+                               $this->fillRelation($element['name'], $element);
+
+                       } elseif (!empty($element['text'])) {
+                               $this->{$element['name']} = $element['text'];
+
+                       } elseif (!empty($element["children"]) && is_array($element["children"])) {
+                               $this->fillRelation($element['name'], $element);
+                       }
+               }               
+       }
+
+
+
+       /**
+        * @param string $property
+        * @param array $element
+        */
+       private function fillRelation($property, array $element)
+       {
+               if (!class_exists($type = PPUtils::propertyType($this, $property))) {
+                       trigger_error("Class $type not found.", E_USER_NOTICE);
+                       return; // just ignore
+               }
+
+               if (isset($element['num'])) { // array of objects
+                       $this->{$property}[$element['num']] = $item = new $type();
+                       $item->init($element['children']);
+
+               } else {
+                       $this->{$property} = new $type();
+                       $this->{$property}->init($element["children"]);
+               }
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem
new file mode 100644 (file)
index 0000000..1202c20
--- /dev/null
@@ -0,0 +1,171 @@
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
+hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
+TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
+WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
+Tqj/ZA1k
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G2
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
+MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
+biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
+dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
+FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
+lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
+MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
+1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
+Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
+-----END CERTIFICATE-----
+
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
+EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
+cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
+EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
+055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Verisign Class 4 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
+tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
+8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
+Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
+Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
+mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
+fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
+RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
+UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
+-----END CERTIFICATE-----
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
+biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
+dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
+j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
+Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
+fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
+Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
+SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
+KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
+Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
+ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+Verisign Class 3 Public Primary Certification Authority
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
+FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
+XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
+IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
+A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
+f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
+hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky
+CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX
+bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/
+D/xwzoiQ
+-----END CERTIFICATE-----
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php
new file mode 100644 (file)
index 0000000..e10ea33
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+namespace PayPal\Exception;
+/* Generic exception class
+ */
+class OAuthException extends \Exception {
+       // pass
+}
+?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php
new file mode 100644 (file)
index 0000000..60dfa57
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+namespace PayPal\Exception;
+class PPConfigurationException extends \Exception {
+
+       public function __construct($message=null,$code=0) {
+               parent::__construct($message, $code);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php
new file mode 100644 (file)
index 0000000..d0a0bf3
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+namespace PayPal\Exception;
+class PPConnectionException extends \Exception
+{
+       /**
+        * The url that was being connected to when the exception occured
+        * @var string
+        */
+       private $url;
+       
+       /**
+        * Any response data that was returned by the server
+        * @var string
+        */
+       private $data;
+
+       public function __construct($url, $message, $code = 0) {                
+               parent::__construct($message, $code);
+               $this->url = $url;              
+       }
+       
+       public function setData($data) {
+               $this->data = $data;
+       }
+       
+       public function getData() {
+               return $this->data;
+       }
+       
+       public function getUrl() {
+               return $this->url;
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php
new file mode 100644 (file)
index 0000000..c492173
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+namespace PayPal\Exception;
+
+class PPInvalidCredentialException extends \Exception{
+
+       public function __construct($message = null, $code = 0) {
+               parent::__construct($message, $code);
+       }
+       
+       public function errorMessage()
+       {
+               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+               .': <b>'.$this->getMessage().'</b>';
+               return $errorMsg;
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php
new file mode 100644 (file)
index 0000000..a33ae8f
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+namespace PayPal\Exception;
+
+class PPMissingCredentialException extends \Exception{
+
+       public function __construct($message = null, $code = 0) {
+               parent::__construct($message, $code);
+       }
+
+       public function errorMessage()
+       {
+               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+               .': <b>'.$this->getMessage().'</b>';
+
+               return $errorMsg;
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php
new file mode 100644 (file)
index 0000000..616db00
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+namespace PayPal\Exception;
+class PPTransformerException extends \Exception{
+
+       public function __construct($message = null, $code = 0) {
+               parent::__construct($message, $code);
+       }
+
+       public function errorMessage()
+       {
+               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
+               .': <b>'.$this->getMessage().'</b>';
+
+               return $errorMsg;
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php
new file mode 100644 (file)
index 0000000..9c26f46
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+namespace PayPal\Formatter;
+class FormatterFactory {
+       public static function factory($bindingType) {
+               switch ($bindingType) {
+                       case 'NV':
+                               return new PPNVPFormatter();
+                               break;
+                       case 'SOAP':
+                               return new PPSOAPFormatter();
+                               break;
+                       default:
+                               throw new InvalidArgumentException("Invalid value for bindingType. You passed $bindingType");   
+               }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php
new file mode 100644 (file)
index 0000000..28e19b7
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+namespace PayPal\Formatter;
+/**
+ * Interface for all classes that format objects to
+ * and from a on-wire representation
+ * 
+ * For every new payload format, write a new formatter
+ * class that implements this interface
+ *
+ */
+interface IPPFormatter {
+       
+       /**
+        * 
+        * @param PPRequest $request The request to format
+        * @param array $options Any formatter specific options 
+        *   to be passed in 
+        */
+       public function toString($request, $options=array());
+       
+       public function toObject($string, $options=array());
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php
new file mode 100644 (file)
index 0000000..6a5a586
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+namespace PayPal\Formatter;
+class PPNVPFormatter implements IPPFormatter {
+       
+       public function toString($request, $options=array()) {          
+               return $request->getRequestObject()->toNVPString();
+       }
+       
+       public function toObject($string, $options=array()) {
+               throw new BadMethodCallException("Unimplemented");
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php
new file mode 100644 (file)
index 0000000..1c2920b
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+namespace PayPal\Formatter;
+class PPSOAPFormatter implements IPPFormatter {
+       
+       private static $SOAP_NAMESPACE = ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ';
+       
+       public function toString($request, $options=array()) {
+                               
+               $customNamespace = ( $request->getBindingInfo('namespace') != null ) ?  $request->getBindingInfo('namespace') : "";
+               $soapEnvelope = '<soapenv:Envelope ' . self::$SOAP_NAMESPACE . " $customNamespace >";
+
+               $soapHeader = '<soapenv:Header>';
+               if($request->getBindingInfo('securityHeader') != null) {
+                       $soapHeader .= $request->getBindingInfo('securityHeader');
+               }               
+               $soapHeader .= '</soapenv:Header>';
+                               
+               $soapBody = '<soapenv:Body>';
+               $soapBody .= $request->getRequestObject()->toXMLString();
+               $soapBody .= '</soapenv:Body>';
+               
+               return $soapEnvelope . $soapHeader . $soapBody . '</soapenv:Envelope>';
+       }
+       
+       public function toObject($string, $options=array()) {
+               throw new BadMethodCallException("Unimplemented");
+       }       
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php
new file mode 100644 (file)
index 0000000..42b4216
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+namespace PayPal\Handler;
+interface IPPHandler {
+       /**
+        * 
+        * @param PPHttpConfig $httpConfig
+        * @param PPRequest $request 
+        */
+       public function handle($httpConfig, $request, $options);
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php
new file mode 100644 (file)
index 0000000..427487f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Auth\PPSignatureCredential;
+use PayPal\Auth\PPCertificateCredential;
+use PayPal\Auth\PPTokenAuthorization;
+use PayPal\Auth\Oauth\AuthSignature;
+use PayPal\Handler\IPPHandler;
+use PayPal\Handler\PPSignatureAuthHandler;
+use PayPal\Handler\PPCertificateAuthHandler;
+use PayPal\Exception\PPInvalidCredentialException;
+
+
+class PPAuthenticationHandler implements IPPHandler {  
+       
+       public function handle($httpConfig, $request, $options) {
+               $credential = $request->getCredential();
+               if(isset($credential)) {
+                       $thirdPartyAuth = $credential->getThirdPartyAuthorization();
+                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+                               $authSignature = AuthSignature::generateFullAuthString($credential->getUsername(), $credential->getPassword(), $thirdPartyAuth->getAccessToken(), $thirdPartyAuth->getTokenSecret(), $httpConfig->getMethod(), $httpConfig->getUrl());
+                               if($options['port'] == 'PayPalAPI' || $options['port'] == 'PayPalAPIAA') {
+                                       $httpConfig->addHeader('X-PP-AUTHORIZATION', $authSignature);
+                               }
+                               else {
+                                       $httpConfig->addHeader('X-PAYPAL-AUTHORIZATION', $authSignature);
+                               }
+                       }
+                       if($credential instanceof PPSignatureCredential) {
+                               $handler = new PPSignatureAuthHandler($credential);
+                       } else if($credential instanceof PPCertificateCredential) {
+                               $handler = new PPCertificateAuthHandler($credential);
+                       } else {
+                               throw new PPInvalidCredentialException();
+                       }
+                       $handler->handle($httpConfig, $request, $options);
+               }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php
new file mode 100644 (file)
index 0000000..4b24cba
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Auth\PPTokenAuthorization;
+use PayPal\Auth\PPSubjectAuthorization;
+use PayPal\Auth\Oauth\AuthSignature;
+use PayPal\Handler\IPPHandler;
+class PPCertificateAuthHandler implements IPPHandler {
+
+       public function handle($httpConfig, $request, $options) {
+
+               $credential = $request->getCredential();
+               if(!isset($credential)) {
+                       return;
+               }
+               
+               $httpConfig->setSSLCert($credential->getCertificatePath(), $credential->getCertificatePassPhrase());
+               $thirdPartyAuth = $credential->getThirdPartyAuthorization();
+       
+               switch($request->getBindingType()) {
+                       case 'NV':
+                               if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
+                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
+                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());                                       
+                                       if($thirdPartyAuth) {
+                                               $httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
+                                       }
+                               }
+                               break;
+                       case 'SOAP':
+                               if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+                                       $securityHeader = '<ns:RequesterCredentials/>';
+                               } else {
+                                       $securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
+                                       $securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
+                                       $securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';                                   
+                                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
+                                               $securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
+                                       }
+                                       $securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
+                                       $request->addBindingInfo('securityHeader' , $securityHeader);
+                               }
+                               break;  
+               }                               
+       }
+
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php
new file mode 100644 (file)
index 0000000..51c1e0e
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Handler\IPPHandler;
+use PayPal\Core\PPUtils;
+use PayPal\Core\PPBaseService;
+class PPGenericServiceHandler implements IPPHandler {
+
+       public function handle($httpConfig, $request, $options) {
+               $httpConfig->addHeader('X-PAYPAL-REQUEST-DATA-FORMAT', $request->getBindingType());
+               $httpConfig->addHeader('X-PAYPAL-RESPONSE-DATA-FORMAT', $request->getBindingType());
+               $httpConfig->addHeader('X-PAYPAL-DEVICE-IPADDRESS', PPUtils::getLocalIPAddress());
+               $httpConfig->addHeader('X-PAYPAL-REQUEST-SOURCE', PPBaseService::getRequestSource());
+                       if(isset($options['config']['service.SandboxEmailAddress']))
+                       {
+                               $httpConfig->addHeader('X-PAYPAL-SANDBOX-EMAIL-ADDRESS', $options['config']['service.SandboxEmailAddress']);
+                       }
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php
new file mode 100644 (file)
index 0000000..8f56366
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Exception\PPConfigurationException;
+use PayPal\Auth\PPSignatureCredential;
+use PayPal\Auth\PPCertificateCredential;
+use PayPal\Core\PPConstants;
+class PPMerchantServiceHandler extends PPGenericServiceHandler {
+       private $endpoint;
+       private $config;
+       public function handle($httpConfig, $request, $options) {
+               parent::handle($httpConfig, $request, $options);
+               $this->config = $options['config'];
+               $credential = $request->getCredential();
+               if($options['port'] != null && isset($this->config['service.EndPoint.'.$options['port']]))
+               {
+                       $this->endpoint = $this->config['service.EndPoint.'.$options['port']];
+               }
+               // for backward compatibilty (for those who are using old config files with 'service.EndPoint')
+               else if (isset($this->config['service.EndPoint']))
+               {
+                       $this->endpoint = $this->config['service.EndPoint'];
+               }
+               else if (isset($this->config['mode']))
+               {
+                       if(strtoupper($this->config['mode']) == 'SANDBOX')
+                       {
+                               if($credential instanceof PPSignatureCredential)
+                               {
+                                       $this->endpoint = PPConstants::MERCHANT_SANDBOX_SIGNATURE_ENDPOINT;
+                               }
+                               else if($credential instanceof PPCertificateCredential)
+                               {
+                                       $this->endpoint = PPConstants::MERCHANT_SANDBOX_CERT_ENDPOINT;
+                               }
+                       }
+                       else if(strtoupper($this->config['mode']) == 'LIVE')
+                       {
+                       if($credential instanceof PPSignatureCredential)
+                               {
+                                       $this->endpoint = PPConstants::MERCHANT_LIVE_SIGNATURE_ENDPOINT;
+                               }
+                               else if($credential instanceof PPCertificateCredential)
+                               {
+                                       $this->endpoint = PPConstants::MERCHANT_LIVE_CERT_ENDPOINT;
+                               }
+                       }
+               }
+               else
+               {
+                       throw new PPConfigurationException('endpoint Not Set');
+               }
+               
+               if($options['serviceBinding'] == 'SOAP' )
+               {
+                       $httpConfig->setUrl($this->endpoint);
+               }
+               else 
+               {
+                       throw new PPConfigurationException('expecting service binding to be SOAP');
+               }
+               
+               $request->addBindingInfo("namespace", "xmlns:ns=\"urn:ebay:api:PayPalAPI\" xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\" xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\" xmlns:ed=\"urn:ebay:apis:EnhancedDataTypes\"");
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php
new file mode 100644 (file)
index 0000000..b66ec5e
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Exception\PPConfigurationException;
+use PayPal\Core\PPConstants;
+class PPOpenIdHandler implements IPPHandler {
+       
+       private $apiContext;
+       
+       private static $sdkName = "openid-sdk-php";     
+       private static $sdkVersion = "1.4.0";
+       
+       public function __construct($apiContext) {
+               $this->apiContext = $apiContext;
+       }
+
+       public function handle($httpConfig, $request, $options) {
+
+               $config = $this->apiContext->getConfig();
+               $httpConfig->setUrl(
+                       rtrim(trim($this->_getEndpoint($config)), '/') . 
+                               (isset($options['path']) ? $options['path'] : '')
+               );
+               
+               if(!array_key_exists("Authorization", $httpConfig->getHeaders())) {                     
+                       $auth = base64_encode($config['acct1.ClientId'] . ':' . $config['acct1.ClientSecret']);
+                       $httpConfig->addHeader("Authorization", "Basic $auth");
+               }
+               if(!array_key_exists("User-Agent", $httpConfig->getHeaders())) {
+                       $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(self::$sdkName, self::$sdkVersion));
+               }
+       }
+       
+       private function _getEndpoint($config) {
+               if (isset($config['openid.EndPoint'])) {
+                       return $config['openid.EndPoint'];
+               } else if (isset($config['service.EndPoint'])) {
+                       return $config['service.EndPoint'];
+               } else if (isset($config['mode'])) {
+                       switch (strtoupper($config['mode'])) {
+                               case 'SANDBOX':
+                                       return PPConstants::REST_SANDBOX_ENDPOINT;
+                               case 'LIVE':
+                                       return PPConstants::REST_LIVE_ENDPOINT;
+                               default:
+                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');
+                       }
+               } else {
+                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');
+               }
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php
new file mode 100644 (file)
index 0000000..7b3c50e
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Core\PPConstants;
+use PayPal\Handler\PPGenericServiceHandler;
+use PayPal\Exception\PPConfigurationException;
+
+
+class PPPlatformServiceHandler extends PPGenericServiceHandler {
+       private $endpoint;
+       private $config;
+       public function handle($httpConfig, $request, $options) {
+               parent::handle($httpConfig, $request, $options);
+               $this->config = $options['config'];
+               $credential = $request->getCredential();
+               //TODO: Assuming existence of getApplicationId
+               if($credential && $credential->getApplicationId() != NULL) {
+                       $httpConfig->addHeader('X-PAYPAL-APPLICATION-ID', $credential->getApplicationId());
+               }
+               if($options['port'] != null && isset($this->config['service.EndPoint.'.$options['port']]))
+               {
+                       $endpnt = 'service.EndPoint.'.$options['port']; 
+                       $this->endpoint = $this->config[$endpnt];
+               }
+               // for backward compatibilty (for those who are using old config files with 'service.EndPoint')
+               else if (isset($this->config['service.EndPoint']))
+               {
+                       $this->endpoint = $this->config['service.EndPoint'];
+               }
+               else if (isset($this->config['mode']))
+               {
+                       if(strtoupper($this->config['mode']) == 'SANDBOX')
+                       {
+                               $this->endpoint = PPConstants::PLATFORM_SANDBOX_ENDPOINT;
+                       }
+                       else if(strtoupper($this->config['mode']) == 'LIVE')
+                       {
+                               $this->endpoint = PPConstants::PLATFORM_LIVE_ENDPOINT;
+                       }
+               }
+               else
+               {
+                       throw new PPConfigurationException('endpoint Not Set');
+               }
+               $httpConfig->setUrl($this->endpoint . $options['serviceName'] . '/' .  $options['apiMethod']);
+       
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php
new file mode 100644 (file)
index 0000000..428d5e4
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+namespace PayPal\Handler;
+use PayPal\Auth\PPTokenAuthorization;
+use PayPal\Auth\PPSubjectAuthorization;
+use PayPal\Auth\Oauth\AuthSignature;
+use PayPal\Core\PPConstants;
+use PayPal\Handler\IPPHandler;
+
+class PPSignatureAuthHandler implements IPPHandler {
+               
+       public function handle($httpConfig, $request, $options) {
+               
+               $credential = $request->getCredential();
+               if(!isset($credential)) {
+                       return;
+               }               
+               $thirdPartyAuth = $credential->getThirdPartyAuthorization();
+
+               switch($request->getBindingType()) {
+                       case 'NV':
+                               if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
+                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
+                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());
+                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-SIGNATURE', $credential->getSignature());
+                                       if($thirdPartyAuth) {
+                                               $httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
+                                       }
+                               }
+                               break;
+                       case 'SOAP':
+                               if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
+                                       $request->addBindingInfo('securityHeader' , '<ns:RequesterCredentials/>');
+                               } else {
+                                       $securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
+                                       $securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
+                                       $securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';
+                                       $securityHeader .= '<ebl:Signature>' . $credential->getSignature() . '</ebl:Signature>';                                        
+                                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
+                                               $securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
+                                       }
+                                       $securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
+                                       $request->addBindingInfo('securityHeader' , $securityHeader);                                   
+                               }
+                               break;
+               }
+       }
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php
new file mode 100644 (file)
index 0000000..ffb2383
--- /dev/null
@@ -0,0 +1,172 @@
+<?php
+namespace PayPal\IPN;
+use PayPal\Core\PPHttpConfig;
+use PayPal\Exception\PPConfigurationException;
+use PayPal\Core\PPConfigManager;
+use PayPal\Core\PPConstants;
+use PayPal\Core\PPConnectionManager;
+/**
+ *
+ *
+ */
+class PPIPNMessage {
+
+       const IPN_CMD = 'cmd=_notify-validate';
+
+       /*
+        *@var boolian
+       *
+       */
+       private $isIpnVerified;
+
+       /*
+        *@var config
+       *
+       */
+       private $config;
+       /**
+        *
+        * @var array
+        */
+       private $ipnData = array();
+
+       /**
+        *
+        * @param string $postData OPTIONAL post data. If null,
+        *                              the class automatically reads incoming POST data
+        *                              from the input stream
+       */
+       public function __construct($postData='', $config = null) {
+               if($config == null)
+               {
+                       $conf = PPConfigManager::getInstance();
+                       $this->config = $conf->config;
+               }
+               else
+               {
+                       $this->config = $config;
+               }
+               if($postData == '') {
+                       // reading posted data from directly from $_POST may causes serialization issues with array data in POST
+                       // reading raw POST data from input stream instead.
+                       $postData = file_get_contents('php://input');
+               }
+
+               $rawPostArray = explode('&', $postData);
+               foreach ($rawPostArray as $keyValue) {
+                       $keyValue = explode ('=', $keyValue);
+                       if (count($keyValue) == 2)
+                               $this->ipnData[$keyValue[0]] = urldecode($keyValue[1]);
+               }
+               //var_dump($this->ipnData);
+       }
+
+       /**
+        * Returns a hashmap of raw IPN data
+        *
+        * @return array
+        */
+       public function getRawData() {
+               return $this->ipnData;
+       }
+
+       /**
+        * Validates a IPN message
+        *
+        * @return boolean
+        */
+       public function validate() {
+               if(isset($this->isIpnVerified))
+               {
+                       return $this->isIpnVerified;
+               }
+               else
+               {
+                       $request = self::IPN_CMD;
+                       if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {
+                               $get_magic_quotes_exists = true;
+                       } else {
+                               $get_magic_quotes_exists = false;
+                       }
+                       foreach ($this->ipnData as $key => $value) {
+                               if($get_magic_quotes_exists) {
+                                       $value = urlencode(stripslashes($value));
+                               } else {
+                                       $value = urlencode($value);
+                               }
+                               $request .= "&$key=$value";
+                       }
+                               
+                       $httpConfig = new PPHttpConfig($this->setEndpoint());
+                       $httpConfig->addCurlOption(CURLOPT_FORBID_REUSE, 1);
+                       $httpConfig->addCurlOption(CURLOPT_HTTPHEADER, array('Connection: Close'));
+
+                       $connection = PPConnectionManager::getInstance()->getConnection($httpConfig, $this->config);
+                       $response = $connection->execute($request);
+                       if($response == 'VERIFIED') {
+                               $this->isIpnVerified = true;
+                               return true;
+                       }
+                       $this->isIpnVerified = false;
+                       return false; // value is 'INVALID'
+               }
+       }
+
+       /**
+        * Returns the transaction id for which
+        * this IPN was generated, if one is available
+        *
+        * @return string
+        */
+       public function getTransactionId() {
+               if(isset($this->ipnData['txn_id'])) {
+                       return $this->ipnData['txn_id'];
+               } else if(isset($this->ipnData['transaction[0].id'])) {
+                       $idx = 0;
+                       do {
+                               $transId[] =  $this->ipnData["transaction[$idx].id"];
+                               $idx++;
+                       } while(isset($this->ipnData["transaction[$idx].id"]));
+                       return $transId;
+               }
+       }
+
+       /**
+        * Returns the transaction type for which
+        * this IPN was generated
+        *
+        * @return string
+        */
+       public function getTransactionType() {
+               return $this->ipnData['transaction_type'];
+       }
+       
+       private function setEndpoint()
+       {
+               if(isset($this->config['service.EndPoint.IPN']))
+               {
+                       $url = $this->config['service.EndPoint.IPN'];
+               }
+               else if(isset($this->config['mode']))
+               {
+                       if(strtoupper($this->config['mode']) == 'SANDBOX')
+                       {
+                               $url = PPConstants::IPN_SANDBOX_ENDPOINT;
+                       }
+                       else if (strtoupper($this->config['mode']) == 'LIVE')
+                       {
+                               $url = PPConstants::IPN_LIVE_ENDPOINT;
+                       }
+                       else
+                       {
+                               throw new PPConfigurationException('mode should be LIVE or SANDBOX');
+                       }
+               }
+               else
+               {
+                       throw new PPConfigurationException('No COnfig file found');
+               }
+               return $url;
+       }
+
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php
new file mode 100644 (file)
index 0000000..cb8910e
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+namespace PayPal\Transport;
+use PayPal\Core\PPLoggingManager;
+use PayPal\Core\PPHttpConfig;
+use PayPal\Core\PPHttpConnection;
+class PPRestCall {
+
+       
+       /**
+        * 
+        * @var PPLoggingManager logger interface
+        */
+       private $logger;
+       
+       private $apiContext;
+
+       public function __construct($apiContext) {
+               $this->apiContext = $apiContext;
+               $this->logger = new PPLoggingManager(__CLASS__, $apiContext->getConfig());
+       }
+
+       /**
+        * @param array $handlers array of handlers
+        * @param string $path   Resource path relative to base service endpoint
+        * @param string $method HTTP method - one of GET, POST, PUT, DELETE, PATCH etc
+        * @param string $data   Request payload
+        * @param array $headers HTTP headers
+        */
+       public function execute($handlers, $path, $method, $data='', $headers=array()) {
+
+               $config = $this->apiContext->getConfig();               
+               $httpConfig = new PPHttpConfig(null, $method);
+               $httpConfig->setHeaders($headers + 
+                       array(
+                               'Content-Type' => 'application/json'
+                       )       
+               );
+               
+               foreach($handlers as $handler) {
+                       $handler = new $handler($this->apiContext);
+                       $handler->handle($httpConfig, $data, array('path' => $path));
+               }
+               $connection = new PPHttpConnection($httpConfig, $config);
+               $response = $connection->execute($data);
+               $this->logger->fine($response);
+               
+               return $response;
+       }
+       
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php
new file mode 100644 (file)
index 0000000..87475c4
--- /dev/null
@@ -0,0 +1,39 @@
+<?php 
+use PayPal\Auth\Openid\PPOpenIdAddress;
+/**
+ * Test class for PPOpenIdAddress.
+ *
+ */
+class PPOpenIdAddressTest extends \PHPUnit_Framework_TestCase {
+       
+       public $addr;
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp() {
+               $this->addr = new PPOpenIdAddress();
+               $this->addr->setCountry("US")->setLocality("San Jose")
+               ->setPostalCode("95112")->setRegion("CA")
+               ->setStreetAddress("1, North 1'st street");
+       }
+       
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+       
+       /**
+        * @test
+        */
+       public function testSerializationDeserialization() {                            
+               $addrCopy = new PPOpenIdAddress();
+               $addrCopy->fromJson($this->addr->toJson());
+               
+               $this->assertEquals($this->addr, $addrCopy);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php
new file mode 100644 (file)
index 0000000..46e84d1
--- /dev/null
@@ -0,0 +1,84 @@
+<?php
+use PayPal\Common\PPApiContext;
+use PayPal\Auth\Openid\PPOpenIdSession;
+/**
+ * Test class for PPOpenIdSession.
+ *
+ */
+class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase {
+       
+       private $context;
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+               $this->context = new PPApiContext(
+                       array(
+                               'acct1.ClientId' => 'DummyId',
+                               'acct1.ClientSecret' => 'A8VERY8SECRET8VALUE0',
+                               'mode' => 'live'
+                       )
+               );
+       }
+       
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+       
+
+       /**
+        * @test
+        */
+       public function testLoginUrlForMultipleScopes() {
+       
+               $redirectUri = 'http://mywebsite.com';
+               $scope = array('this', 'that', 'and more');
+       
+               $expectedBaseUrl = "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
+       
+               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
+                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - custom scope");
+       
+               $scope = array();
+               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=openid+profile+address+email+phone+" . urlencode("https://uri.paypal.com/services/paypalattributes") . "&redirect_uri=" . urlencode($redirectUri),
+                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - default scope");
+       
+               $scope = array('openid');
+               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=openid&redirect_uri=" . urlencode($redirectUri),
+                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - openid scope");
+       }
+       
+       /**
+        * @test
+        */
+       public function testLoginWithCustomConfig() {
+       
+               $redirectUri = 'http://mywebsite.com';
+               $scope = array('this', 'that', 'and more');
+       
+               $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, $this->context), "Failed case - custom config");
+       }
+       
+       /**
+        * @test
+        */
+       public function testLogoutWithCustomConfig() {
+               
+               $redirectUri = 'http://mywebsite.com';
+               $idToken = 'abc';
+               
+               $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");
+       }
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php
new file mode 100644 (file)
index 0000000..999145d
--- /dev/null
@@ -0,0 +1,41 @@
+<?php 
+use PayPal\Auth\Openid\PPOpenIdTokeninfo;
+/**
+ * Test class for PPOpenIdTokeninfo.
+ *
+ */
+class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase {
+       
+       public $token;
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp() {
+               $this->token = new PPOpenIdTokeninfo();
+               $this->token->setAccessToken("Access token")
+                                       ->setExpiresIn(900)
+                                       ->setRefreshToken("Refresh token")
+                                       ->setScope("openid address")
+                                       ->setTokenType("Bearer");
+       }
+       
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+       
+       /**
+        * @test
+        */
+       public function testSerializationDeserialization() {                            
+               $tokenCopy = new PPOpenIdTokeninfo();
+               $tokenCopy->fromJson($this->token->toJson());
+               
+               $this->assertEquals($this->token, $tokenCopy);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php
new file mode 100644 (file)
index 0000000..330d843
--- /dev/null
@@ -0,0 +1,46 @@
+<?php
+use PayPal\Auth\Openid\PPOpenIdUserinfo;
+/**
+ * Test class for PPOpenIdUserinfo.
+ *
+ */
+class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase {
+       
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+       }
+       
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+       
+
+       /**
+        * @test
+        */
+       public function testSerializationDeserialization() {
+               $user = new PPOpenIdUserinfo();
+               $user->setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01")
+                       ->setEmail("me@email.com")->setEmailVerified(true)
+                       ->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John")
+                       ->setLocale("en-US")->setGender("male")->setName("John A Doe")
+                       ->setPayerId("A-XZASASA")->setPhoneNumber("1-408-111-1111")
+                       ->setPicture("http://gravatar.com/me.jpg")
+                       ->setSub("me@email.com")->setUserId("userId")
+                       ->setVerifiedAccount(true)->setZoneinfo("America/PST");
+               
+               $userCopy = new PPOpenIdUserinfo();
+               $userCopy->fromJson($user->toJSON());
+               
+               $this->assertEquals($user, $userCopy);
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php
new file mode 100644 (file)
index 0000000..4d7cca9
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+use PayPal\Core\PPAPIService;
+/**
+ * Test class for PPAPIService.
+ *
+ */
+class PPAPIServiceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPAPIService
+     */
+    protected $object;
+    
+    private $config = array(
+               'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
+               'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
+               'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
+               'acct1.AppId' =>        'APP-80W284485P519543T' ,
+               'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
+               'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
+               'acct2.CertPath' =>     'cert_key.pem'  ,
+               'acct2.AppId' =>        'APP-80W284485P519543T' ,
+               'http.ConnectionTimeOut' =>     '30'    ,
+               'http.Retry' =>         '5'     ,
+               'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
+               'service.DevCentralURL' => 'https://developer.paypal.com'       ,
+               'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
+               'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
+               'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
+               'log.FileName' => 'PayPal1.log' ,
+               'log.LogLevel' =>       'INFO'  ,
+               'log.LogEnabled' =>     '1'     ,
+    
+    
+    );
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPAPIService(null,'AdaptiveAccounts', 'SOAP', null, $this->config);
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testSetServiceName()
+    {  
+       $this->assertEquals('AdaptiveAccounts',$this->object->serviceName);
+       $this->object->setServiceName('Invoice');
+        $this->assertEquals('Invoice',$this->object->serviceName);
+    }
+
+    /**
+     * @test
+     */
+    public function testMakeRequest()
+    {
+
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php
new file mode 100644 (file)
index 0000000..0b2b592
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+use PayPal\Core\PPBaseService;
+/**
+ * Test class for PPBaseService.
+ *
+ */
+class PPBaseServiceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPBaseService
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPBaseService('serviceName', 'serviceBinding', null);
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testGetServiceName()
+    {
+        $this->assertEquals('serviceName',$this->object->getServiceName() );
+    }
+
+
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php
new file mode 100644 (file)
index 0000000..dd5d70f
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Please run composer update from the root folder to run test cases
+ */
+
+if(file_exists(dirname(__FILE__) . '/../PPBootstrap.php')) {
+    require dirname(__FILE__) . '/../PPBootstrap.php';
+} else if(file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
+       define('PP_CONFIG_PATH', dirname(__FILE__));
+    require dirname(__FILE__) . '/../vendor/autoload.php';
+}
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php
new file mode 100644 (file)
index 0000000..6716e40
--- /dev/null
@@ -0,0 +1,106 @@
+<?php
+use PayPal\Auth\PPCertificateCredential;
+use PayPal\Exception\PPMissingCredentialException;
+/**
+ * Test class for PPCertificateCredential.
+ *
+ */
+class PPCertificateCredentialTest extends \PHPUnit_Framework_TestCase
+{
+       /**
+        * @var PPCertificateCredential
+        */
+       protected $credential;
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+               $this->credential = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
+               $this->credential->setApplicationId('APP-80W284485P519543T');
+       }
+
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+
+       /**@test
+        */
+       public function testValidateUname()
+       {
+               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
+               $credUname = new PPCertificateCredential("", "1255077037", "cacert.pem");
+               $credUname->validate();
+               $setNotExpectedException('PPMissingCredentialException');
+               $credCorrect = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
+               $var = $credCorrect->validate();
+               $this->assertNull($var);
+       }
+       /**
+        * @test
+        */
+       public function testValidatePwd()
+       {
+               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
+               $credpwd = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "", "cacert.pem");
+               $credpwd->validate();
+
+       }
+       /**
+        * @test
+        */
+       public function testValidateCertPath()
+       {
+               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
+               $credCertPath = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "");
+               $credCertPath->validate();
+       }
+       /**
+        * @test
+        */
+       public function testGetAppId()
+       {
+               $credAppid = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
+               $credAppid->setApplicationId("APP-ID");
+               $this->assertEquals($credAppid->getApplicationId(), "APP-ID");
+       }
+
+       /**
+        * @test
+        */
+       public function testGetUserName()
+       {
+               $this->assertEquals('platfo_1255077030_biz_api1.gmail.com', $this->credential->getUserName());
+
+       }
+
+       /**
+        * @test
+        */
+       public function testGetPassword()
+       {
+               $this->assertEquals('1255077037', $this->credential->getPassword());
+       }
+
+       /**
+        * @test
+        */
+       public function testGetCertificatePath()
+       {
+               $this->assertStringEndsWith(dirname(__FILE__). DIRECTORY_SEPARATOR .'cacert.pem', $this->credential->getCertificatePath());
+       }
+
+       /**@test
+        */
+       public function testGetApplicationId()
+       {
+               $this->assertEquals('APP-80W284485P519543T', $this->credential->getApplicationId());
+       }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php
new file mode 100644 (file)
index 0000000..eda5d38
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+use PayPal\Core\PPConfigManager;
+/**
+ * Test class for PPConfigManager.
+ *
+ */
+class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
+{
+       /**
+        * @var PPConfigManager
+        */
+       protected $object;
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+               $this->object = PPConfigManager::getInstance();
+       }
+
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+
+
+
+       /**
+        * @test
+        */
+       public function testGetInstance()
+       {
+               $instance = $this->object->getInstance();
+               $this->assertTrue($instance instanceof PPConfigManager);
+       }
+
+       /**
+        * @test
+        */
+       public function testGetIniPrefix()
+       {
+               $ret = $this->object->getIniPrefix();
+               $this->assertContains('acct1', $ret);
+               $this->assertEquals(sizeof($ret), 2);
+               
+               $ret = $this->object->getIniPrefix('jb-us-seller_api1.paypal.com');
+               $this->assertEquals('acct1', $ret);
+       }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php
new file mode 100644 (file)
index 0000000..420cd11
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+use PayPal\Exception\PPConfigurationException;
+/**
+ * Test class for PPConfigurationException.
+ *
+ */
+class PPConfigurationExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPConfigurationException
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPConfigurationException('Test PPConfigurationException');
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+    public function testPPConfigurationException()
+    {
+       $this->setExpectedException('PayPal\Exception\PPConfigurationException');
+       throw new PPConfigurationException('Test PPConfigurationException');
+
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php
new file mode 100644 (file)
index 0000000..d01550a
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+use PayPal\Exception\PPConnectionException;
+/**
+ * Test class for PPConnectionException.
+ *
+ */
+class PPConnectionExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPConnectionException
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPConnectionException('http://testURL', 'test message');
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testGetUrl()
+    {
+       $this->assertEquals('http://testURL',$this->object->getUrl());
+    }
+    /**
+     * @test
+     */
+ public function testPPConnectionException()
+    {
+       $this->setExpectedException('PayPal\Exception\PPConnectionException');
+       throw new PPConnectionException('http://testURL','Test msg PPConnectionException');
+       
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php
new file mode 100644 (file)
index 0000000..999c464
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+use PayPal\Core\PPConnectionManager;
+use PayPal\Core\PPHttpConnection;
+use PayPal\Core\PPHttpConfig;
+/**
+ * Test class for PPConnectionManager.
+ *
+ */
+class PPConnectionManagerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPConnectionManager
+     */
+    protected $object;
+    
+    private $config = array(
+               'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
+               'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
+               'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
+               'acct1.AppId' =>        'APP-80W284485P519543T' ,
+               'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
+               'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
+               'acct2.CertPath' =>     'cert_key.pem'  ,
+               'acct2.AppId' =>        'APP-80W284485P519543T' ,
+               'http.ConnectionTimeOut' =>     '30'    ,
+               'http.Retry' =>         '5'     ,
+               'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
+               'service.DevCentralURL' => 'https://developer.paypal.com'       ,
+               'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
+               'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
+               'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
+               'log.FileName' => 'PayPal1.log' ,
+               'log.LogLevel' =>       'INFO'  ,
+               'log.LogEnabled' =>     '1'     ,
+    
+    
+    );
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object =  PPConnectionManager::getInstance();
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testGetInstance()
+    {
+        $instance = $this->object->getInstance();
+               $this->assertTrue($instance instanceof PPConnectionManager);
+    }
+
+    /**
+     * @test
+     */
+    public function testGetConnection()
+    {
+        $conn = $this->object->getConnection(new PPHttpConfig("http://domain.com"), $this->config);
+        $this->assertNotNull($conn);
+        $this->assertTrue($conn instanceof PPHttpConnection);
+        $this->assertEquals(get_class($conn), "PayPal\Core\PPHttpConnection");
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php
new file mode 100644 (file)
index 0000000..81cf5c8
--- /dev/null
@@ -0,0 +1,104 @@
+<?php
+use PayPal\Core\PPCredentialManager;
+/**
+ * Test class for PPCredentialManager.
+ *
+ */
+class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
+{
+       /**
+        * @var PPCredentialManager
+        */
+       protected $object;
+
+       private $config = array(
+                       'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
+                       'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
+                       'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
+                       'acct1.AppId' =>        'APP-80W284485P519543T' ,
+                       'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
+                       'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
+                       'acct2.CertPath' =>     'cert_key.pem'  ,
+                       'acct2.AppId' =>        'APP-80W284485P519543T' ,
+                       'http.ConnectionTimeOut' =>     '30'    ,
+                       'http.Retry' =>         '5'     ,
+                       'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
+                       'service.DevCentralURL' => 'https://developer.paypal.com'       ,
+                       'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
+                       'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
+                       'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
+                       'log.FileName' => 'PayPal1.log' ,
+                       'log.LogLevel' =>       'INFO'  ,
+                       'log.LogEnabled' =>     '1'     ,
+       
+       
+       );
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+               $this->object = PPCredentialManager::getInstance($this->config);
+       }
+
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+
+       /**
+        * @test
+        */
+       public function testGetInstance()
+       {
+               $instance = $this->object->getInstance($this->config);
+               $this->assertTrue($instance instanceof PPCredentialManager);
+       }
+
+       /**
+        * @test
+        */
+       public function testGetSpecificCredentialObject()
+       {
+               $cred = $this->object->getCredentialObject('jb-us-seller_api1.paypal.com');
+               $this->assertNotNull($cred);
+               $this->assertEquals('jb-us-seller_api1.paypal.com', $cred->getUsername());
+               
+               $cred = $this->object->getCredentialObject('certuser_biz_api1.paypal.com');
+               $this->assertNotNull($cred);
+               $this->assertEquals('certuser_biz_api1.paypal.com', $cred->getUsername());
+               $this->assertStringEndsWith('cert_key.pem', $cred->getCertificatePath());               
+       }
+       
+       /**
+        * @test
+        */
+       public function testGetInvalidCredentialObject()
+       {
+               $this->setExpectedException('PayPal\Exception\PPInvalidCredentialException');
+               $cred = $this->object->getCredentialObject('invalid_biz_api1.gmail.com');
+       }
+               
+       /**
+        * @test
+        */
+       public function testGetDefaultCredentialObject()
+       {
+               $cred = $this->object->getCredentialObject();
+               $this->assertEquals('jb-us-seller_api1.paypal.com', $cred->getUsername());
+       }       
+       
+       /**
+        * @test
+        */
+       public function testGetPlatformCredentialObject()
+       {
+               $cred = $this->object->getCredentialObject();
+               $this->assertEquals('APP-80W284485P519543T', $cred->getApplicationId());
+       }       
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php
new file mode 100644 (file)
index 0000000..9da5007
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+use PayPal\IPN\PPIPNMessage;
+/**
+ * Test class for PPIPNMessage.
+ *
+ */
+class PPIPNMessageTest extends \PHPUnit_Framework_TestCase {
+       /**
+        * @test
+        */
+       
+       public function passGoodIPN() {
+               
+       }
+       
+       
+       /**
+        * @test
+        */
+       
+       public function failOnBadIPN() {
+               $ipn = new PPIPNMessage();
+               $this->assertEquals(false, $ipn->validate());
+       }
+       
+       
+       /**
+        * @test
+        */
+       
+       public function processIPNWithArrayElements() {
+               $ipnData = 'transaction[0].id=6WM123443434&transaction[0].status=Completed&transaction[1].id=2F12129812A1&transaction[1].status=Pending';
+               $ipn = new PPIPNMessage($ipnData);
+               
+               $rawData = $ipn->getRawData();
+               $this->assertEquals(4, count($rawData));
+               $this->assertEquals('6WM123443434', $rawData['transaction[0].id']);
+       }
+       
+       /**
+        * @test
+        */     
+       public function processIPNWithSpecialCharacters() {
+               $ipnData = "description=Jake's store";
+               
+               ini_set('get_magic_quotes_gpc', true);
+               $ipn = new PPIPNMessage($ipnData);
+               $rawData = $ipn->getRawData();          
+               $this->assertEquals($rawData['description'], "Jake's store");
+               
+               ini_set('get_magic_quotes_gpc', false);
+               $ipn = new PPIPNMessage($ipnData);
+               $rawData = $ipn->getRawData();
+               $this->assertEquals($rawData['description'], "Jake's store");
+               $this->assertEquals($rawData['description'], "Jake's store");
+       }
+       
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php
new file mode 100644 (file)
index 0000000..7ed7c5a
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+use PayPal\Exception\PPInvalidCredentialException;
+/**
+ * Test class for PPInvalidCredentialException.
+ *
+ */
+class PPInvalidCredentialExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPInvalidCredentialException
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPInvalidCredentialException;
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testErrorMessage()
+    {
+      $msg = $this->object->errorMessage();
+      $this->assertContains('Error on line', $msg);
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php
new file mode 100644 (file)
index 0000000..5285ed8
--- /dev/null
@@ -0,0 +1,64 @@
+<?php
+use PayPal\Core\PPLoggingManager;
+/**
+ * Test class for PPLoggingManager.
+ *
+ */
+class PPLoggingManagerTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPLoggingManager
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPLoggingManager('InvoiceTest');
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testError()
+    {
+        $this->object->error('Test Error Message');
+
+    }
+
+    /**
+     * @test
+     */
+    public function testWarning()
+    {
+         $this->object->warning('Test Warning Message');
+    }
+
+    /**
+     * @test
+     */
+    public function testInfo()
+    {
+        $this->object->info('Test info Message');
+    }
+
+    /**
+     * @test
+     */
+    public function testFine()
+    {
+       $this->object->fine('Test fine Message');
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php
new file mode 100644 (file)
index 0000000..8f29a7f
--- /dev/null
@@ -0,0 +1,441 @@
+<?php
+use PayPal\Core\PPMessage;
+use PayPal\Core\PPUtils;
+
+class SimpleTestClass extends PPMessage {
+       /**
+        *
+        * @access public
+        * @var string
+        */
+       public $field1;
+       
+       /**
+        *
+        * @access public
+        * @var string
+        */
+       public $field2;
+}
+
+class SimpleContainerTestClass extends PPMessage {
+       
+       /**
+        * @access public
+        * @var string
+        */
+       public $field1;
+       
+       /**
+        * @array
+        * @access public
+        * @var string
+        */
+       public $list1;
+       
+       /**
+        * @array
+        * @access public
+        * @var SimpleTestClass
+        */
+       public $list2;
+       
+       /**
+        * @array
+        * @access public
+        * @var AttributeTestClass
+        */
+       public $list3;
+       
+       /**
+        * @access public
+        * @var SimpleTestClass
+        */
+       public $nestedField;
+}
+
+class AttributeTestClass extends PPMessage {
+       
+       /**
+        *
+        * @access public
+        * @attribute
+        * @var string
+        */
+       public $attrib1;
+
+       /**
+        *
+        * @access public
+        * @attribute
+        * @var string
+        */
+       public $attrib2;
+       
+       /**
+        *
+        * @access public
+        * @value
+        * @var string
+        */
+       public $value;
+       
+}
+
+/**
+ * @hasAttribute
+ *
+ */
+class AttributeContainerTestClass extends PPMessage {
+       /**
+        *
+        * @access public
+        * @var AttributeTestClass
+        */
+       public $member;
+       
+               /**
+        * 
+     * @array
+        * @access public
+        * @var AttributeTestClass
+        */ 
+       public $arrayMember;
+
+}
+
+
+/**
+ * Test class for PPMessage.
+ *
+ */
+class PPMessageTest extends PHPUnit_Framework_TestCase
+{
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp() {
+               
+       }
+       
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown() {
+       }
+       
+       /**
+        * @test
+        */
+       public function attributeSerialization() {
+               $o = new AttributeTestClass();
+               $o->attrib1 = "abc";
+               $o->attrib2 = "random value";
+               $c = new AttributeContainerTestClass();
+               $c->member = $o;
+               
+               $this->assertEquals("attrib1=abc&attrib2=random+value", $o->toNVPString());             
+               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value", $c->toNVPString());               
+               
+               $o->value = "value";
+               $this->assertEquals("attrib1=abc&attrib2=random+value&=value", $o->toNVPString());
+               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value", $c->toNVPString());
+
+                               
+       }
+       
+       /**
+        * @test
+        */
+       public function attributeSerializationInArrays() {
+               $o = new AttributeTestClass();
+               $o->attrib1 = "abc";
+               $o->attrib2 = "random value";
+               $o->value = "value";
+               
+               $c = new AttributeContainerTestClass();
+               $c->member = $o;
+               
+               $o = new AttributeTestClass();
+               $o->attrib1 = "abc";
+               $o->attrib2 = "random value";
+               $c->arrayMember = array($o);
+               
+               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value&arrayMember(0).attrib1=abc&arrayMember(0).attrib2=random+value", 
+                               $c->toNVPString());
+               
+               $c->arrayMember[0]->value = "value";
+               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value&arrayMember(0).attrib1=abc&arrayMember(0).attrib2=random+value&arrayMember(0)=value",
+                               $c->toNVPString());
+               
+       }
+       
+       /**
+        * @test
+        */
+       public function attributeDeserialization() {
+               
+               // Attributes and value present
+               $responseMap = array(
+                       "member.attrib1" => "abc",
+                       "member.attrib2" => "random+value",
+                       "member" => "value"
+               );      
+               $c = new AttributeContainerTestClass();
+               $c->init($responseMap);
+               
+               $this->assertNotNull($c->member);
+               $this->assertEquals("abc", $c->member->attrib1);
+               $this->assertEquals("random value", $c->member->attrib2);
+               $this->assertEquals("value", $c->member->value);
+
+               // Only value present           
+               $responseMap = array(
+                       "member" => "value"
+               );              
+               $c = new AttributeContainerTestClass();
+               $c->init($responseMap);
+               
+               $this->assertNotNull($c->member);
+               $this->assertEquals("value", $c->member->value);
+               
+
+               // Only attributes present              
+               $responseMap = array(
+                       "member.attrib1" => "abc",
+                       "member.attrib2" => "random+value"
+               );
+               $c = new AttributeContainerTestClass();
+               $c->init($responseMap);
+               
+               $this->assertNotNull($c->member);
+               $this->assertEquals("abc", $c->member->attrib1);
+               $this->assertEquals("random value", $c->member->attrib2);               
+       
+       }
+       
+       /**
+        * @test
+        */
+       public function attributeDeserializationInArrays() {
+       
+               // Only value present. Single item in list
+               $responseMap = array(
+                               "arrayMember(0)" => "value+1"
+               );
+               $c = new AttributeContainerTestClass();
+               $c->init($responseMap);
+               $this->assertNotNull($c->arrayMember[0]);
+               $this->assertEquals("value 1", $c->arrayMember[0]->value);
+               
+               
+               // Only attributes present. Single item in list
+               $responseMap = array(
+                       "arrayMember(0).attrib1" => "abc",
+                       "arrayMember(0).attrib2" => "random+value",                             
+               );
+               $c = new AttributeContainerTestClass();
+               $c->init($responseMap);
+               
+               $this->assertNotNull($c->arrayMember[0]);
+               $this->assertEquals("abc", $c->arrayMember[0]->attrib1);
+               $this->assertEquals("random value", $c->arrayMember[0]->attrib2);               
+               
+               
+               // Attributes and value present. Mulitple items in list
+               $responseMap = array(
+                       "arrayMember(0).attrib1" => "abc",
+                       "arrayMember(0).attrib2" => "random+value",
+                       "arrayMember(0)" => "value",
+                       "arrayMember(0).attrib1" => "xyz",
+                       "arrayMember(1).attrib1" => "attribute1"
+               );
+               $c->init($responseMap);
+
+               $this->assertEquals("value", $c->arrayMember[0]->value);
+               $this->assertEquals("xyz", $c->arrayMember[0]->attrib1);
+               $this->assertEquals("random value", $c->arrayMember[0]->attrib2);
+               
+               $this->assertEquals("attribute1", $c->arrayMember[1]->attrib1);
+               $this->assertNull($c->arrayMember[1]->value);
+               
+       }
+
+
+       /**
+        * @test
+        */
+       public function simpleSerialization() {
+               
+               $o = new SimpleTestClass();
+               $o->field1 = "fieldvalue1";
+               $o->field2 = "fieldvalue2";
+               
+               $this->assertEquals("field1=fieldvalue1&field2=fieldvalue2", $o->toNVPString(''));
+       }
+       
+       
+       /**
+        * @test
+        */
+       public function simpleDeserialization() {
+       
+               $map = array(
+                       "field1" => "fieldvalue1",
+                       "field2" => "field+value2"
+               );
+               $o = new SimpleTestClass();
+               $o->init($map);
+       
+               $this->assertEquals("fieldvalue1", $o->field1);
+               $this->assertEquals("field value2", $o->field2);
+       }
+       
+       
+       /**
+        * @test
+        */
+       public function nestedSerialization() {
+       
+               $o = new SimpleTestClass();
+               $o->field1 = "fieldvalue1";
+               $o->field2 = "fieldvalue2";
+       
+               $c = new SimpleContainerTestClass();
+               $c->nestedField = $o;
+               $c->field1 = "abc";
+       
+               $this->assertEquals("field1=abc&nestedField.field1=fieldvalue1&nestedField.field2=fieldvalue2", $c->toNVPString(''));
+       }
+
+       
+       /**
+        * @test
+        */
+       public function nestedDeserialization() {
+               
+               $map = array(
+                       "field1" => "abc",
+                       "nestedField.field1" => "fieldvalue1",
+                       "nestedField.field2" => "field+value2"
+               );
+       
+               $c = new SimpleContainerTestClass();
+               $c->init($map);
+
+               $this->assertEquals("abc", $c->field1);
+               $this->assertEquals("fieldvalue1", $c->nestedField->field1);
+               $this->assertEquals("field value2", $c->nestedField->field2);
+       }
+       
+       
+       /**
+        * @test
+        */
+       public function simpleListSerialization() {
+       
+               $c = new SimpleContainerTestClass();
+               $c->list1 = array('Array', "of", "some strings");
+               $c->field1 = "abc";
+       
+               $this->assertEquals("field1=abc&list1(0)=Array&list1(1)=of&list1(2)=some+strings", $c->toNVPString(''));
+       }
+       
+       /**
+        * @test
+        */
+       public function simpleListDeserialization() {
+       
+               $map = array(
+                       "field1" => "abc",
+                       "list1(0)" => "Array",
+                       "list1(1)" => "of",
+                       "list1(2)" => "some+strings"
+               );
+                               
+               $c = new SimpleContainerTestClass();
+               $c->init($map);
+       
+               $this->assertEquals("abc", $c->field1);
+               $this->assertEquals(3, count($c->list1));
+               $this->assertEquals("some strings", $c->list1[2]);
+       }
+       
+       /**
+        * @test
+        */
+       public function complexListSerialization() {
+       
+               $o1 = new SimpleTestClass();
+               $o1->field1 = "somevalue1";
+               $o1->field2 = "somevalue2";
+       
+               $o2 = new SimpleTestClass();
+               $o2->field1 = "another value1";
+               $o2->field2 = "anothervalue2";
+               
+               $c = new SimpleContainerTestClass();
+               $c->list2 = array($o1, $o2);
+       
+               $this->assertEquals("list2(0).field1=somevalue1&list2(0).field2=somevalue2&list2(1).field1=another+value1&list2(1).field2=anothervalue2", 
+                               $c->toNVPString(''));
+       }
+       
+       /**
+        * @test
+        */
+       public function complexListDeserialization() {
+               
+               $map = array(
+                       "list2(0).field1" => "somevalue1",
+                       "list2(0).field2" => "somevalue2",
+                       "list2(1).field1" => "another+value1",
+                       "list2(1).field2" => "anothervalue2"
+               );
+               
+               $c = new SimpleContainerTestClass();
+               $c->init($map);
+       
+               $this->assertEquals(2, count($c->list2));
+               $this->assertEquals("somevalue1", $c->list2[0]->field1);
+               $this->assertEquals("another value1", $c->list2[1]->field1);
+       }
+       
+       
+       /**
+        * @test
+        */
+       public function serializeAndDeserialize() {
+               
+               $o1 = new AttributeTestClass();
+               $o1->value = "some value";
+               $o1->attrib1 = "someattrib";
+               
+               $o2 = new AttributeTestClass();
+               $o2->value = "some value2";
+               
+               $o3 = new AttributeTestClass();
+               $o3->attrib1 = "attribute";
+               $o3->value = "some value3";
+               
+               $c = new SimpleContainerTestClass();
+               $c->list3 = array($o1, $o2, $o3);
+               
+               $newC = new SimpleContainerTestClass();
+               $newC->init(PPUtils::nvpToMap($c->toNVPString(''))); //TODO: Mock nvpToMap
+               
+               $this->assertEquals($c, $newC);
+       }
+
+       /**
+        * @test
+        */
+       public function deserializeAndSerialize() {             
+               $nvpString = "list2(0).field1=somevalue1&list2(0).field2=somevalue2&list2(1).field1=another+value1&list2(1).field2=anothervalue2&list3(0).attrib1=somevalue1&list3(0).attrib2=somevalue2&list3(0)=value+field&list3(1).attrib1=another+value1&list3(2)=anothervalue2";
+               $newC = new SimpleContainerTestClass();
+               $newC->init(PPUtils::nvpToMap($nvpString)); //TODO: Mock nvpToMap               
+               $this->assertEquals($nvpString, $newC->toNVPString());
+       }
+}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php
new file mode 100644 (file)
index 0000000..ec8e752
--- /dev/null
@@ -0,0 +1,41 @@
+<?php
+use PayPal\Exception\PPMissingCredentialException;
+
+/**
+ * Test class for PPMissingCredentialException.
+ *
+ */
+class PPMissingCredentialExceptionTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPMissingCredentialException
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPMissingCredentialException;
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testErrorMessage()
+    {
+               $msg = $this->object->errorMessage();
+               $this->assertContains('Error on line', $msg);
+    }
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php
new file mode 100644 (file)
index 0000000..2d48a9d
--- /dev/null
@@ -0,0 +1,103 @@
+<?php
+use PayPal\Auth\PPSignatureCredential;
+use PayPal\Auth\PPTokenAuthorization;
+use PayPal\Auth\PPSubjectAuthorization;
+/**
+ * Test class for PPSignatureCredential.
+ *
+ */
+class PPSignatureCredentialTest extends PHPUnit_Framework_TestCase
+{
+       /**
+        * @var PPSignatureCredential
+        */
+       protected $merchantCredential;
+
+       protected $platformCredential;
+
+       /**
+        * Sets up the fixture, for example, opens a network connection.
+        * This method is called before a test is executed.
+        */
+       protected function setUp()
+       {
+               $this->merchantCredential = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
+
+               $this->platformCredential = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
+               $this->platformCredential->setApplicationId("APP-80W284485P519543T");
+       }
+
+       /**
+        * Tears down the fixture, for example, closes a network connection.
+        * This method is called after a test is executed.
+        */
+       protected function tearDown()
+       {
+       }
+
+       /**
+        * @test
+        */
+       public function testValidateUsername()
+       {
+               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
+               $cred = new PPSignatureCredential("", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
+               $cred->validate();
+       }
+
+       /**
+        * @test
+        */
+       public function testValidatepwd()
+       {
+               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
+               $cred = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
+               $cred->validate();
+       }
+
+       /**
+        * @test
+        */
+       public function testGetSignature()
+       {
+               $this->assertEquals('Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf', $this->merchantCredential->getSignature());
+       }
+       /**
+        * @test
+        */
+       public function testGetUserName()
+       {
+               $this->assertEquals('platfo_1255077030_biz_api1.gmail.com', $this->merchantCredential->getUserName());
+       }
+       /**
+        * @test
+        */
+       public function testGetPassword()
+       {
+               $this->assertEquals('1255077037', $this->merchantCredential->getPassword());
+       }
+       /**
+        * @test
+        */
+       public function testGetAppId()
+       {
+               $this->assertEquals('APP-80W284485P519543T', $this->platformCredential->getApplicationId());
+       }
+       
+       public function testThirdPartyAuthorization() {
+               $authorizerEmail = "merchant@domain.com";
+               $thirdPartyAuth = new PPSubjectAuthorization($authorizerEmail);         
+               $cred = new PPSignatureCredential("username", "pwd", "signature");
+               $cred->setThirdPartyAuthorization($thirdPartyAuth);             
+               $this->assertEquals($cred->getThirdPartyAuthorization()->getSubject(), $authorizerEmail);
+               
+               $accessToken = "atoken";
+               $tokenSecret = "asecret";
+               $thirdPartyAuth = new PPTokenAuthorization($accessToken, $tokenSecret);
+               $cred->setThirdPartyAuthorization($thirdPartyAuth);
+               $this->assertEquals($cred->getThirdPartyAuthorization()->getAccessToken(), $accessToken);
+               $this->assertEquals($cred->getThirdPartyAuthorization()->getTokenSecret(), $tokenSecret);
+       }
+
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php
new file mode 100644 (file)
index 0000000..7ad664d
--- /dev/null
@@ -0,0 +1,63 @@
+<?php
+use PayPal\Core\PPUtils;
+/**
+ * Test class for PPUtils.
+ *
+ */
+class PPUtilsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PPUtils
+     */
+    protected $object;
+
+    /**
+     * Sets up the fixture, for example, opens a network connection.
+     * This method is called before a test is executed.
+     */
+    protected function setUp()
+    {
+        $this->object = new PPUtils();
+    }
+
+    /**
+     * Tears down the fixture, for example, closes a network connection.
+     * This method is called after a test is executed.
+     */
+    protected function tearDown()
+    {
+    }
+
+    /**
+     * @test
+     */
+    public function testNvpToMap()
+    {
+       $arr = $this->object->nvpToMap('requestEnvelope.detailLevel=ReturnAll&requestEnvelope.errorLanguage=en_US&invoice.merchantEmail=jb-us-seller1@paypal.com&invoice.payerEmail=jbui-us-personal1@paypal.com&invoice.items[0].name=product1&invoice.items[0].quantity=10.0&invoice.items[0].unitPrice=1.2&invoice.currencyCode=USD&invoice.paymentTerms=DueOnReceipt');
+       $this->assertArrayHasKey('requestEnvelope.detailLevel', $arr);
+       $this->assertArrayHasKey('requestEnvelope.errorLanguage', $arr);
+       $this->assertEquals(is_array($arr),true);
+    }
+
+    /**
+     * @test
+     */
+    public function testArray_match_key()
+    {
+       $arr = array('key1' => 'somevalue', 'key2' => 'someothervalue');
+               $this->assertEquals(PPUtils::array_match_key($arr, "key"), true);
+               $arr = unserialize('a:10:{s:26:"responseEnvelope.timestamp";s:35:"2011-04-19T04%3A32%3A29.469-07%3A00";s:20:"responseEnvelope.ack";s:7:"Failure";s:30:"responseEnvelope.correlationId";s:13:"c2514f258ddf1";s:22:"responseEnvelope.build";s:7:"1829457";s:16:"error(0).errorId";s:6:"580027";s:15:"error(0).domain";s:8:"PLATFORM";s:17:"error(0).severity";s:5:"Error";s:17:"error(0).category";s:11:"Application";s:16:"error(0).message";s:44:"Prohibited+request+parameter%3A+businessInfo";s:21:"error(0).parameter(0)";s:12:"businessInfo";}');
+               $this->assertEquals(PPUtils::array_match_key($arr, "error(0)."), true);
+    }
+
+    /**
+     * @test
+     */
+    public function testGetLocalIPAddress()
+    {
+        $ip = $this->object->getLocalIPAddress();
+        //$this->assertEquals('127.0.0.1',$ip);
+    }
+
+}
+?>
diff --git a/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini b/lib/paymentProcessors/PayPal/Saved/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini
new file mode 100644 (file)
index 0000000..37e11b4
--- /dev/null
@@ -0,0 +1,33 @@
+;Account credentials
+[Account]
+
+acct1.ClientId = ProxyRP-01
+acct1.ClientSecret = A8VERY8SECRET8VALUE0   
+acct1.UserName = jb-us-seller_api1.paypal.com
+acct1.Password = WX4WTU3S8MY44S7F
+acct1.Signature = AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
+acct1.AppId = APP-80W284485P519543T
+# Subject is optional and is required only in case of third party authorization 
+acct1.Subject = 
+
+; Certificate Credentials Test Account
+acct2.UserName = platfo_1255170694_biz_api1.gmail.com
+acct2.Password = 2DPPKUPKB7DQLXNR
+; Certificate path relative to config folder or absolute path in file system
+acct2.CertPath = cacert.pem
+
+
+;Connection Information
+[Http]
+http.ConnectionTimeOut = 30
+http.Retry = 5
+;http.Proxy
+
+;Logging Information
+[Log]
+log.FileName=../PayPal.log
+log.LogLevel=INFO
+log.LogEnabled=true
+
+mode = sandbox
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/Saved/test.php b/lib/paymentProcessors/PayPal/Saved/test.php
new file mode 100755 (executable)
index 0000000..7a2aae3
--- /dev/null
@@ -0,0 +1,131 @@
+<?php
+
+define('PAYPAL_DEBUG', false);
+
+// Setup some info that will be provided by the cart application
+$thisScript = 'http://'.$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
+$account = array(
+               'clientID' => 'AY2IlhCAFCgTaYSgrGfBQ0h5WKKgpLwU-jd2QkKsEbDpGEWtCDZKtp2VLhu1',
+               'secret' => 'EOWLsBDrkvdOKUlfhAKJ47aXHBr5xzw-2o7JdLCcLVciGqNGXlhMayP1WKhe',
+               'returnURL' => $thisScript.'?PayPalAction=Approved',
+               'cancelURL' => $thisScript.'?PayPalAction=Canceled',
+               'test' => 3
+);
+$payment = array(
+               'name' => 'Gaslight Media 6',
+               'charge' =>  33.60,
+               'invoice' => '123abc6',
+               'description' => 'Some Purchase',
+               'items' => array(
+                               array(
+                                               'quantity' => '1',
+                                               'name' => 'Items Purchased',
+                                               'price' => 33.60,
+                                               'sku' => '123456'
+                               ) /* ,
+                               array(
+                                               'quantity' => '2',
+                                               'name' => 'TuTu Tango',
+                                               'price' => 11.2,
+                                               'sku' => '123ABC2'
+                               )
+*/
+               )
+);
+$contact = array();
+
+// Display return to start link
+echo '<p><a href="'.$thisScript.'">Start Over</a></p>';
+
+// Load the PayPal class file
+require_once dirname(__FILE__).'/paymentGateway.php';
+
+// Start session
+session_start();
+
+// Set default action and try to get any requested action
+$request = false;
+if (isset($_REQUEST) && isset($_REQUEST) && isset($_REQUEST['PayPalAction']) && trim($_REQUEST['PayPalAction']) != '') {
+    $request = $_REQUEST['PayPalAction'];
+}
+
+// Check for certain actions related to sending user to PayPal site for approval
+switch ($request) {
+
+       case 'GetApproval':
+
+               // Use browser redirect 302 to send user to PayPal.
+               // This is proper way to do so according to the API documentation.
+               $trans = $_SESSION['trans'];
+               header('Location: '.$trans->urls->approval_url->href);
+               exit;
+
+               break;
+
+       case 'Approved':
+
+               echo "Return link followed.<P>";
+
+               // Save Payer ID
+               $_SESSION['payerID'] = $_REQUEST['PayerID']; // NEED TO FILTER THIS FOR PRODUCTION
+
+               // Create PayPal object with existing access object from the session
+               $PayPal = new PaymentGateway($account, $_SESSION['access'], $_SESSION['trans']);
+
+               // Execute the PayPal payment
+               $r = $PayPal->executePayment($_SESSION['payerID']);
+
+               echo "<p>Payment Executed Successfully</p><pre>".print_r($r,1)."</pre>";
+
+               exit;
+
+               break;
+
+       case 'Canceled':
+
+               echo "Payment Cancelled<P>";
+               exit;
+               break;
+
+       default:
+
+           // Create the PayPal object (note no previous access object)
+           $PayPal = new PaymentGateway($account, false, false);
+
+           // Was there an error?
+           if (!$PayPal->status) {
+               echo "Received an error: ".$PayPal->error;
+               exit;
+           }
+
+           // Store access information
+           $_SESSION['access'] = $PayPal->access;
+
+           // Try to enter Payment
+           $PayPal->processPayment($payment, $contact);
+
+           // Was there an error?
+           if (!$PayPal->status) {
+               echo "Received an error: ".$PayPal->error."<br><ul>";
+               foreach($PayPal->trans->details as $detail) {
+                   echo "<li>".$detail->issue."</li>";
+               }
+            echo "</ul>";
+
+               exit;
+           }
+
+           // Store Transaction data to session
+           $_SESSION['trans'] = $PayPal->trans;
+
+           // Show user link to PayPal for them to approve payment
+           // Note that uses a target to create a new window/tab
+           echo '<a href="'.$thisScript.'?PayPalAction=GetApproval" target="PayPal">Proceed to PayPal</a>';
+
+           exit;
+           break;
+}
+
+
+
+?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/assets/x-click-but6.gif b/lib/paymentProcessors/PayPal/assets/x-click-but6.gif
deleted file mode 100755 (executable)
index 5da5a52..0000000
Binary files a/lib/paymentProcessors/PayPal/assets/x-click-but6.gif and /dev/null differ
diff --git a/lib/paymentProcessors/PayPal/paymentGateway.php b/lib/paymentProcessors/PayPal/paymentGateway.php
deleted file mode 100755 (executable)
index 73a04ad..0000000
+++ /dev/null
@@ -1,591 +0,0 @@
-<?php
-/**
- * Event Management System
- * PayPal Payment PaymentGateway class
- *
- * @category Front-End
- * @package  EventManagement
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  SVN: $Id: PayPal.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
- * @link     <>
- */
-
-
-/**
- * Account Information
- *
- *  Developer account
- *             PayPal API:     https://developer.paypal.com/webapps/developer/
- *             E-Mail Address:         PayPal@n8dnx.org
- *             Password:                       pAy#glM2Pal
- *
- *     PayPal test account
- *             E-Mail address: paypalAcct2@n8dnx.org
- *             Password:               {std insecure}2
- *
- *     Test credentials
- *             Test account:   PayPal-facilitator@n8dnx.org
- *             Endpoint:               api.sandbox.paypal.com
- *             Client ID:              AY2IlhCAFCgTaYSgrGfBQ0h5WKKgpLwU-jd2QkKsEbDpGEWtCDZKtp2VLhu1
- *             Secret:                 EOWLsBDrkvdOKUlfhAKJ47aXHBr5xzw-2o7JdLCcLVciGqNGXlhMayP1WKhe
- *
- *     Gaslight Media Live credentials
- *             Endpoint:               api.paypal.com
- *             Client ID:              AZw7VxC8rVTxlKoZVBd60ugOy_9PZWLDazQHF0RlYYWBQbAvkX2MBLy2vfmQ
- *             Secret:                 EN3ZaxB4AhZ3J1814MtpfFjUXOqRTR8dto-fhFgk2wuLDTCoPfD0I0Dpbwuu
- *
- *     Standard PayPal buttons and images
- *             https://ppmts.custhelp.com/app/answers/detail/a_id/632
- *                             https://www.paypal.com/en_US/i/btn/x-click-but6.gif
- */
-
-/**
- * EventManagementPayPalPaymentProcessing class
- *
- * PHP version 5
- *
- * @category Event Management PayPal Payment Processing
- * @package  EventManagement
- * @author   Chuck Scott <cscott@gaslightmedia.com>
- * @license  http://www.gaslightmedia.com Gaslightmedia
- * @release  SVN: $Id: PayPal.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
- * @link     <>
- */
-
-class PaymentGateway
-{
-       /**
-        * Curl Object
-        *
-        * @var         $curl
-        * @access      private
-        */
-       private $curl = false;
-       /**
-        * Result Status
-        *
-        * @var         $status
-        * @access      public
-        */
-       public $status = false;
-       /**
-        * Access Data
-        *
-        * @var         $access
-        * @access      private
-        */
-       public $access = false;
-       /**
-        * Curl Errors
-        *
-        * @var         $error
-        * @access      public
-        */
-       public $error = '';
-       /**
-        * PayPal Transaction
-        *
-        * @var         $trans
-        * @access      public
-        */
-       public $trans;
-       /**
-        * Test Mode - Use Sandbox
-        *
-        * @var         $sandbox
-        * @access      public
-        */
-       public $sandbox = false;
-       /**
-        * API URLs
-        *
-        * @var         $apiURLs
-        * @access      public
-        */
-       public $apiURLs = false;
-
-    /**
-     * Constructor
-     *
-     * To facilitate continuing after a return URL has been followed
-     * as required to execute or cancel the transaction, the constructor
-     * may optionally take an "access" object created in a previous
-     * instance (probably stored in a session or database) to re-establish
-     * a connection to the same transaction.
-     *
-     * @param array  $account Account information
-     * @param object $access  Access object from previous instance that should
-     *                                                   be used instead of creating a new one
-     * @param object $trans   Transaction object from a previous instance.
-     *
-     * @return boolean    Returns value of $success parameter
-     * @access public
-     *
-     * $account
-        *              clientID                PayPal Client ID
-        *              secret                  PayPal Secret
-        *              returnURL               URL for PayPal to return to after payment confirmation by customer
-        *              cancelURL               URL for PayPal to return to after payment cancelation by customer
-        *              test                    1=Local Test (not available for PayPal), 2=Fail test (not available for PayPal), 3=PayPal Sandbox test, 0=Live production
-        *
-     */
-    public function __construct($account, $access = false, $trans = false)
-    {
-
-               // URLs to use for requests if we're using the development sandbox
-       $sandboxURLs = (object) array(
-                       'access' => 'https://api.sandbox.paypal.com/v1/oauth2/token',
-                       'process' => 'https://api.sandbox.paypal.com/v1/payments/payment',
-                       'execute' => 'https://api.sandbox.paypal.com/v1/payments/payment/{transID}/execute/'
-       );
-
-       // URLs to use for requests if we're doing live transactions
-       $liveURLs = (object) array(
-                       'access' => 'https://api.paypal.com/v1/oauth2/token',
-                       'process' => 'https://api.paypal.com/v1/payments/payment',
-                       'execute' => 'https://api.paypal.com/v1/payments/payment/{transID}/execute/'
-       );
-
-
-       // Save account information
-       $this->account = $account;
-
-       // Check for various test modes
-       switch ($this->account['test']) {
-
-               // Local Test
-               case 1:
-                               break;
-
-                       // Fail Test
-               case 2:
-                               break;
-
-               // Online Test - Use sandbox
-               case 3:
-                       $this->sandbox = true;
-                       $this->apiURLs = $sandboxURLs;
-                       break;
-
-                       // Production Mode
-               case 0:
-                       $this->sandbox = false;
-                       $this->apiURLs = $liveURLs;
-                       break;
-       }
-
-       // Was an access object from a previous instance supplied?
-       if ($access) {
-
-               // Yes, so store that and be done
-               $this->access = $access;
-               $this->status = true;
-
-               // If we also have a transaction object
-               if ($trans) {
-
-                       // Store that
-                       $this->trans = $trans;
-               }
-
-               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-                       echo
-                               '<b>__construct() - Existing Instance</b><p>'
-                               .'Account Data:<br>'
-                               .'<pre>'.print_r($account,1).'</pre>'
-                               .'Access:<br>'
-                               .'<pre>'.print_r($access,1)."</pre>"
-                               .'Transaction:<br>'
-                               .'<pre>'.print_r($trans,1)."</pre>";
-               }
-
-
-       // Otherwise, we need to create an access object
-       } else {
-
-               // Build request information
-               $url = $this->apiURLs->access;
-               $headers = array(
-                               "Accept: application/json",
-                               "Accept-Language: en_US",
-                               "Content-type: application/x-www-form-urlencoded"
-               );
-               $request = 'grant_type=client_credentials';
-
-               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-                       echo
-                               '<b>__construct() - New Instance</b><p>'
-                               .'Account Data:<br>'
-                               .'<pre>'.print_r($account,1).'</pre>'
-                               .'Headers:<br>'
-                               .'<pre>'.print_r($headers,1)."</pre>"
-                               .'Request:<br>'
-                               .'<pre>'.print_r($request,1)."</pre>";
-               }
-
-                       // Send request
-               $response = $this->sendRequest($url, $headers, $request);
-
-               // If bad response
-               if (!$response) {
-                       $this->access = false;
-                       $this->status = false;
-                       return;
-               }
-
-               // Store our access data
-               $this->access = $response;
-               $this->status = true;
-
-       }
-
-       return $this->status;
-    }
-
-    /**
-     * Process a Payment
-     *
-     * NOTE: For PayPal, this method only requests the payment.
-     * The user must follow the approval_url supplied by this
-     * method and confirm the payment. When that is done, PayPal
-     * will send the user to the approval_url along with a
-     * PayerID. The executePayment() method must then be called
-     * to actually execute the payment.
-     *
-     * @param array $payment Array payment information
-     * @param array $contact Array contact information
-     *
-     * @access public
-     * @return array
-     *
-     * Information provided
-     *
-     * $payment array
-     *         name                            Name of vendor - required
-     *         charge                          Total to be charged - required
-     *         cctype                          Card type - not used
-     *         ccname                          Name on card - not used
-     *         ccnumb                          Card number - not used
-     *         ccexp                           Expiration date (m/y) - not used
-     *         cccode                          Security code on back of card - not used
-     *         invoice                         Invoice # is session ID (or some part thereof) - not used
-     *         description                     Description of transaction - not used
-     *         items                           Array of items being purchased - required
-     *                                                 Each item has following
-     *
-     *                 quantity                        A number - Required
-     *                 name                            Name of the item - Required
-     *                 price                           Price of the item (numeric float) - Required
-     *                 sku                                     SKU string - Optional
-     *
-     *
-     * $contact array
-     *         fname                           Customer first name
-     *         lname                           Customer last name
-     *         addr1                           Address Line 1
-     *         addr2                           Address Line 2
-     *         city                            City
-     *         state                           State
-     *         country                         Country
-     *         zip                                     ZIP/Postal code
-     *         phone                           Customer phone number
-     *         email                           Customer E-Mail address
-     *
-     * return array
-     *                 status                          Numeric return status code
-     *                                                                 1               Approved
-     *                                                                 2               Bad data supplied
-     *                                                                 3               Communications failure
-     *                                                                 4               Bad response
-     *                                                                 5               Transaction not valid
-     *                                                                 6               Merchant account problem
-     *                                                                 7               Card declined
-     *         statusText                      Short name of status
-     *         authCode                        Authorization code - blank if card not accepted
-     *         description                     Longer description of result
-     *
-     *
-     */
-    public function processPayment($payment = false, $contact = false)
-    {
-
-       // Check for local tests that don't require communication with PayPal
-       switch ($this->account['test']) {
-
-               // Local Test
-               case 1:
-                       // invalid type for PayPal class - default to sandbox
-               case 2:
-                       // invalid type for PayPal class - default to sandbox
-               case 3:
-                       $this->sandbox = true;
-                       break;
-
-                       // Production Mode
-               case 0:
-                       break;
-       }
-
-       // Build request information
-       $url = $this->apiURLs->process;
-       $headers = array(
-                       "Content-type:application/json",
-                       'Authorization:'.$this->access->token_type.' '.$this->access->access_token
-       );
-
-       // Build payment request
-       $charge =  number_format($payment['charge'], 2, '.', '');
-       $requestArray = array(
-               'intent' => 'sale',
-               'redirect_urls' => array(
-                       'return_url' => $this->account['returnURL'],
-                       'cancel_url' => $this->account['cancelURL']
-               ),
-               'payer' => array(
-                       'payment_method' => 'paypal'
-               ),
-               'transactions' => array(
-                       0 => array(
-                               'amount' => array(
-                               'total' => $charge,
-                               'currency' => 'USD'
-                               ),
-                               'item_list' => array(
-                                       'items' => array(
-                                       )
-                               )
-                       )
-               )
-       );
-
-       // Add item list
-       if (isset($payment['items']) && count($payment['items']) > 0) {
-
-               foreach ($payment['items'] as $item) {
-
-                       $item['name'] = trim($item['name']);
-                       $item['currency'] = 'USD';
-                       $item['price'] = number_format($item['price'], 2, '.', '');
-
-                       // Check required items
-                       if (
-                               ($item['quantity']-0) <= 0 ||
-                               $item['name'] == '' ||
-                               ($item['price']-0) <= 0
-                       ) {
-
-                               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-                                       echo "<P>ERROR: payment item incomplete<br><pre>".print_r($item,1)."</pre>";
-                               }
-
-                               // Can't proceed, bad data supplied - May need to warn someone of this problem here
-                               $this->trans = false;
-                               $this->status = false;
-                               return;
-
-                       }
-
-                       // Add this item to the list
-                       $requestArray['transactions'][0]['item_list']['items'][] = $item;
-
-               }
-
-       // If not, then we can't proceed - While not required by PayPal, we are requiring it
-       } else {
-
-               echo "ERROR: PayPal integration requires an item list but none was provided along with "
-                               ."the payment information to the processPayment() method.";
-               exit;
-
-       }
-
-       // Convert request to a JSON
-       $request = json_encode($requestArray, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
-
-       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-               echo '<b>processPayment()</b><P>'
-                       .'Headers:<br>'
-                       .'<pre>'.print_r($headers,1)."</pre>"
-                       .'Request: <br>'
-                       .'<pre>'.$request.'</pre>';
-       }
-
-       // Send request
-       $response = $this->sendRequest($url, $headers, $request);
-
-       // If bad response
-       if (!$response) {
-               $this->trans = false;
-               $this->status = false;
-               return;
-       }
-
-       // Store URLs in a way they can be easily accessed
-       $response->urls = new stdClass();
-       foreach ($response->links as $link) {
-                       $response->urls->{$link->rel} = $link;
-       }
-
-               // Store our access data
-       $this->trans = $response;
-               $this->status = true;
-
-
-               return $this->status;
-
-
-    }
-
-    /**
-     * Execute the Payment
-     *
-     * This is the final step in PayPal payment approval.
-     * This method should be called with the PayerID provided
-     * when the user is sent back to us on a return URL.
-     *
-     * Note for this to work, the constructor must have been
-     * suppled the access and transaction data.
-     *
-     * Since the transaction ID is passed to PayPal in the URL
-     * we're assuming that the response we get back is for the
-     * correct transaction, so we don't check that.
-     *
-     * @param string $payerID  PayerID returned by PayPal on the return link
-     *
-     * @access public
-     * @return array
-     *
-     *
-     */
-    public function executePayment($payerID)
-    {
-
-       // Build request information
-       $url = str_replace('{transID}', $this->trans->id, $this->apiURLs->execute);
-
-       $headers = array(
-                       "Content-type:application/json",
-                       'Authorization:'.$this->access->token_type.' '.$this->access->access_token
-       );
-
-       // Build payment request
-       $charge =  number_format($payment['charge'], 2, '.', '');
-       $request = '{"payer_id" : "'.$payerID.'" }';
-
-       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-               echo '<b>executePayment()</b><P>'
-                       .'Headers:<br>'
-                       .'<pre>'.print_r($headers,1)."</pre>"
-                       .'Request: <br>'
-                       .'<pre>'.$request.'</pre>';
-       }
-
-       // Send request
-       $response = $this->sendRequest($url, $headers, $request);
-
-       // If bad response
-       if (!$response) {
-               $this->confirmation = false;
-               $this->status = false;
-               return false;
-       }
-
-       // Save results
-       $this->confirmation = $response;
-
-               // Check if payment not approved
-               if ($response->state != 'approved') {
-                       $this->status = false;
-                       return false;
-               }
-
-               $r = array(
-                       'status' => 1,
-                       'statusText' => 'Approved',
-                       'authCode' => '',
-                       'description' => 'PayPal approval: '
-                               .$this->response->payer->payer_info->first_name.' '
-                               .$this->response->payer->payer_info->last_name.' '
-                               .$this->response->update_time,
-                       'payerName' => $this->response->payer->payer_info->first_name.' '
-                               .$this->response->payer->payer_info->last_name.' '
-
-               );
-
-       return $r;
-    }
-
-    /**
-     * Make Curl call to place request
-     *
-     * @param array $headers  Array of headers to include
-     * @param mixed $request  Fields to supply as POST data, either string, array, or json
-     *
-     * @access public
-     * @return array
-     *
-     */
-    private function sendRequest($url, $headers, $request)
-    {
-
-       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-               echo '<p><b>sendRequest():</b><br>URL = '.$url.'<br>Headers:<br><pre>'
-                       .print_r($headers,1).'</pre>Request:<br><pre>'.print_r($request,1).'</pre>';
-       }
-
-       // Init Curl
-       $this->curl = curl_init();
-
-       // Curl Parameters
-       $id_pw = $this->account['clientID'].':'.$this->account['secret'];
-       $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
-
-       // Set curl options
-       curl_setopt($this->curl, CURLOPT_URL, $url);
-       curl_setopt($this->curl, CURLOPT_SSLVERSION,4);
-       curl_setopt($this->curl, CURLOPT_SSL_VERIFYPEER, FALSE);
-       curl_setopt($this->curl, CURLOPT_SSL_VERIFYHOST, 2);
-       curl_setopt($this->curl, CURLOPT_HEADER, false);
-       curl_setopt($this->curl, CURLOPT_HTTPHEADER, $headers);
-       curl_setopt($this->curl, CURLOPT_POST, true);
-       curl_setopt($this->curl, CURLOPT_POSTFIELDS, $request);
-       curl_setopt($this->curl, CURLOPT_USERPWD, $id_pw);
-       curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
-       curl_setopt($this->curl, CURLOPT_USERAGENT, $agent);
-
-       // Place Curl call to get access token
-       $raw = curl_exec($this->curl);
-
-       // If we received a good response
-       if (!curl_errno($this->curl)) {
-
-               // Save access data
-               $response = json_decode($raw);
-
-               if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-                       echo 'Response:<br>'
-                               .'<pre>'.print_r($response,1).'</pre>';
-               }
-
-       // Otherwise
-       } else {
-
-               // Save our error message
-               $this->error = curl_error($this->curl);
-                       $response = false;
-
-                       if (defined('PAYPAL_DEBUG') && PAYPAL_DEBUG) {
-                               echo "Curl Error: ".$this->error."<P>";
-                       }
-
-       }
-
-       // Close our curl object
-       curl_close($this->curl);
-
-       return $response;
-
-    }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.coveralls.yml
deleted file mode 100644 (file)
index 90f55b5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# .coveralls.yml configuration
-
-# for php-coveralls
-src_dir: lib
-coverage_clover: build/coverage/clover.xml
-json_path: build/coverage/coveralls-upload.json
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.gitignore
deleted file mode 100644 (file)
index e9c37ab..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-build
-.DS_Store
-*.log
-
-# IDE
-.project
-.settings
-.buildpath
-*.bak
-
-# Composer
-vendor
-composer.lock
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/.travis.yml
deleted file mode 100644 (file)
index 91cb229..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-language: php
-php:
-  - 5.4
-  - 5.3
-before_script:
-  - composer install --dev
-  - composer update satooshi/php-coveralls --dev
-script:
-    - ant coverage
-after_script:
-    - php vendor/bin/coveralls -v -c .coveralls.yml
-notifications:
-  recipients:
-    - DL-PP-Platform-PHP-SDK@ebay.com
-  on_success: change
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/CHANGELOG.md
deleted file mode 100644 (file)
index 0c6c6f2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-CHANGELOG\r
-========= \r
-\r
-V0.7.1 (July 31, 2013)\r
------------------------\r
-   * Added support for Reauthorization\r
-\r
-V0.7.0 (May 30, 2013)\r
------------------------\r
-\r
-   * Added support for Auth and Capture APIs\r
-   * Types modified to match the API Spec\r
-   * Updated SDK to use namespace supported core library \r
-\r
-V0.6.0 (April 26, 2013)\r
------------------------\r
-\r
-   * Adding support for dynamic configuration of SDK (Upgrading sdk-core-php dependency to V1.4.0)\r
-   * Deprecating the setCredential method and changing resource class methods to take an ApiContext argument instead of a OauthTokenCredential argument.\r
-\r
-V0.5.0 (March 07, 2013)\r
------------------------\r
-\r
-   * Initial Release\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/LICENSE.txt
deleted file mode 100644 (file)
index ad030e5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-PAYPAL, INC.
-
-SDK LICENSE
-
-NOTICE TO USER:  PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement.  Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
-
-As used in this Agreement, "PayPal" means PayPal, Inc.  "Software" means the software code accompanying this agreement.   "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.   
-
-1.  LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
-
-Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose.  You may not modify the Documentation.
-
-No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement.  You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
-
-If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution.  You may distribute the Software in object code form under your own license, provided that your license agreement:
-
-(a)    complies with the terms and conditions of this license agreement; 
-
-(b)    effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
-
-(c)    effectively excludes all liability for damages on behalf of PayPal;
-
-(d)    states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
-
-(e)    states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.  
-
-2.  DISCLAIMER OF WARRANTY
-PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE.  Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations.  Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance.  Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you.  To the extent permissible, any implied warranties are limited to ninety (90) days.
-
-
-3.  LIMITATION OF LIABILITY
-PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION.  IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION. 
-
-4.  TRADEMARK USAGE
-PayPal is a trademark PayPal, Inc. in the United States and other countries.  Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.  
-
-5.  TERM
-Your rights under this Agreement shall terminate if you fail to comply with any of the material  terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance.  If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable. 
-
-6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof.  If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.  Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA. 
-
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/README.md
deleted file mode 100644 (file)
index 2dcdc6d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-REST API SDK for PHP
-====================
-[![Build Status](https://travis-ci.org/paypal/rest-api-sdk-php.png?branch=master)](https://travis-ci.org/paypal/rest-api-sdk-php) [![Coverage Status](https://coveralls.io/repos/paypal/rest-api-sdk-php/badge.png?branch=master)](https://coveralls.io/r/paypal/rest-api-sdk-php?branch=master) [![Latest Stable Version](https://poser.pugx.org/paypal/rest-api-sdk-php/v/stable.png)](https://packagist.org/packages/paypal/rest-api-sdk-php) [![Total Downloads](https://poser.pugx.org/paypal/rest-api-sdk-php/downloads.png)](https://packagist.org/packages/paypal/rest-api-sdk-php)
-
-This repository contains PayPal's PHP SDK and samples for REST API.
-
-
-Prerequisites
--------------
-
-   * PHP 5.3 or above
-   * curl, json & openssl extensions must be enabled
-   * composer for running the sample out of the box (See http://getcomposer.org)
-
-
-Running the sample
-------------------
-
-   * Ensure that you have composer installed on your machine.
-   * Navigate to the samples folder and run 'composer update'.
-   * Optionally, update the bootstrap.php file with your own client Id and client secret.
-   * Run any of the samples in the 'samples' folder to see what the APIs can do.
-    
-    
-Usage
------
-
-To write an app that uses the SDK 
-
-   * Copy the composer.json file from the sample folder over to your project and run 'composer update' to fetch all 
-dependencies
-   * Copy the sample configuration file sdk_config.ini to a location of your choice and let the SDK know your config path using the following define directive
-    
-```php
-    define('PP_CONFIG_PATH', /path/to/your/sdk_config.ini);
-```
-    
-   * Obtain your clientId and client secret from the developer portal. You will use them to create a `OAuthTokenCredential` object.
-   * Now you are all set to make your first API call. Create a resource object as per your need and call the relevant operation or invoke one of the static methods on your resource class.
-    
-```php
-
-    $apiContext = new ApiContext(new OAuthTokenCredential('<clientId>', '<clientSecret'));
-               
-    $payment = new Payment();
-
-    $payment->setIntent("Sale");
-
-    ...
-
-    $payment->create($apiContext);
-
-      *OR*
-
-    $payment = Payment::get('payment_id', $apiContext);
-```
-
-These examples pick the SDK configuration from the sdk_config.ini file. If you do not want to use an ini file or want to pick your configuration dynamically, you can use the `$apiContext->setConfig()` method to pass in the configuration.
-       
-
-Contributing
-------------
-
-More help
----------
-
-   * [API Reference](https://developer.paypal.com/webapps/developer/docs/api/)
-   * [Reporting issues / feature requests] (https://github.com/paypal/rest-api-sdk-php/issues)
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/build.xml
deleted file mode 100644 (file)
index d4e2ad4..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="paypal-rest-sdk-php" basedir="." default="all">
-
-       <property name="basedir" value="." />
-       <property name="release.dir" value="${basedir}/release" />
-       <property name="output.dir" value="${basedir}/build" />
-       <property name="phplint.out" value="${output.dir}/phplint.txt" />
-       <property name="phploc.out" value="${output.dir}/phploc.xml" />
-       <property name="coverage.dir" value="${output.dir}/coverage" />
-       <property name="coverage.out" value="${coverage.dir}/junit.xml" />
-       <property name="clover.out" value="${coverage.dir}/clover.xml" />
-       <property name="test.dir" value="${output.dir}/test" />
-       
-       <fileset id="src.files" dir="${basedir}/lib" includes="**/*.php" />
-               
-       <target name="composer-init" description="Downloads composer.phar if not available locally">
-               <if>
-                       <available file="composer.phar" />
-                       <then>
-                               <echo>Composer is installed</echo>
-                       </then>
-                       <else>
-                               <echo message="Installing composer" />
-                               <exec command="curl -s http://getcomposer.org/installer | php"  />
-                               <exec command="php composer.phar install --dev"  />
-                       </else>
-               </if>
-       </target>
-
-       <target name="phplint">         
-               <delete file="${phplint.out}"/>
-               <apply executable="php" failonerror="true" output="${phplint.out}" append="true">
-                       <arg value="-l" />
-                       <fileset refid="src.files" />
-               </apply>
-       </target>
-
-       <target name="phploc">
-               <exec command="phploc --log-xml ${phploc.out} ." dir="${basedir}/lib"  />
-       </target>
-
-       <target name="coverage">
-               <mkdir dir="${output.dir}/coverage"/>
-               <exec command="phpunit --coverage-html=${coverage.dir} --coverage-clover=${clover.out} --log-junit=${coverage.out} --exclude-group=PayPal\\Api\\*" />
-       </target>
-
-       <target name="clean" description="Deletes build artifacts">
-               <delete dir="${output.dir}"/>
-               <mkdir dir="${output.dir}"/>
-       </target>
-       
-       <target name="test" description="Runs test cases">
-               <exec command="phpunit --testdox-html=${test.dir}/testdox.html --log-junit=${test.dir}/junit.xml"/>
-       </target>
-
-       <!-- Requires phing --> 
-       <target name="convert-test-report" >
-               <mkdir dir="build/test/report"/>
-               <phpunitreport infile="${coverage.out}" 
-                       format="frames" 
-                       todir="build/test/report" />
-       </target>
-       
-       <target name="build" depends="test" description="Builds SDK" />
-       <target name="report" depends="phplint, coverage, phploc" description="Runs code checks and coverage reports" />
-       <target name="all" depends="clean, test, build, report" description="Do everything" />
-</project>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/composer.json
deleted file mode 100644 (file)
index 20d7592..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{\r
-    "name": "paypal/rest-api-sdk-php",\r
-    "description": "PayPal's PHP SDK for REST APIs",\r
-    "keywords": ["paypal", "payments", "rest", "sdk"],\r
-    "type": "library",\r
-    "license": "Apache2",\r
-    "homepage": "https://github.com/paypal/rest-api-sdk-php",\r
-    "authors": [\r
-        {\r
-            "name": "PayPal",\r
-            "homepage": "https://github.com/paypal/rest-api-sdk-php/contributors"\r
-        }\r
-    ],\r
-    "require": {\r
-        "php": ">=5.3.0",\r
-        "ext-curl": "*",\r
-        "ext-json": "*",\r
-        "paypal/sdk-core-php": "2.4.*"\r
-    },\r
-    "require-dev": {\r
-        "phpunit/phpunit": "3.7.*",\r
-        "satooshi/php-coveralls": "dev-master"\r
-    },\r
-    "autoload": {\r
-        "psr-0": {\r
-            "PayPal": "lib/"\r
-        }\r
-    }    \r
-}\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Address.php
deleted file mode 100644 (file)
index fa9300e..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Address extends PPModel {
-       /**
-        * Line 1 of the Address (eg. number, street, etc).
-        * @param string $line1
-        */
-       public function setLine1($line1) {
-               $this->line1 = $line1;
-               return $this;
-       }
-
-       /**
-        * Line 1 of the Address (eg. number, street, etc).
-        * @return string
-        */
-       public function getLine1() {
-               return $this->line1;
-       }
-
-
-       /**
-        * Optional line 2 of the Address (eg. suite, apt #, etc.).
-        * @param string $line2
-        */
-       public function setLine2($line2) {
-               $this->line2 = $line2;
-               return $this;
-       }
-
-       /**
-        * Optional line 2 of the Address (eg. suite, apt #, etc.).
-        * @return string
-        */
-       public function getLine2() {
-               return $this->line2;
-       }
-
-
-       /**
-        * City name.
-        * @param string $city
-        */
-       public function setCity($city) {
-               $this->city = $city;
-               return $this;
-       }
-
-       /**
-        * City name.
-        * @return string
-        */
-       public function getCity() {
-               return $this->city;
-       }
-
-
-       /**
-        * 2 letter country code.
-        * @param string $country_code
-        */
-       public function setCountryCode($country_code) {
-               $this->country_code = $country_code;
-               return $this;
-       }
-
-       /**
-        * 2 letter country code.
-        * @return string
-        */
-       public function getCountryCode() {
-               return $this->country_code;
-       }
-
-       /**
-        * 2 letter country code.
-        * @param string $country_code
-        * @deprecated. Instead use setCountryCode
-        */
-       public function setCountry_code($country_code) {
-               $this->country_code = $country_code;
-               return $this;
-       }
-       /**
-        * 2 letter country code.
-        * @return string
-        * @deprecated. Instead use getCountryCode
-        */
-       public function getCountry_code() {
-               return $this->country_code;
-       }
-
-       /**
-        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
-        * @param string $postal_code
-        */
-       public function setPostalCode($postal_code) {
-               $this->postal_code = $postal_code;
-               return $this;
-       }
-
-       /**
-        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
-        * @return string
-        */
-       public function getPostalCode() {
-               return $this->postal_code;
-       }
-
-       /**
-        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
-        * @param string $postal_code
-        * @deprecated. Instead use setPostalCode
-        */
-       public function setPostal_code($postal_code) {
-               $this->postal_code = $postal_code;
-               return $this;
-       }
-       /**
-        * Zip code or equivalent is usually required for countries that have them. For list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
-        * @return string
-        * @deprecated. Instead use getPostalCode
-        */
-       public function getPostal_code() {
-               return $this->postal_code;
-       }
-
-       /**
-        * 2 letter code for US states, and the equivalent for other countries.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * 2 letter code for US states, and the equivalent for other countries.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * Phone number in E.123 format.
-        * @param string $phone
-        */
-       public function setPhone($phone) {
-               $this->phone = $phone;
-               return $this;
-       }
-
-       /**
-        * Phone number in E.123 format.
-        * @return string
-        */
-       public function getPhone() {
-               return $this->phone;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Amount.php
deleted file mode 100644 (file)
index 8c7cfe2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Amount extends PPModel {
-       /**
-        * 3 letter currency code
-        * @param string $currency
-        */
-       public function setCurrency($currency) {
-               $this->currency = $currency;
-               return $this;
-       }
-
-       /**
-        * 3 letter currency code
-        * @return string
-        */
-       public function getCurrency() {
-               return $this->currency;
-       }
-
-
-       /**
-        * Total amount charged from the Payer account (or card) to Payee. In case of a refund, this is the refunded amount to the original Payer from Payee account.
-        * @param string $total
-        */
-       public function setTotal($total) {
-               $this->total = $total;
-               return $this;
-       }
-
-       /**
-        * Total amount charged from the Payer account (or card) to Payee. In case of a refund, this is the refunded amount to the original Payer from Payee account.
-        * @return string
-        */
-       public function getTotal() {
-               return $this->total;
-       }
-
-
-       /**
-        * Additional details of the payment amount.
-        * @param PayPal\Api\Details $details
-        */
-       public function setDetails($details) {
-               $this->details = $details;
-               return $this;
-       }
-
-       /**
-        * Additional details of the payment amount.
-        * @return PayPal\Api\Details
-        */
-       public function getDetails() {
-               return $this->details;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Authorization.php
deleted file mode 100644 (file)
index 9fc4b6d..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\Authorization;
-use PayPal\Api\Capture;
-use PayPal\Transport\PPRestCall;
-
-class Authorization extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * Identifier of the authorization transaction.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the authorization transaction.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        */
-       public function setCreateTime($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was created.
-        * @return string
-        */
-       public function getCreateTime() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        * @deprecated. Instead use setCreateTime
-        */
-       public function setCreate_time($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-       /**
-        * Time the resource was created.
-        * @return string
-        * @deprecated. Instead use getCreateTime
-        */
-       public function getCreate_time() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        */
-       public function setUpdateTime($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @return string
-        */
-       public function getUpdateTime() {
-               return $this->update_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        * @deprecated. Instead use setUpdateTime
-        */
-       public function setUpdate_time($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-       /**
-        * Time the resource was last updated.
-        * @return string
-        * @deprecated. Instead use getUpdateTime
-        */
-       public function getUpdate_time() {
-               return $this->update_time;
-       }
-
-       /**
-        * Amount being authorized for.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Amount being authorized for.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-       /**
-        * State of the authorization transaction.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * State of the authorization transaction.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        */
-       public function setParentPayment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        */
-       public function getParentPayment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        * @deprecated. Instead use setParentPayment
-        */
-       public function setParent_payment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        * @deprecated. Instead use getParentPayment
-        */
-       public function getParent_payment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * Date/Time until which funds may be captured against this resource.
-        * @param string $valid_until
-        */
-       public function setValidUntil($valid_until) {
-               $this->valid_until = $valid_until;
-               return $this;
-       }
-
-       /**
-        * Date/Time until which funds may be captured against this resource.
-        * @return string
-        */
-       public function getValidUntil() {
-               return $this->valid_until;
-       }
-
-       /**
-        * Date/Time until which funds may be captured against this resource.
-        * @param string $valid_until
-        * @deprecated. Instead use setValidUntil
-        */
-       public function setValid_until($valid_until) {
-               $this->valid_until = $valid_until;
-               return $this;
-       }
-       /**
-        * Date/Time until which funds may be captured against this resource.
-        * @return string
-        * @deprecated. Instead use getValidUntil
-        */
-       public function getValid_until() {
-               return $this->valid_until;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public static function get($authorizationId, $apiContext = null) {
-               if (($authorizationId == null) || (strlen($authorizationId) <= 0)) {
-                       throw new \InvalidArgumentException("authorizationId cannot be null or empty");
-               }
-               $payLoad = "";
-               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);
-               $ret = new Authorization();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function capture($capture, $apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               if (($capture == null)) {
-                       throw new \InvalidArgumentException("capture cannot be null or empty");
-               }
-               $payLoad = $capture->toJSON();
-               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);
-               $ret = new Capture();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function void($apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               $payLoad = "";
-               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);
-               $ret = new Authorization();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function reauthorize($apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               $payLoad = $this->toJSON();
-               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);
-               $this->fromJson($json);
-               return $this;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Capture.php
deleted file mode 100644 (file)
index 773f952..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\Capture;
-use PayPal\Api\Refund;
-use PayPal\Transport\PPRestCall;
-
-class Capture extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * Identifier of the Capture transaction.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the Capture transaction.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        */
-       public function setCreateTime($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was created.
-        * @return string
-        */
-       public function getCreateTime() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        * @deprecated. Instead use setCreateTime
-        */
-       public function setCreate_time($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-       /**
-        * Time the resource was created.
-        * @return string
-        * @deprecated. Instead use getCreateTime
-        */
-       public function getCreate_time() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        */
-       public function setUpdateTime($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @return string
-        */
-       public function getUpdateTime() {
-               return $this->update_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        * @deprecated. Instead use setUpdateTime
-        */
-       public function setUpdate_time($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-       /**
-        * Time the resource was last updated.
-        * @return string
-        * @deprecated. Instead use getUpdateTime
-        */
-       public function getUpdate_time() {
-               return $this->update_time;
-       }
-
-       /**
-        * Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by seting the is_final_capture flag to true.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Amount being captured. If no amount is specified, amount is used from the authorization being captured. If amount is same as the amount that's authorized for, the state of the authorization changes to captured. If not, the state of the authorization changes to partially_captured. Alternatively, you could indicate a final capture by seting the is_final_capture flag to true.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-       /**
-        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
-        * @param boolean $is_final_capture
-        */
-       public function setIsFinalCapture($is_final_capture) {
-               $this->is_final_capture = $is_final_capture;
-               return $this;
-       }
-
-       /**
-        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
-        * @return boolean
-        */
-       public function getIsFinalCapture() {
-               return $this->is_final_capture;
-       }
-
-       /**
-        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
-        * @param boolean $is_final_capture
-        * @deprecated. Instead use setIsFinalCapture
-        */
-       public function setIs_final_capture($is_final_capture) {
-               $this->is_final_capture = $is_final_capture;
-               return $this;
-       }
-       /**
-        * whether this is a final capture for the given authorization or not. If it's final, all the remaining funds held by the authorization, will be released in the funding instrument.
-        * @return boolean
-        * @deprecated. Instead use getIsFinalCapture
-        */
-       public function getIs_final_capture() {
-               return $this->is_final_capture;
-       }
-
-       /**
-        * State of the capture transaction.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * State of the capture transaction.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        */
-       public function setParentPayment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        */
-       public function getParentPayment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        * @deprecated. Instead use setParentPayment
-        */
-       public function setParent_payment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        * @deprecated. Instead use getParentPayment
-        */
-       public function getParent_payment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public static function get($captureId, $apiContext = null) {
-               if (($captureId == null) || (strlen($captureId) <= 0)) {
-                       throw new \InvalidArgumentException("captureId cannot be null or empty");
-               }
-               $payLoad = "";
-               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);
-               $ret = new Capture();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function refund($refund, $apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               if (($refund == null)) {
-                       throw new \InvalidArgumentException("refund cannot be null or empty");
-               }
-               $payLoad = $refund->toJSON();
-               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);
-               $ret = new Refund();
-               $ret->fromJson($json);
-               return $ret;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCard.php
deleted file mode 100644 (file)
index cd0ee91..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\CreditCard;
-use PayPal\Transport\PPRestCall;
-
-class CreditCard extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * ID of the credit card being saved for later use.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * ID of the credit card being saved for later use.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Card number.
-        * @param string $number
-        */
-       public function setNumber($number) {
-               $this->number = $number;
-               return $this;
-       }
-
-       /**
-        * Card number.
-        * @return string
-        */
-       public function getNumber() {
-               return $this->number;
-       }
-
-
-       /**
-        * Type of the Card (eg. Visa, Mastercard, etc.).
-        * @param string $type
-        */
-       public function setType($type) {
-               $this->type = $type;
-               return $this;
-       }
-
-       /**
-        * Type of the Card (eg. Visa, Mastercard, etc.).
-        * @return string
-        */
-       public function getType() {
-               return $this->type;
-       }
-
-
-       /**
-        * card expiry month with value 1 - 12.
-        * @param integer $expire_month
-        */
-       public function setExpireMonth($expire_month) {
-               $this->expire_month = $expire_month;
-               return $this;
-       }
-
-       /**
-        * card expiry month with value 1 - 12.
-        * @return integer
-        */
-       public function getExpireMonth() {
-               return $this->expire_month;
-       }
-
-       /**
-        * card expiry month with value 1 - 12.
-        * @param integer $expire_month
-        * @deprecated. Instead use setExpireMonth
-        */
-       public function setExpire_month($expire_month) {
-               $this->expire_month = $expire_month;
-               return $this;
-       }
-       /**
-        * card expiry month with value 1 - 12.
-        * @return integer
-        * @deprecated. Instead use getExpireMonth
-        */
-       public function getExpire_month() {
-               return $this->expire_month;
-       }
-
-       /**
-        * 4 digit card expiry year
-        * @param integer $expire_year
-        */
-       public function setExpireYear($expire_year) {
-               $this->expire_year = $expire_year;
-               return $this;
-       }
-
-       /**
-        * 4 digit card expiry year
-        * @return integer
-        */
-       public function getExpireYear() {
-               return $this->expire_year;
-       }
-
-       /**
-        * 4 digit card expiry year
-        * @param integer $expire_year
-        * @deprecated. Instead use setExpireYear
-        */
-       public function setExpire_year($expire_year) {
-               $this->expire_year = $expire_year;
-               return $this;
-       }
-       /**
-        * 4 digit card expiry year
-        * @return integer
-        * @deprecated. Instead use getExpireYear
-        */
-       public function getExpire_year() {
-               return $this->expire_year;
-       }
-
-       /**
-        * Card validation code. Only supported when making a Payment but not when saving a credit card for future use.
-        * @param string $cvv2
-        */
-       public function setCvv2($cvv2) {
-               $this->cvv2 = $cvv2;
-               return $this;
-       }
-
-       /**
-        * Card validation code. Only supported when making a Payment but not when saving a credit card for future use.
-        * @return string
-        */
-       public function getCvv2() {
-               return $this->cvv2;
-       }
-
-
-       /**
-        * Card holder's first name.
-        * @param string $first_name
-        */
-       public function setFirstName($first_name) {
-               $this->first_name = $first_name;
-               return $this;
-       }
-
-       /**
-        * Card holder's first name.
-        * @return string
-        */
-       public function getFirstName() {
-               return $this->first_name;
-       }
-
-       /**
-        * Card holder's first name.
-        * @param string $first_name
-        * @deprecated. Instead use setFirstName
-        */
-       public function setFirst_name($first_name) {
-               $this->first_name = $first_name;
-               return $this;
-       }
-       /**
-        * Card holder's first name.
-        * @return string
-        * @deprecated. Instead use getFirstName
-        */
-       public function getFirst_name() {
-               return $this->first_name;
-       }
-
-       /**
-        * Card holder's last name.
-        * @param string $last_name
-        */
-       public function setLastName($last_name) {
-               $this->last_name = $last_name;
-               return $this;
-       }
-
-       /**
-        * Card holder's last name.
-        * @return string
-        */
-       public function getLastName() {
-               return $this->last_name;
-       }
-
-       /**
-        * Card holder's last name.
-        * @param string $last_name
-        * @deprecated. Instead use setLastName
-        */
-       public function setLast_name($last_name) {
-               $this->last_name = $last_name;
-               return $this;
-       }
-       /**
-        * Card holder's last name.
-        * @return string
-        * @deprecated. Instead use getLastName
-        */
-       public function getLast_name() {
-               return $this->last_name;
-       }
-
-       /**
-        * Billing Address associated with this card.
-        * @param PayPal\Api\Address $billing_address
-        */
-       public function setBillingAddress($billing_address) {
-               $this->billing_address = $billing_address;
-               return $this;
-       }
-
-       /**
-        * Billing Address associated with this card.
-        * @return PayPal\Api\Address
-        */
-       public function getBillingAddress() {
-               return $this->billing_address;
-       }
-
-       /**
-        * Billing Address associated with this card.
-        * @param PayPal\Api\Address $billing_address
-        * @deprecated. Instead use setBillingAddress
-        */
-       public function setBilling_address($billing_address) {
-               $this->billing_address = $billing_address;
-               return $this;
-       }
-       /**
-        * Billing Address associated with this card.
-        * @return PayPal\Api\Address
-        * @deprecated. Instead use getBillingAddress
-        */
-       public function getBilling_address() {
-               return $this->billing_address;
-       }
-
-       /**
-        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
-        * @param string $payer_id
-        */
-       public function setPayerId($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-
-       /**
-        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
-        * @return string
-        */
-       public function getPayerId() {
-               return $this->payer_id;
-       }
-
-       /**
-        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
-        * @param string $payer_id
-        * @deprecated. Instead use setPayerId
-        */
-       public function setPayer_id($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-       /**
-        * A unique identifier of the payer generated and provided by the facilitator. This is required when creating or using a tokenized funding instrument.
-        * @return string
-        * @deprecated. Instead use getPayerId
-        */
-       public function getPayer_id() {
-               return $this->payer_id;
-       }
-
-       /**
-        * State of the funding instrument.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * State of the funding instrument.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * Date/Time until this resource can be used fund a payment.
-        * @param string $valid_until
-        */
-       public function setValidUntil($valid_until) {
-               $this->valid_until = $valid_until;
-               return $this;
-       }
-
-       /**
-        * Date/Time until this resource can be used fund a payment.
-        * @return string
-        */
-       public function getValidUntil() {
-               return $this->valid_until;
-       }
-
-       /**
-        * Date/Time until this resource can be used fund a payment.
-        * @param string $valid_until
-        * @deprecated. Instead use setValidUntil
-        */
-       public function setValid_until($valid_until) {
-               $this->valid_until = $valid_until;
-               return $this;
-       }
-       /**
-        * Date/Time until this resource can be used fund a payment.
-        * @return string
-        * @deprecated. Instead use getValidUntil
-        */
-       public function getValid_until() {
-               return $this->valid_until;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public function create($apiContext = null) {
-               $payLoad = $this->toJSON();
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card", "POST", $payLoad);
-               $this->fromJson($json);
-               return $this;
-       }
-
-       public static function get($creditCardId, $apiContext = null) {
-               if (($creditCardId == null) || (strlen($creditCardId) <= 0)) {
-                       throw new \InvalidArgumentException("creditCardId cannot be null or empty");
-               }
-               $payLoad = "";
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card/$creditCardId", "GET", $payLoad);
-               $ret = new CreditCard();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function delete($apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               $payLoad = "";
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/vault/credit-card/{$this->getId()}", "DELETE", $payLoad);
-    return true;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardHistory.php
deleted file mode 100644 (file)
index 4251e62..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class CreditCardHistory extends PPModel {
-       /**
-        * A list of credit card resources
-        * @array
-        * @param PayPal\Api\CreditCard $credit-cards
-        */
-       public function setCreditCards($credit_cards) {
-               $this->{"credit-cards"} = $credit_cards;
-               return $this;
-       }
-
-       /**
-        * A list of credit card resources
-        * @return PayPal\Api\CreditCard
-        */
-       public function getCreditCards() {
-               return $this->{"credit-cards"};
-       }
-
-       /**
-        * A list of credit card resources
-        * @array
-        * @param PayPal\Api\CreditCard $credit-cards
-        * @deprecated. Instead use setCreditCards
-        */
-       public function setCredit_cards($credit_cards) {
-               $this->{"credit-cards"} = $credit_cards;
-               return $this;
-       }
-       /**
-        * A list of credit card resources
-        * @return PayPal\Api\CreditCard
-        * @deprecated. Instead use getCreditCards
-        */
-       public function getCredit_cards() {
-               return $this->{"credit-cards"};
-       }
-
-       /**
-        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
-        * @param integer $count
-        */
-       public function setCount($count) {
-               $this->count = $count;
-               return $this;
-       }
-
-       /**
-        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
-        * @return integer
-        */
-       public function getCount() {
-               return $this->count;
-       }
-
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @param string $next_id
-        */
-       public function setNextId($next_id) {
-               $this->next_id = $next_id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @return string
-        */
-       public function getNextId() {
-               return $this->next_id;
-       }
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @param string $next_id
-        * @deprecated. Instead use setNextId
-        */
-       public function setNext_id($next_id) {
-               $this->next_id = $next_id;
-               return $this;
-       }
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @return string
-        * @deprecated. Instead use getNextId
-        */
-       public function getNext_id() {
-               return $this->next_id;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/CreditCardToken.php
deleted file mode 100644 (file)
index 13430dd..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class CreditCardToken extends PPModel {
-       /**
-        * ID of a previously saved Credit Card resource using /vault/credit-card API.
-        * @param string $credit_card_id
-        */
-       public function setCreditCardId($credit_card_id) {
-               $this->credit_card_id = $credit_card_id;
-               return $this;
-       }
-
-       /**
-        * ID of a previously saved Credit Card resource using /vault/credit-card API.
-        * @return string
-        */
-       public function getCreditCardId() {
-               return $this->credit_card_id;
-       }
-
-       /**
-        * ID of a previously saved Credit Card resource using /vault/credit-card API.
-        * @param string $credit_card_id
-        * @deprecated. Instead use setCreditCardId
-        */
-       public function setCredit_card_id($credit_card_id) {
-               $this->credit_card_id = $credit_card_id;
-               return $this;
-       }
-       /**
-        * ID of a previously saved Credit Card resource using /vault/credit-card API.
-        * @return string
-        * @deprecated. Instead use getCreditCardId
-        */
-       public function getCredit_card_id() {
-               return $this->credit_card_id;
-       }
-
-       /**
-        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
-        * @param string $payer_id
-        */
-       public function setPayerId($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-
-       /**
-        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
-        * @return string
-        */
-       public function getPayerId() {
-               return $this->payer_id;
-       }
-
-       /**
-        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
-        * @param string $payer_id
-        * @deprecated. Instead use setPayerId
-        */
-       public function setPayer_id($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-       /**
-        * The unique identifier of the payer used when saving this credit card using /vault/credit-card API.
-        * @return string
-        * @deprecated. Instead use getPayerId
-        */
-       public function getPayer_id() {
-               return $this->payer_id;
-       }
-
-       /**
-        * Last 4 digits of the card number from the saved card.
-        * @param string $last4
-        */
-       public function setLast4($last4) {
-               $this->last4 = $last4;
-               return $this;
-       }
-
-       /**
-        * Last 4 digits of the card number from the saved card.
-        * @return string
-        */
-       public function getLast4() {
-               return $this->last4;
-       }
-
-
-       /**
-        * Type of the Card (eg. visa, mastercard, etc.) from the saved card. Please note that the values are always in lowercase and not meant to be used directly for display.
-        * @param string $type
-        */
-       public function setType($type) {
-               $this->type = $type;
-               return $this;
-       }
-
-       /**
-        * Type of the Card (eg. visa, mastercard, etc.) from the saved card. Please note that the values are always in lowercase and not meant to be used directly for display.
-        * @return string
-        */
-       public function getType() {
-               return $this->type;
-       }
-
-
-       /**
-        * card expiry month from the saved card with value 1 - 12
-        * @param integer $expire_month
-        */
-       public function setExpireMonth($expire_month) {
-               $this->expire_month = $expire_month;
-               return $this;
-       }
-
-       /**
-        * card expiry month from the saved card with value 1 - 12
-        * @return integer
-        */
-       public function getExpireMonth() {
-               return $this->expire_month;
-       }
-
-       /**
-        * card expiry month from the saved card with value 1 - 12
-        * @param integer $expire_month
-        * @deprecated. Instead use setExpireMonth
-        */
-       public function setExpire_month($expire_month) {
-               $this->expire_month = $expire_month;
-               return $this;
-       }
-       /**
-        * card expiry month from the saved card with value 1 - 12
-        * @return integer
-        * @deprecated. Instead use getExpireMonth
-        */
-       public function getExpire_month() {
-               return $this->expire_month;
-       }
-
-       /**
-        * 4 digit card expiry year from the saved card
-        * @param integer $expire_year
-        */
-       public function setExpireYear($expire_year) {
-               $this->expire_year = $expire_year;
-               return $this;
-       }
-
-       /**
-        * 4 digit card expiry year from the saved card
-        * @return integer
-        */
-       public function getExpireYear() {
-               return $this->expire_year;
-       }
-
-       /**
-        * 4 digit card expiry year from the saved card
-        * @param integer $expire_year
-        * @deprecated. Instead use setExpireYear
-        */
-       public function setExpire_year($expire_year) {
-               $this->expire_year = $expire_year;
-               return $this;
-       }
-       /**
-        * 4 digit card expiry year from the saved card
-        * @return integer
-        * @deprecated. Instead use getExpireYear
-        */
-       public function getExpire_year() {
-               return $this->expire_year;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Details.php
deleted file mode 100644 (file)
index ab38367..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Details extends PPModel {
-       /**
-        * Amount being charged for shipping.
-        * @param string $shipping
-        */
-       public function setShipping($shipping) {
-               $this->shipping = $shipping;
-               return $this;
-       }
-
-       /**
-        * Amount being charged for shipping.
-        * @return string
-        */
-       public function getShipping() {
-               return $this->shipping;
-       }
-
-
-       /**
-        * Sub-total (amount) of items being paid for.
-        * @param string $subtotal
-        */
-       public function setSubtotal($subtotal) {
-               $this->subtotal = $subtotal;
-               return $this;
-       }
-
-       /**
-        * Sub-total (amount) of items being paid for.
-        * @return string
-        */
-       public function getSubtotal() {
-               return $this->subtotal;
-       }
-
-
-       /**
-        * Amount being charged as tax.
-        * @param string $tax
-        */
-       public function setTax($tax) {
-               $this->tax = $tax;
-               return $this;
-       }
-
-       /**
-        * Amount being charged as tax.
-        * @return string
-        */
-       public function getTax() {
-               return $this->tax;
-       }
-
-
-       /**
-        * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
-        * @param string $fee
-        */
-       public function setFee($fee) {
-               $this->fee = $fee;
-               return $this;
-       }
-
-       /**
-        * Fee charged by PayPal. In case of a refund, this is the fee amount refunded to the original receipient of the payment.
-        * @return string
-        */
-       public function getFee() {
-               return $this->fee;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/FundingInstrument.php
deleted file mode 100644 (file)
index 6800675..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class FundingInstrument extends PPModel {
-       /**
-        * Credit Card information.
-        * @param PayPal\Api\CreditCard $credit_card
-        */
-       public function setCreditCard($credit_card) {
-               $this->credit_card = $credit_card;
-               return $this;
-       }
-
-       /**
-        * Credit Card information.
-        * @return PayPal\Api\CreditCard
-        */
-       public function getCreditCard() {
-               return $this->credit_card;
-       }
-
-       /**
-        * Credit Card information.
-        * @param PayPal\Api\CreditCard $credit_card
-        * @deprecated. Instead use setCreditCard
-        */
-       public function setCredit_card($credit_card) {
-               $this->credit_card = $credit_card;
-               return $this;
-       }
-       /**
-        * Credit Card information.
-        * @return PayPal\Api\CreditCard
-        * @deprecated. Instead use getCreditCard
-        */
-       public function getCredit_card() {
-               return $this->credit_card;
-       }
-
-       /**
-        * Credit Card information.
-        * @param PayPal\Api\CreditCardToken $credit_card_token
-        */
-       public function setCreditCardToken($credit_card_token) {
-               $this->credit_card_token = $credit_card_token;
-               return $this;
-       }
-
-       /**
-        * Credit Card information.
-        * @return PayPal\Api\CreditCardToken
-        */
-       public function getCreditCardToken() {
-               return $this->credit_card_token;
-       }
-
-       /**
-        * Credit Card information.
-        * @param PayPal\Api\CreditCardToken $credit_card_token
-        * @deprecated. Instead use setCreditCardToken
-        */
-       public function setCredit_card_token($credit_card_token) {
-               $this->credit_card_token = $credit_card_token;
-               return $this;
-       }
-       /**
-        * Credit Card information.
-        * @return PayPal\Api\CreditCardToken
-        * @deprecated. Instead use getCreditCardToken
-        */
-       public function getCredit_card_token() {
-               return $this->credit_card_token;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/HyperSchema.php
deleted file mode 100644 (file)
index a09ee92..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class HyperSchema extends PPModel {
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-       /**
-        * 
-        * @param string $fragmentResolution
-        */
-       public function setFragmentResolution($fragmentResolution) {
-               $this->fragmentResolution = $fragmentResolution;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getFragmentResolution() {
-               return $this->fragmentResolution;
-       }
-
-
-       /**
-        * 
-        * @param boolean $readonly
-        */
-       public function setReadonly($readonly) {
-               $this->readonly = $readonly;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return boolean
-        */
-       public function getReadonly() {
-               return $this->readonly;
-       }
-
-
-       /**
-        * 
-        * @param string $contentEncoding
-        */
-       public function setContentEncoding($contentEncoding) {
-               $this->contentEncoding = $contentEncoding;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getContentEncoding() {
-               return $this->contentEncoding;
-       }
-
-
-       /**
-        * 
-        * @param string $pathStart
-        */
-       public function setPathStart($pathStart) {
-               $this->pathStart = $pathStart;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getPathStart() {
-               return $this->pathStart;
-       }
-
-
-       /**
-        * 
-        * @param string $mediaType
-        */
-       public function setMediaType($mediaType) {
-               $this->mediaType = $mediaType;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getMediaType() {
-               return $this->mediaType;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Item.php
deleted file mode 100644 (file)
index 4a40632..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Item extends PPModel {
-       /**
-        * Number of items.
-        * @param string $quantity
-        */
-       public function setQuantity($quantity) {
-               $this->quantity = $quantity;
-               return $this;
-       }
-
-       /**
-        * Number of items.
-        * @return string
-        */
-       public function getQuantity() {
-               return $this->quantity;
-       }
-
-
-       /**
-        * Name of the item.
-        * @param string $name
-        */
-       public function setName($name) {
-               $this->name = $name;
-               return $this;
-       }
-
-       /**
-        * Name of the item.
-        * @return string
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-
-       /**
-        * Cost of the item.
-        * @param string $price
-        */
-       public function setPrice($price) {
-               $this->price = $price;
-               return $this;
-       }
-
-       /**
-        * Cost of the item.
-        * @return string
-        */
-       public function getPrice() {
-               return $this->price;
-       }
-
-
-       /**
-        * 3-letter Currency Code
-        * @param string $currency
-        */
-       public function setCurrency($currency) {
-               $this->currency = $currency;
-               return $this;
-       }
-
-       /**
-        * 3-letter Currency Code
-        * @return string
-        */
-       public function getCurrency() {
-               return $this->currency;
-       }
-
-
-       /**
-        * Number or code to identify the item in your catalog/records.
-        * @param string $sku
-        */
-       public function setSku($sku) {
-               $this->sku = $sku;
-               return $this;
-       }
-
-       /**
-        * Number or code to identify the item in your catalog/records.
-        * @return string
-        */
-       public function getSku() {
-               return $this->sku;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ItemList.php
deleted file mode 100644 (file)
index ea38da6..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class ItemList extends PPModel {
-       /**
-        * List of items.
-        * @array
-        * @param PayPal\Api\Item $items
-        */
-       public function setItems($items) {
-               $this->items = $items;
-               return $this;
-       }
-
-       /**
-        * List of items.
-        * @return PayPal\Api\Item
-        */
-       public function getItems() {
-               return $this->items;
-       }
-
-
-       /**
-        * Shipping address.
-        * @param PayPal\Api\ShippingAddress $shipping_address
-        */
-       public function setShippingAddress($shipping_address) {
-               $this->shipping_address = $shipping_address;
-               return $this;
-       }
-
-       /**
-        * Shipping address.
-        * @return PayPal\Api\ShippingAddress
-        */
-       public function getShippingAddress() {
-               return $this->shipping_address;
-       }
-
-       /**
-        * Shipping address.
-        * @param PayPal\Api\ShippingAddress $shipping_address
-        * @deprecated. Instead use setShippingAddress
-        */
-       public function setShipping_address($shipping_address) {
-               $this->shipping_address = $shipping_address;
-               return $this;
-       }
-       /**
-        * Shipping address.
-        * @return PayPal\Api\ShippingAddress
-        * @deprecated. Instead use getShippingAddress
-        */
-       public function getShipping_address() {
-               return $this->shipping_address;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Links.php
deleted file mode 100644 (file)
index 9cbd85e..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Links extends PPModel {
-       /**
-        * 
-        * @param string $href
-        */
-       public function setHref($href) {
-               $this->href = $href;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getHref() {
-               return $this->href;
-       }
-
-
-       /**
-        * 
-        * @param string $rel
-        */
-       public function setRel($rel) {
-               $this->rel = $rel;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getRel() {
-               return $this->rel;
-       }
-
-
-       /**
-        * 
-        * @param PayPal\Api\HyperSchema $targetSchema
-        */
-       public function setTargetSchema($targetSchema) {
-               $this->targetSchema = $targetSchema;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\HyperSchema
-        */
-       public function getTargetSchema() {
-               return $this->targetSchema;
-       }
-
-
-       /**
-        * 
-        * @param string $method
-        */
-       public function setMethod($method) {
-               $this->method = $method;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getMethod() {
-               return $this->method;
-       }
-
-
-       /**
-        * 
-        * @param string $enctype
-        */
-       public function setEnctype($enctype) {
-               $this->enctype = $enctype;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return string
-        */
-       public function getEnctype() {
-               return $this->enctype;
-       }
-
-
-       /**
-        * 
-        * @param PayPal\Api\HyperSchema $schema
-        */
-       public function setSchema($schema) {
-               $this->schema = $schema;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\HyperSchema
-        */
-       public function getSchema() {
-               return $this->schema;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payee.php
deleted file mode 100644 (file)
index d0ccea3..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Payee extends PPModel {
-       /**
-        * 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.
-        * @param string $email
-        */
-       public function setEmail($email) {
-               $this->email = $email;
-               return $this;
-       }
-
-       /**
-        * 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.
-        * @return string
-        */
-       public function getEmail() {
-               return $this->email;
-       }
-
-
-       /**
-        * Encrypted PayPal Account identifier for the Payee.
-        * @param string $merchant_id
-        */
-       public function setMerchantId($merchant_id) {
-               $this->merchant_id = $merchant_id;
-               return $this;
-       }
-
-       /**
-        * Encrypted PayPal Account identifier for the Payee.
-        * @return string
-        */
-       public function getMerchantId() {
-               return $this->merchant_id;
-       }
-
-       /**
-        * Encrypted PayPal Account identifier for the Payee.
-        * @param string $merchant_id
-        * @deprecated. Instead use setMerchantId
-        */
-       public function setMerchant_id($merchant_id) {
-               $this->merchant_id = $merchant_id;
-               return $this;
-       }
-       /**
-        * Encrypted PayPal Account identifier for the Payee.
-        * @return string
-        * @deprecated. Instead use getMerchantId
-        */
-       public function getMerchant_id() {
-               return $this->merchant_id;
-       }
-
-       /**
-        * Phone number (in E.123 format) associated with the Payee's PayPal Account. If the provided phont number 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.
-        * @param string $phone
-        */
-       public function setPhone($phone) {
-               $this->phone = $phone;
-               return $this;
-       }
-
-       /**
-        * Phone number (in E.123 format) associated with the Payee's PayPal Account. If the provided phont number 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.
-        * @return string
-        */
-       public function getPhone() {
-               return $this->phone;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payer.php
deleted file mode 100644 (file)
index d21d238..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Payer extends PPModel {
-       /**
-        * Payment method being used - PayPal Wallet payment or Direct Credit card.
-        * @param string $payment_method
-        */
-       public function setPaymentMethod($payment_method) {
-               $this->payment_method = $payment_method;
-               return $this;
-       }
-
-       /**
-        * Payment method being used - PayPal Wallet payment or Direct Credit card.
-        * @return string
-        */
-       public function getPaymentMethod() {
-               return $this->payment_method;
-       }
-
-       /**
-        * Payment method being used - PayPal Wallet payment or Direct Credit card.
-        * @param string $payment_method
-        * @deprecated. Instead use setPaymentMethod
-        */
-       public function setPayment_method($payment_method) {
-               $this->payment_method = $payment_method;
-               return $this;
-       }
-       /**
-        * Payment method being used - PayPal Wallet payment or Direct Credit card.
-        * @return string
-        * @deprecated. Instead use getPaymentMethod
-        */
-       public function getPayment_method() {
-               return $this->payment_method;
-       }
-
-       /**
-        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
-        * @array
-        * @param PayPal\Api\FundingInstrument $funding_instruments
-        */
-       public function setFundingInstruments($funding_instruments) {
-               $this->funding_instruments = $funding_instruments;
-               return $this;
-       }
-
-       /**
-        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
-        * @return PayPal\Api\FundingInstrument
-        */
-       public function getFundingInstruments() {
-               return $this->funding_instruments;
-       }
-
-       /**
-        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
-        * @array
-        * @param PayPal\Api\FundingInstrument $funding_instruments
-        * @deprecated. Instead use setFundingInstruments
-        */
-       public function setFunding_instruments($funding_instruments) {
-               $this->funding_instruments = $funding_instruments;
-               return $this;
-       }
-       /**
-        * List of funding instruments from where the funds of the current payment come from. Typically a credit card.
-        * @return PayPal\Api\FundingInstrument
-        * @deprecated. Instead use getFundingInstruments
-        */
-       public function getFunding_instruments() {
-               return $this->funding_instruments;
-       }
-
-       /**
-        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
-        * @param PayPal\Api\PayerInfo $payer_info
-        */
-       public function setPayerInfo($payer_info) {
-               $this->payer_info = $payer_info;
-               return $this;
-       }
-
-       /**
-        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
-        * @return PayPal\Api\PayerInfo
-        */
-       public function getPayerInfo() {
-               return $this->payer_info;
-       }
-
-       /**
-        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
-        * @param PayPal\Api\PayerInfo $payer_info
-        * @deprecated. Instead use setPayerInfo
-        */
-       public function setPayer_info($payer_info) {
-               $this->payer_info = $payer_info;
-               return $this;
-       }
-       /**
-        * Information related to the Payer. In case of PayPal Wallet payment, this information will be filled in by PayPal after the user approves the payment using their PayPal Wallet. 
-        * @return PayPal\Api\PayerInfo
-        * @deprecated. Instead use getPayerInfo
-        */
-       public function getPayer_info() {
-               return $this->payer_info;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PayerInfo.php
deleted file mode 100644 (file)
index a9ff596..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class PayerInfo extends PPModel {
-       /**
-        * Email address representing the Payer.
-        * @param string $email
-        */
-       public function setEmail($email) {
-               $this->email = $email;
-               return $this;
-       }
-
-       /**
-        * Email address representing the Payer.
-        * @return string
-        */
-       public function getEmail() {
-               return $this->email;
-       }
-
-
-       /**
-        * First Name of the Payer from their PayPal Account.
-        * @param string $first_name
-        */
-       public function setFirstName($first_name) {
-               $this->first_name = $first_name;
-               return $this;
-       }
-
-       /**
-        * First Name of the Payer from their PayPal Account.
-        * @return string
-        */
-       public function getFirstName() {
-               return $this->first_name;
-       }
-
-       /**
-        * First Name of the Payer from their PayPal Account.
-        * @param string $first_name
-        * @deprecated. Instead use setFirstName
-        */
-       public function setFirst_name($first_name) {
-               $this->first_name = $first_name;
-               return $this;
-       }
-       /**
-        * First Name of the Payer from their PayPal Account.
-        * @return string
-        * @deprecated. Instead use getFirstName
-        */
-       public function getFirst_name() {
-               return $this->first_name;
-       }
-
-       /**
-        * Last Name of the Payer from their PayPal Account.
-        * @param string $last_name
-        */
-       public function setLastName($last_name) {
-               $this->last_name = $last_name;
-               return $this;
-       }
-
-       /**
-        * Last Name of the Payer from their PayPal Account.
-        * @return string
-        */
-       public function getLastName() {
-               return $this->last_name;
-       }
-
-       /**
-        * Last Name of the Payer from their PayPal Account.
-        * @param string $last_name
-        * @deprecated. Instead use setLastName
-        */
-       public function setLast_name($last_name) {
-               $this->last_name = $last_name;
-               return $this;
-       }
-       /**
-        * Last Name of the Payer from their PayPal Account.
-        * @return string
-        * @deprecated. Instead use getLastName
-        */
-       public function getLast_name() {
-               return $this->last_name;
-       }
-
-       /**
-        * PayPal assigned Payer ID.
-        * @param string $payer_id
-        */
-       public function setPayerId($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-
-       /**
-        * PayPal assigned Payer ID.
-        * @return string
-        */
-       public function getPayerId() {
-               return $this->payer_id;
-       }
-
-       /**
-        * PayPal assigned Payer ID.
-        * @param string $payer_id
-        * @deprecated. Instead use setPayerId
-        */
-       public function setPayer_id($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-       /**
-        * PayPal assigned Payer ID.
-        * @return string
-        * @deprecated. Instead use getPayerId
-        */
-       public function getPayer_id() {
-               return $this->payer_id;
-       }
-
-       /**
-        * Phone number representing the Payer.
-        * @param string $phone
-        */
-       public function setPhone($phone) {
-               $this->phone = $phone;
-               return $this;
-       }
-
-       /**
-        * Phone number representing the Payer.
-        * @return string
-        */
-       public function getPhone() {
-               return $this->phone;
-       }
-
-
-       /**
-        * Shipping address of the Payer from their PayPal Account.
-        * @param PayPal\Api\Address $shipping_address
-        */
-       public function setShippingAddress($shipping_address) {
-               $this->shipping_address = $shipping_address;
-               return $this;
-       }
-
-       /**
-        * Shipping address of the Payer from their PayPal Account.
-        * @return PayPal\Api\Address
-        */
-       public function getShippingAddress() {
-               return $this->shipping_address;
-       }
-
-       /**
-        * Shipping address of the Payer from their PayPal Account.
-        * @param PayPal\Api\Address $shipping_address
-        * @deprecated. Instead use setShippingAddress
-        */
-       public function setShipping_address($shipping_address) {
-               $this->shipping_address = $shipping_address;
-               return $this;
-       }
-       /**
-        * Shipping address of the Payer from their PayPal Account.
-        * @return PayPal\Api\Address
-        * @deprecated. Instead use getShippingAddress
-        */
-       public function getShipping_address() {
-               return $this->shipping_address;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Payment.php
deleted file mode 100644 (file)
index cf223f0..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\Payment;
-use PayPal\Api\PaymentHistory;
-use PayPal\Transport\PPRestCall;
-
-class Payment extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * Identifier of the payment resource created.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the payment resource created.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        */
-       public function setCreateTime($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was created.
-        * @return string
-        */
-       public function getCreateTime() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        * @deprecated. Instead use setCreateTime
-        */
-       public function setCreate_time($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-       /**
-        * Time the resource was created.
-        * @return string
-        * @deprecated. Instead use getCreateTime
-        */
-       public function getCreate_time() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        */
-       public function setUpdateTime($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @return string
-        */
-       public function getUpdateTime() {
-               return $this->update_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        * @deprecated. Instead use setUpdateTime
-        */
-       public function setUpdate_time($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-       /**
-        * Time the resource was last updated.
-        * @return string
-        * @deprecated. Instead use getUpdateTime
-        */
-       public function getUpdate_time() {
-               return $this->update_time;
-       }
-
-       /**
-        * Intent of the payment - Sale or Authorization or Order.
-        * @param string $intent
-        */
-       public function setIntent($intent) {
-               $this->intent = $intent;
-               return $this;
-       }
-
-       /**
-        * Intent of the payment - Sale or Authorization or Order.
-        * @return string
-        */
-       public function getIntent() {
-               return $this->intent;
-       }
-
-
-       /**
-        * Source of the funds for this payment represented by a PayPal account or a direct credit card.
-        * @param PayPal\Api\Payer $payer
-        */
-       public function setPayer($payer) {
-               $this->payer = $payer;
-               return $this;
-       }
-
-       /**
-        * Source of the funds for this payment represented by a PayPal account or a direct credit card.
-        * @return PayPal\Api\Payer
-        */
-       public function getPayer() {
-               return $this->payer;
-       }
-
-
-       /**
-        * A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
-        * @array
-        * @param PayPal\Api\Transaction $transactions
-        */
-       public function setTransactions($transactions) {
-               $this->transactions = $transactions;
-               return $this;
-       }
-
-       /**
-        * A payment can have more than one transaction, with each transaction establishing a contract between the payer and a payee
-        * @return PayPal\Api\Transaction
-        */
-       public function getTransactions() {
-               return $this->transactions;
-       }
-
-
-       /**
-        * state of the payment
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * state of the payment
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
-        * @param PayPal\Api\RedirectUrls $redirect_urls
-        */
-       public function setRedirectUrls($redirect_urls) {
-               $this->redirect_urls = $redirect_urls;
-               return $this;
-       }
-
-       /**
-        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
-        * @return PayPal\Api\RedirectUrls
-        */
-       public function getRedirectUrls() {
-               return $this->redirect_urls;
-       }
-
-       /**
-        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
-        * @param PayPal\Api\RedirectUrls $redirect_urls
-        * @deprecated. Instead use setRedirectUrls
-        */
-       public function setRedirect_urls($redirect_urls) {
-               $this->redirect_urls = $redirect_urls;
-               return $this;
-       }
-       /**
-        * Redirect urls required only when using payment_method as PayPal - the only settings supported are return and cancel urls.
-        * @return PayPal\Api\RedirectUrls
-        * @deprecated. Instead use getRedirectUrls
-        */
-       public function getRedirect_urls() {
-               return $this->redirect_urls;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public function create($apiContext = null) {
-               $payLoad = $this->toJSON();
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment", "POST", $payLoad);
-               $this->fromJson($json);
-               return $this;
-       }
-
-       public static function get($paymentId, $apiContext = null) {
-               if (($paymentId == null) || (strlen($paymentId) <= 0)) {
-                       throw new \InvalidArgumentException("paymentId cannot be null or empty");
-               }
-               $payLoad = "";
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment/$paymentId", "GET", $payLoad);
-               $ret = new Payment();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function execute($paymentExecution, $apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               if (($paymentExecution == null)) {
-                       throw new \InvalidArgumentException("paymentExecution cannot be null or empty");
-               }
-               $payLoad = $paymentExecution->toJSON();
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment/{$this->getId()}/execute", "POST", $payLoad);
-               $ret = new Payment();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public static function all($params, $apiContext = null) {
-               if (($params == null)) {
-                       throw new \InvalidArgumentException("params cannot be null or empty");
-               }
-               $payLoad = "";
-               $allowedParams = array('count' => 1, 'start_id' => 1, 'start_index' => 1, 'start_time' => 1, 'end_time' => 1, 'payee_id' => 1, 'sort_by' => 1, 'sort_order' => 1, );
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/payment?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad);
-               $ret = new PaymentHistory();
-               $ret->fromJson($json);
-               return $ret;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentExecution.php
deleted file mode 100644 (file)
index b7048eb..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class PaymentExecution extends PPModel {
-       /**
-        * PayPal assigned Payer ID returned in the approval return url.
-        * @param string $payer_id
-        */
-       public function setPayerId($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-
-       /**
-        * PayPal assigned Payer ID returned in the approval return url.
-        * @return string
-        */
-       public function getPayerId() {
-               return $this->payer_id;
-       }
-
-       /**
-        * PayPal assigned Payer ID returned in the approval return url.
-        * @param string $payer_id
-        * @deprecated. Instead use setPayerId
-        */
-       public function setPayer_id($payer_id) {
-               $this->payer_id = $payer_id;
-               return $this;
-       }
-       /**
-        * PayPal assigned Payer ID returned in the approval return url.
-        * @return string
-        * @deprecated. Instead use getPayerId
-        */
-       public function getPayer_id() {
-               return $this->payer_id;
-       }
-
-       /**
-        * If the amount needs to be updated after obtaining the PayPal Payer info (eg. shipping address), it can be updated using this element.
-        * @array
-        * @param PayPal\Api\Transactions $transactions
-        */
-       public function setTransactions($transactions) {
-               $this->transactions = $transactions;
-               return $this;
-       }
-
-       /**
-        * If the amount needs to be updated after obtaining the PayPal Payer info (eg. shipping address), it can be updated using this element.
-        * @return PayPal\Api\Transactions
-        */
-       public function getTransactions() {
-               return $this->transactions;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/PaymentHistory.php
deleted file mode 100644 (file)
index e9f28af..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class PaymentHistory extends PPModel {
-       /**
-        * A list of Payment resources
-        * @array
-        * @param PayPal\Api\Payment $payments
-        */
-       public function setPayments($payments) {
-               $this->payments = $payments;
-               return $this;
-       }
-
-       /**
-        * A list of Payment resources
-        * @return PayPal\Api\Payment
-        */
-       public function getPayments() {
-               return $this->payments;
-       }
-
-
-       /**
-        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
-        * @param integer $count
-        */
-       public function setCount($count) {
-               $this->count = $count;
-               return $this;
-       }
-
-       /**
-        * Number of items returned in each range of results. Note that the last results range could have fewer items than the requested number of items.
-        * @return integer
-        */
-       public function getCount() {
-               return $this->count;
-       }
-
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @param string $next_id
-        */
-       public function setNextId($next_id) {
-               $this->next_id = $next_id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @return string
-        */
-       public function getNextId() {
-               return $this->next_id;
-       }
-
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @param string $next_id
-        * @deprecated. Instead use setNextId
-        */
-       public function setNext_id($next_id) {
-               $this->next_id = $next_id;
-               return $this;
-       }
-       /**
-        * Identifier of the next element to get the next range of results.
-        * @return string
-        * @deprecated. Instead use getNextId
-        */
-       public function getNext_id() {
-               return $this->next_id;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RedirectUrls.php
deleted file mode 100644 (file)
index c954b49..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class RedirectUrls extends PPModel {
-       /**
-        * Url where the payer would be redirected to after approving the payment.
-        * @param string $return_url
-        */
-       public function setReturnUrl($return_url) {
-               $this->return_url = $return_url;
-               return $this;
-       }
-
-       /**
-        * Url where the payer would be redirected to after approving the payment.
-        * @return string
-        */
-       public function getReturnUrl() {
-               return $this->return_url;
-       }
-
-       /**
-        * Url where the payer would be redirected to after approving the payment.
-        * @param string $return_url
-        * @deprecated. Instead use setReturnUrl
-        */
-       public function setReturn_url($return_url) {
-               $this->return_url = $return_url;
-               return $this;
-       }
-       /**
-        * Url where the payer would be redirected to after approving the payment.
-        * @return string
-        * @deprecated. Instead use getReturnUrl
-        */
-       public function getReturn_url() {
-               return $this->return_url;
-       }
-
-       /**
-        * Url where the payer would be redirected to after canceling the payment.
-        * @param string $cancel_url
-        */
-       public function setCancelUrl($cancel_url) {
-               $this->cancel_url = $cancel_url;
-               return $this;
-       }
-
-       /**
-        * Url where the payer would be redirected to after canceling the payment.
-        * @return string
-        */
-       public function getCancelUrl() {
-               return $this->cancel_url;
-       }
-
-       /**
-        * Url where the payer would be redirected to after canceling the payment.
-        * @param string $cancel_url
-        * @deprecated. Instead use setCancelUrl
-        */
-       public function setCancel_url($cancel_url) {
-               $this->cancel_url = $cancel_url;
-               return $this;
-       }
-       /**
-        * Url where the payer would be redirected to after canceling the payment.
-        * @return string
-        * @deprecated. Instead use getCancelUrl
-        */
-       public function getCancel_url() {
-               return $this->cancel_url;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Refund.php
deleted file mode 100644 (file)
index 095200a..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\Refund;
-use PayPal\Transport\PPRestCall;
-
-class Refund extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * Identifier of the refund transaction.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the refund transaction.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        */
-       public function setCreateTime($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was created.
-        * @return string
-        */
-       public function getCreateTime() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        * @deprecated. Instead use setCreateTime
-        */
-       public function setCreate_time($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-       /**
-        * Time the resource was created.
-        * @return string
-        * @deprecated. Instead use getCreateTime
-        */
-       public function getCreate_time() {
-               return $this->create_time;
-       }
-
-       /**
-        * Details including both refunded amount (to Payer) and refunded fee (to Payee).If amount is not specified, it's assumed to be full refund.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Details including both refunded amount (to Payer) and refunded fee (to Payee).If amount is not specified, it's assumed to be full refund.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-       /**
-        * State of the refund transaction.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * State of the refund transaction.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * ID of the Sale transaction being refunded. 
-        * @param string $sale_id
-        */
-       public function setSaleId($sale_id) {
-               $this->sale_id = $sale_id;
-               return $this;
-       }
-
-       /**
-        * ID of the Sale transaction being refunded. 
-        * @return string
-        */
-       public function getSaleId() {
-               return $this->sale_id;
-       }
-
-       /**
-        * ID of the Sale transaction being refunded. 
-        * @param string $sale_id
-        * @deprecated. Instead use setSaleId
-        */
-       public function setSale_id($sale_id) {
-               $this->sale_id = $sale_id;
-               return $this;
-       }
-       /**
-        * ID of the Sale transaction being refunded. 
-        * @return string
-        * @deprecated. Instead use getSaleId
-        */
-       public function getSale_id() {
-               return $this->sale_id;
-       }
-
-       /**
-        * ID of the Capture transaction being refunded. 
-        * @param string $capture_id
-        */
-       public function setCaptureId($capture_id) {
-               $this->capture_id = $capture_id;
-               return $this;
-       }
-
-       /**
-        * ID of the Capture transaction being refunded. 
-        * @return string
-        */
-       public function getCaptureId() {
-               return $this->capture_id;
-       }
-
-       /**
-        * ID of the Capture transaction being refunded. 
-        * @param string $capture_id
-        * @deprecated. Instead use setCaptureId
-        */
-       public function setCapture_id($capture_id) {
-               $this->capture_id = $capture_id;
-               return $this;
-       }
-       /**
-        * ID of the Capture transaction being refunded. 
-        * @return string
-        * @deprecated. Instead use getCaptureId
-        */
-       public function getCapture_id() {
-               return $this->capture_id;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        */
-       public function setParentPayment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        */
-       public function getParentPayment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        * @deprecated. Instead use setParentPayment
-        */
-       public function setParent_payment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        * @deprecated. Instead use getParentPayment
-        */
-       public function getParent_payment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public static function get($refundId, $apiContext = null) {
-               if (($refundId == null) || (strlen($refundId) <= 0)) {
-                       throw new \InvalidArgumentException("refundId cannot be null or empty");
-               }
-               $payLoad = "";
-               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);
-               $ret = new Refund();
-               $ret->fromJson($json);
-               return $ret;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/RelatedResources.php
deleted file mode 100644 (file)
index 7e97776..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class RelatedResources extends PPModel {
-       /**
-        * A sale transaction
-        * @param PayPal\Api\Sale $sale
-        */
-       public function setSale($sale) {
-               $this->sale = $sale;
-               return $this;
-       }
-
-       /**
-        * A sale transaction
-        * @return PayPal\Api\Sale
-        */
-       public function getSale() {
-               return $this->sale;
-       }
-
-
-       /**
-        * An authorization transaction
-        * @param PayPal\Api\Authorization $authorization
-        */
-       public function setAuthorization($authorization) {
-               $this->authorization = $authorization;
-               return $this;
-       }
-
-       /**
-        * An authorization transaction
-        * @return PayPal\Api\Authorization
-        */
-       public function getAuthorization() {
-               return $this->authorization;
-       }
-
-
-       /**
-        * A capture transaction
-        * @param PayPal\Api\Capture $capture
-        */
-       public function setCapture($capture) {
-               $this->capture = $capture;
-               return $this;
-       }
-
-       /**
-        * A capture transaction
-        * @return PayPal\Api\Capture
-        */
-       public function getCapture() {
-               return $this->capture;
-       }
-
-
-       /**
-        * A refund transaction
-        * @param PayPal\Api\Refund $refund
-        */
-       public function setRefund($refund) {
-               $this->refund = $refund;
-               return $this;
-       }
-
-       /**
-        * A refund transaction
-        * @return PayPal\Api\Refund
-        */
-       public function getRefund() {
-               return $this->refund;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Sale.php
deleted file mode 100644 (file)
index 5fb1284..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-use PayPal\Rest\IResource;
-use PayPal\Rest\Call;
-use PayPal\Rest\ApiContext;
-use PayPal\Api\Sale;
-use PayPal\Api\Refund;
-use PayPal\Transport\PPRestCall;
-
-class Sale extends PPModel implements IResource {
-
-       private static $credential;
-
-       /**
-        *
-        * @deprecated. Pass ApiContext to create/get methods instead
-        */
-       public static function setCredential($credential) {
-               self::$credential = $credential;
-       }
-
-       /**
-        * Identifier of the authorization transaction.
-        * @param string $id
-        */
-       public function setId($id) {
-               $this->id = $id;
-               return $this;
-       }
-
-       /**
-        * Identifier of the authorization transaction.
-        * @return string
-        */
-       public function getId() {
-               return $this->id;
-       }
-
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        */
-       public function setCreateTime($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was created.
-        * @return string
-        */
-       public function getCreateTime() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was created.
-        * @param string $create_time
-        * @deprecated. Instead use setCreateTime
-        */
-       public function setCreate_time($create_time) {
-               $this->create_time = $create_time;
-               return $this;
-       }
-       /**
-        * Time the resource was created.
-        * @return string
-        * @deprecated. Instead use getCreateTime
-        */
-       public function getCreate_time() {
-               return $this->create_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        */
-       public function setUpdateTime($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @return string
-        */
-       public function getUpdateTime() {
-               return $this->update_time;
-       }
-
-       /**
-        * Time the resource was last updated.
-        * @param string $update_time
-        * @deprecated. Instead use setUpdateTime
-        */
-       public function setUpdate_time($update_time) {
-               $this->update_time = $update_time;
-               return $this;
-       }
-       /**
-        * Time the resource was last updated.
-        * @return string
-        * @deprecated. Instead use getUpdateTime
-        */
-       public function getUpdate_time() {
-               return $this->update_time;
-       }
-
-       /**
-        * Amount being collected.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Amount being collected.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-       /**
-        * State of the sale transaction.
-        * @param string $state
-        */
-       public function setState($state) {
-               $this->state = $state;
-               return $this;
-       }
-
-       /**
-        * State of the sale transaction.
-        * @return string
-        */
-       public function getState() {
-               return $this->state;
-       }
-
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        */
-       public function setParentPayment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        */
-       public function getParentPayment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @param string $parent_payment
-        * @deprecated. Instead use setParentPayment
-        */
-       public function setParent_payment($parent_payment) {
-               $this->parent_payment = $parent_payment;
-               return $this;
-       }
-       /**
-        * ID of the Payment resource that this transaction is based on.
-        * @return string
-        * @deprecated. Instead use getParentPayment
-        */
-       public function getParent_payment() {
-               return $this->parent_payment;
-       }
-
-       /**
-        * 
-        * @array
-        * @param PayPal\Api\Links $links
-        */
-       public function setLinks($links) {
-               $this->links = $links;
-               return $this;
-       }
-
-       /**
-        * 
-        * @return PayPal\Api\Links
-        */
-       public function getLinks() {
-               return $this->links;
-       }
-
-
-
-       public static function get($saleId, $apiContext = null) {
-               if (($saleId == null) || (strlen($saleId) <= 0)) {
-                       throw new \InvalidArgumentException("saleId cannot be null or empty");
-               }
-               $payLoad = "";
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/sale/$saleId", "GET", $payLoad);
-               $ret = new Sale();
-               $ret->fromJson($json);
-               return $ret;
-       }
-
-       public function refund($refund, $apiContext = null) {
-               if ($this->getId() == null) {
-                       throw new \InvalidArgumentException("Id cannot be null");
-               }
-               if (($refund == null)) {
-                       throw new \InvalidArgumentException("refund cannot be null or empty");
-               }
-               $payLoad = $refund->toJSON();
-               if ($apiContext == null) {
-                       $apiContext = new ApiContext(self::$credential);
-               }
-               $call = new PPRestCall($apiContext);
-               $json = $call->execute(array('PayPal\Rest\RestHandler'), "/v1/payments/sale/{$this->getId()}/refund", "POST", $payLoad);
-               $ret = new Refund();
-               $ret->fromJson($json);
-               return $ret;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/ShippingAddress.php
deleted file mode 100644 (file)
index a7f4de9..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class ShippingAddress extends Address {
-       /**
-        * Name of the recipient at this address.
-        * @param string $recipient_name
-        */
-       public function setRecipientName($recipient_name) {
-               $this->recipient_name = $recipient_name;
-               return $this;
-       }
-
-       /**
-        * Name of the recipient at this address.
-        * @return string
-        */
-       public function getRecipientName() {
-               return $this->recipient_name;
-       }
-
-       /**
-        * Name of the recipient at this address.
-        * @param string $recipient_name
-        * @deprecated. Instead use setRecipientName
-        */
-       public function setRecipient_name($recipient_name) {
-               $this->recipient_name = $recipient_name;
-               return $this;
-       }
-       /**
-        * Name of the recipient at this address.
-        * @return string
-        * @deprecated. Instead use getRecipientName
-        */
-       public function getRecipient_name() {
-               return $this->recipient_name;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transaction.php
deleted file mode 100644 (file)
index d8420aa..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Transaction extends PPModel {
-       /**
-        * Amount being collected.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Amount being collected.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-       /**
-        * Recepient of the funds in this transaction.
-        * @param PayPal\Api\Payee $payee
-        */
-       public function setPayee($payee) {
-               $this->payee = $payee;
-               return $this;
-       }
-
-       /**
-        * Recepient of the funds in this transaction.
-        * @return PayPal\Api\Payee
-        */
-       public function getPayee() {
-               return $this->payee;
-       }
-
-
-       /**
-        * Description of what is being paid for.
-        * @param string $description
-        */
-       public function setDescription($description) {
-               $this->description = $description;
-               return $this;
-       }
-
-       /**
-        * Description of what is being paid for.
-        * @return string
-        */
-       public function getDescription() {
-               return $this->description;
-       }
-
-
-       /**
-        * List of items being paid for.
-        * @param PayPal\Api\ItemList $item_list
-        */
-       public function setItemList($item_list) {
-               $this->item_list = $item_list;
-               return $this;
-       }
-
-       /**
-        * List of items being paid for.
-        * @return PayPal\Api\ItemList
-        */
-       public function getItemList() {
-               return $this->item_list;
-       }
-
-       /**
-        * List of items being paid for.
-        * @param PayPal\Api\ItemList $item_list
-        * @deprecated. Instead use setItemList
-        */
-       public function setItem_list($item_list) {
-               $this->item_list = $item_list;
-               return $this;
-       }
-       /**
-        * List of items being paid for.
-        * @return PayPal\Api\ItemList
-        * @deprecated. Instead use getItemList
-        */
-       public function getItem_list() {
-               return $this->item_list;
-       }
-
-       /**
-        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
-        * @array
-        * @param PayPal\Api\RelatedResources $related_resources
-        */
-       public function setRelatedResources($related_resources) {
-               $this->related_resources = $related_resources;
-               return $this;
-       }
-
-       /**
-        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
-        * @return PayPal\Api\RelatedResources
-        */
-       public function getRelatedResources() {
-               return $this->related_resources;
-       }
-
-       /**
-        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
-        * @array
-        * @param PayPal\Api\RelatedResources $related_resources
-        * @deprecated. Instead use setRelatedResources
-        */
-       public function setRelated_resources($related_resources) {
-               $this->related_resources = $related_resources;
-               return $this;
-       }
-       /**
-        * List of financial transactions (Sale, Authorization, Capture, Refund) related to the payment.
-        * @return PayPal\Api\RelatedResources
-        * @deprecated. Instead use getRelatedResources
-        */
-       public function getRelated_resources() {
-               return $this->related_resources;
-       }
-
-       /**
-        * Additional transactions for complex payment (Parallel and Chained) scenarios.
-        * @array
-        * @param PayPal\Api\self $transactions
-        */
-       public function setTransactions($transactions) {
-               $this->transactions = $transactions;
-               return $this;
-       }
-
-       /**
-        * Additional transactions for complex payment (Parallel and Chained) scenarios.
-        * @return PayPal\Api\self
-        */
-       public function getTransactions() {
-               return $this->transactions;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Api/Transactions.php
deleted file mode 100644 (file)
index 2219837..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-namespace PayPal\Api;
-
-use PayPal\Common\PPModel;
-
-class Transactions extends PPModel {
-       /**
-        * Amount being collected.
-        * @param PayPal\Api\Amount $amount
-        */
-       public function setAmount($amount) {
-               $this->amount = $amount;
-               return $this;
-       }
-
-       /**
-        * Amount being collected.
-        * @return PayPal\Api\Amount
-        */
-       public function getAmount() {
-               return $this->amount;
-       }
-
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Auth/OAuthTokenCredential.php
deleted file mode 100644 (file)
index 8b4d4e6..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-<?php\r
-\r
-namespace PayPal\Auth;\r
-\r
-/**\r
- * Oauth Token credential\r
- *\r
- */\r
-use PayPal\Rest\RestHandler;\r
-use PayPal\Common\PPUserAgent;\r
-use PayPal\Core\PPLoggingManager;\r
-use PayPal\Core\PPConstants;\r
-use PayPal\Core\PPHttpConfig;\r
-use PayPal\Core\PPConnectionManager;\r
-use PayPal\Exception\PPConfigurationException;\r
-\r
-class OAuthTokenCredential {\r
-       \r
-       private static $expiryBufferTime = 120;\r
-       \r
-       private $logger;\r
-       \r
-       /**\r
-        * Client ID as obtained from the developer portal\r
-        */\r
-       private $clientId;\r
-       \r
-       /**\r
-        * Client secret as obtained from the developer portal\r
-        */\r
-       private $clientSecret;\r
-       \r
-       \r
-       /**\r
-        * Generated Access Token\r
-        */\r
-       private $accessToken;   \r
-       \r
-       /**\r
-        * Seconds for with access token is valid\r
-        */\r
-       private $tokenExpiresIn;\r
-       \r
-       /**\r
-        * Last time (in milliseconds) when access token was generated\r
-        */\r
-       private $tokenCreateTime;\r
-       \r
-       /**\r
-        * \r
-        * @param string $clientId client id obtained from the developer portal\r
-        * @param string $clientSecret client secret obtained from the developer portal\r
-        */\r
-       public function __construct($clientId, $clientSecret) {\r
-               $this->clientId = $clientId;\r
-               $this->clientSecret = $clientSecret;            \r
-       }\r
-       \r
-       /**\r
-        * @return the accessToken\r
-        */\r
-       public function getAccessToken($config) {\r
-\r
-               $this->logger = new PPLoggingManager(__CLASS__, $config);\r
-               // Check if Access Token is not null and has not expired.\r
-               // The API returns expiry time as a relative time unit \r
-               // We use a buffer time when checking for token expiry to account\r
-               // for API call delays and any delay between the time the token is\r
-               // retrieved and subsequently used\r
-               if ($this->accessToken != null && \r
-                               (time() - $this->tokenCreateTime) > ($this->tokenExpiresIn - self::$expiryBufferTime)) {                        \r
-                               $this->accessToken = null;                      \r
-               }\r
-               // If accessToken is Null, obtain a new token\r
-               if ($this->accessToken == null) {                       \r
-                       $this->_generateAccessToken($config);\r
-               }\r
-               return $this->accessToken;\r
-       }\r
-       \r
-       /**\r
-        * Generates a new access token\r
-        */\r
-       private function _generateAccessToken($config) {\r
-\r
-               $base64ClientID = base64_encode($this->clientId . ":" . $this->clientSecret);                                                   \r
-               $headers = array(\r
-                       "User-Agent" => PPUserAgent::getValue(RestHandler::$sdkName, RestHandler::$sdkVersion), \r
-                       "Authorization" => "Basic " . $base64ClientID,\r
-                       "Accept" => "*/*"\r
-               );              \r
-               $httpConfiguration = $this->getOAuthHttpConfiguration($config);\r
-               $httpConfiguration->setHeaders($headers);\r
-               \r
-               $connection = PPConnectionManager::getInstance()->getConnection($httpConfiguration, $config);           \r
-               $res = $connection->execute("grant_type=client_credentials");           \r
-               $jsonResponse = json_decode($res, true);\r
-               if($jsonResponse == NULL || \r
-                               !isset($jsonResponse["access_token"]) || !isset($jsonResponse["expires_in"]) ) {\r
-                       $this->accessToken = NULL;\r
-                       $this->tokenExpiresIn = NULL;   \r
-                       $this->logger->warning("Could not generate new Access token. Invalid response from server: " . $jsonResponse);          \r
-               } else {\r
-                       $this->accessToken = $jsonResponse["access_token"];\r
-                       $this->tokenExpiresIn = $jsonResponse["expires_in"];\r
-               }\r
-               $this->tokenCreateTime = time();\r
-               return $this->accessToken;\r
-       }\r
-       \r
-       /*\r
-        * Get HttpConfiguration object for OAuth API\r
-       */\r
-       private function getOAuthHttpConfiguration($config) {\r
-               if (isset($config['oauth.EndPoint'])) {\r
-                       $baseEndpoint = $config['oauth.EndPoint'];\r
-               } else if (isset($config['service.EndPoint'])) {\r
-                       $baseEndpoint = $config['service.EndPoint'];\r
-               } else if (isset($config['mode'])) {\r
-                       switch (strtoupper($config['mode'])) {\r
-                               case 'SANDBOX':\r
-                                       $baseEndpoint = PPConstants::REST_SANDBOX_ENDPOINT;\r
-                                       break;\r
-                               case 'LIVE':\r
-                                       $baseEndpoint = PPConstants::REST_LIVE_ENDPOINT;\r
-                                       break;\r
-                               default:\r
-                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');\r
-                       }\r
-               } else {\r
-                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');\r
-               }               \r
-               \r
-               $baseEndpoint = rtrim(trim($baseEndpoint), '/');                 \r
-               return new PPHttpConfig($baseEndpoint . "/v1/oauth2/token", "POST");\r
-       }\r
-}\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/ApiContext.php
deleted file mode 100755 (executable)
index 4250b5e..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php\r
-namespace PayPal\Rest;\r
-\r
-use PayPal\Common\PPApiContext;\r
-\r
-echo "ADASDASD";\r
-/**\r
- * \r
- * Call level parameters such as\r
- * request id, credentials etc\r
- */\r
-class ApiContext extends PPApiContext {\r
-       \r
-       /**\r
-        * OAuth Credentials to use for this call\r
-        * @var PayPal/Api/OAuthTokenCredential\r
-        */\r
-       private $credential;\r
-       \r
-       /**\r
-        * Unique request id to be used for this call\r
-        * The user can either generate one as per application\r
-        * needs or let the SDK generate one\r
-        * @var string\r
-        */\r
-       private $requestId;\r
-       \r
-       /**\r
-        * \r
-        */\r
-       public function getCredential() {\r
-               return $this->credential;               \r
-       }\r
-       \r
-       public function getrequestId() {\r
-               if($this->requestId == null) {\r
-                       $this->requestId = $this->generateRequestId();\r
-               }\r
-               return $this->requestId;\r
-       }\r
-       \r
-       \r
-       /**\r
-        * \r
-        * @param PayPal/Api/OAuthTokenCredential $credential\r
-        * @param string $requestId\r
-        */\r
-       public function __construct($credential, $requestId=null) {\r
-               $this->credential = $credential;\r
-               $this->requestId = $requestId;\r
-       }\r
-       \r
-       /**\r
-        * Generates a unique per request id that\r
-        * can be used to set the PayPal-Request-Id header\r
-        * that is used for idemptency\r
-        * @return string\r
-        */\r
-       private function generateRequestId() {\r
-               \r
-               static $pid = -1;\r
-               static $addr = -1;\r
-               \r
-               if ($pid == -1) {\r
-                       $pid = getmypid();\r
-               }\r
-               if ($addr == -1) {\r
-                       if(array_key_exists('SERVER_ADDR', $_SERVER)) {\r
-                               $addr = ip2long($_SERVER['SERVER_ADDR']);\r
-                       } else {\r
-                               $addr  = php_uname('n');\r
-                       }\r
-               }\r
-               \r
-               return $addr . $pid . $_SERVER['REQUEST_TIME'] . mt_rand(0, 0xffff);\r
-       }\r
-}\r
-echo "kkkkk";
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/IResource.php
deleted file mode 100644 (file)
index 395586c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-namespace PayPal\Rest;
-
-interface IResource {
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/lib/PayPal/Rest/RestHandler.php
deleted file mode 100644 (file)
index cbdd2fa..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php\r
-namespace PayPal\Rest;\r
-\r
-use PayPal\Auth\OAuthTokenCredential;\r
-use PayPal\Handler\IPPHandler;\r
-use PayPal\Core\PPCredentialManager;\r
-use PayPal\Core\PPConstants;\r
-use PayPal\Exception\PPMissingCredentialException;\r
-use PayPal\Exception\PPInvalidCredentialException;\r
-use PayPal\Exception\PPConfigurationException;\r
-use PayPal\Common\PPUserAgent;\r
-\r
-/**\r
- * \r
- * API handler for all REST API calls\r
- */\r
-class RestHandler implements IPPHandler {\r
-\r
-       private $apiContext;\r
-       \r
-       public static $sdkName = "rest-sdk-php";        \r
-       public static $sdkVersion = "0.6.0";\r
-       \r
-       public function __construct($apiContext) {\r
-               $this->apiContext = $apiContext;\r
-       }\r
-       \r
-       public function handle($httpConfig, $request, $options) {\r
-               \r
-               $credential = $this->apiContext->getCredential();\r
-               $config = $this->apiContext->getConfig();\r
-               \r
-               if($credential == NULL) {\r
-                       // Try picking credentials from the config file\r
-                       $credMgr = PPCredentialManager::getInstance($config);\r
-                       $credValues = $credMgr->getCredentialObject();\r
-                       if(!is_array($credValues)) {\r
-                               throw new PPMissingCredentialException("Empty or invalid credentials passed");\r
-                       }\r
-                       $credential = new OAuthTokenCredential($credValues['clientId'], $credValues['clientSecret']);\r
-               }\r
-               if($credential == NULL || ! ($credential instanceof OAuthTokenCredential) ) {\r
-                       throw new PPInvalidCredentialException("Invalid credentials passed");\r
-               }\r
-\r
-               \r
-               $httpConfig->setUrl(\r
-                       rtrim( trim($this->_getEndpoint($config)), '/') . \r
-                               (isset($options['path']) ? $options['path'] : '')\r
-               );\r
-               \r
-               if(!array_key_exists("User-Agent", $httpConfig->getHeaders())) {\r
-                       $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(self::$sdkName, self::$sdkVersion));\r
-               }               \r
-               if(!is_null($credential) && $credential instanceof OAuthTokenCredential) {\r
-                       $httpConfig->addHeader('Authorization', "Bearer " . $credential->getAccessToken($config));\r
-               }\r
-               if($httpConfig->getMethod() == 'POST' || $httpConfig->getMethod() == 'PUT') {\r
-                       $httpConfig->addHeader('PayPal-Request-Id', $this->apiContext->getRequestId());\r
-               }\r
-               \r
-       }\r
-       \r
-       private function _getEndpoint($config) {\r
-               if (isset($config['service.EndPoint'])) {\r
-                       return $config['service.EndPoint'];\r
-               } else if (isset($config['mode'])) {\r
-                       switch (strtoupper($config['mode'])) {\r
-                               case 'SANDBOX':\r
-                                       return PPConstants::REST_SANDBOX_ENDPOINT;\r
-                                       break;\r
-                               case 'LIVE':\r
-                                       return PPConstants::REST_LIVE_ENDPOINT;\r
-                                       break;\r
-                               default:\r
-                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');\r
-                                       break;\r
-                       }\r
-               } else {\r
-                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');\r
-               }\r
-       }\r
-\r
-}\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/phpunit.xml
deleted file mode 100644 (file)
index d8063ef..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="./tests/bootstrap.php"
-         colors="true"
-         processIsolation="false"
-         stopOnFailure="false"
-         syntaxCheck="false"
-         convertErrorsToExceptions="true"
-         convertNoticesToExceptions="true"
-         convertWarningsToExceptions="true"
-         testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader">
-
-    <testsuites>
-        <testsuite name="All">
-            <directory>tests</directory>
-        </testsuite>
-    </testsuites>
-
-    <logging>
-        <log type="junit" target="build/junit.xml" logIncompleteSkipped="false" />
-    </logging>
-
-    <filter>
-        <whitelist>
-            <directory suffix=".php">./lib</directory>
-            <exclude>
-            </exclude>
-        </whitelist>
-    </filter>
-</phpunit>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AddressTest.php
deleted file mode 100644 (file)
index ec271c9..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Address;
-use PayPal\Test\Constants;
-
-class AddressTest extends \PHPUnit_Framework_TestCase {
-
-       private $address;
-
-       public static $line1 = "3909 Witmer Road";
-       public static $line2 = "Niagara Falls"; 
-       public static $city = "Niagara Falls";
-       public static $state = "NY";
-       public static $postalCode = "14305";
-       public static $countryCode = "US";
-       public static $phone = "716-298-1822";
-       public static $type = "Billing";
-
-       public static function createAddress() {
-               $addr = new Address();
-               $addr->setLine1(self::$line1);
-               $addr->setLine2(self::$line2);
-               $addr->setCity(self::$city);
-               $addr->setState(self::$state);
-               $addr->setPostalCode(self::$postalCode);
-               $addr->setCountryCode(self::$countryCode);
-               $addr->setPhone(self::$phone);
-               return $addr;
-       }
-       
-       public function setup() {
-               $this->address = self::createAddress();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$line1, $this->address->getLine1());
-               $this->assertEquals(self::$line2, $this->address->getLine2());
-               $this->assertEquals(self::$city, $this->address->getCity());
-               $this->assertEquals(self::$state, $this->address->getState());
-               $this->assertEquals(self::$postalCode, $this->address->getPostalCode());
-               $this->assertEquals(self::$countryCode, $this->address->getCountryCode());
-               $this->assertEquals(self::$phone, $this->address->getPhone());
-       }
-       
-       public function testSerializeDeserialize() {
-               $a1 = $this->address;
-               
-               $a2 = new Address();
-               $a2->fromJson($a1->toJson());
-               
-               $this->assertEquals($a1, $a2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AmountTest.php
deleted file mode 100644 (file)
index 7f24e7b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Amount;
-use PayPal\Test\Constants;
-
-class AmountTest extends \PHPUnit_Framework_TestCase {
-
-       private $amounts;
-
-       public static $currency = "USD";
-       public static $total = "1.12";  
-
-       public static function createAmount() {
-               $amount = new Amount();
-               $amount->setCurrency(self::$currency);
-               $amount->setTotal(self::$total);
-               
-               return $amount;
-       }
-       
-       public function setup() {
-               $this->amounts['partial'] = self::createAmount();
-               
-               $amount = self::createAmount();
-               $amount->setDetails(DetailsTest::createAmountDetails());
-               $this->amounts['full'] = $amount;
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$currency, $this->amounts['partial']->getCurrency());
-               $this->assertEquals(self::$total, $this->amounts['partial']->getTotal());
-               $this->assertEquals(DetailsTest::$fee, $this->amounts['full']->getDetails()->getFee());
-       }
-       
-       public function testSerializeDeserialize() {
-               $a1 = $this->amounts['partial'];
-               
-               $a2 = new Amount();
-               $a2->fromJson($a1->toJson());
-               
-               $this->assertEquals($a1, $a2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/AuthorizationTest.php
deleted file mode 100644 (file)
index 63ba8cb..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Amount;
-use PayPal\Api\Authorization;
-use PayPal\Api\Links;
-use PayPal\Test\Constants;
-use PayPal\Api\RedirectUrls;
-use PayPal\Api\Address;
-
-use PayPal\Api\Capture;
-use PayPal\Api\CreditCard;
-use PayPal\Api\Payer;
-use PayPal\Api\Payment;
-use PayPal\Api\FundingInstrument;
-use PayPal\Api\Transaction;
-use PayPal\Exception\PPConnectionException;
-
-class AuthorizationTest extends \PHPUnit_Framework_TestCase {
-       private $authorizations = array();
-       public static $create_time = "2013-02-28T00:00:00Z";
-       public static $id = "AUTH-123";
-       public static $state = "Created";
-       public static $parent_payment = "PAY-12345";
-       public static $currency = "USD";
-       public static $total = "1.12";
-       public static $href = "USD";
-       public static $rel = "1.12";
-       public static $method = "1.12";
-       
-       public static function createAuthorization() {                  
-               $authorization = new Authorization();
-               $authorization->setCreateTime(self::$create_time);
-               $authorization->setId(self::$id);
-               $authorization->setState(self::$state);
-               
-               $authorization->setAmount(AmountTest::createAmount());
-               $authorization->setLinks(array(LinksTest::createLinks()));      
-               
-               return $authorization;
-       }
-       
-       public static function authorize()
-       {
-               $addr = new Address();
-               $addr->setLine1("3909 Witmer Road");
-               $addr->setLine2("Niagara Falls");
-               $addr->setCity("Niagara Falls");
-               $addr->setState("NY");
-               $addr->setPostal_code("14305");
-               $addr->setCountry_code("US");
-               $addr->setPhone("716-298-1822");
-               
-               $card = new CreditCard();
-               $card->setType("visa");
-               $card->setNumber("4417119669820331");
-               $card->setExpire_month("11");
-               $card->setExpire_year("2019");
-               $card->setCvv2("012");
-               $card->setFirst_name("Joe");
-               $card->setLast_name("Shopper");
-               $card->setBilling_address($addr);
-               
-               $fi = new FundingInstrument();
-               $fi->setCredit_card($card);
-               
-               $payer = new Payer();
-               $payer->setPayment_method("credit_card");
-               $payer->setFunding_instruments(array($fi));
-               
-               $amount = new Amount();
-               $amount->setCurrency("USD");
-               $amount->setTotal("1.00");
-               
-               $transaction = new Transaction();
-               $transaction->setAmount($amount);
-               $transaction->setDescription("This is the payment description.");
-               
-               $payment = new Payment();
-               $payment->setIntent("authorize");
-               $payment->setPayer($payer);
-               $payment->setTransactions(array($transaction));
-               
-               $paymnt = $payment->create();
-               $resArray = $paymnt->toArray();
-               
-               return $authId = $resArray['transactions'][0]['related_resources'][0]['authorization']['id'];
-               
-       }
-       public function setup() {
-               $authorization = new Authorization();
-               $authorization->setCreateTime(self::$create_time);
-               $authorization->setId(self::$id);
-               $authorization->setState(self::$state);
-               $authorization->setParentPayment(self::$parent_payment);
-               $this->authorizations['partial'] = $authorization;
-               $this->authorizations['full'] = self::createAuthorization();
-               
-       }
-
-       public function testGetterSetter() {            
-               $authorization = $this->authorizations['partial'];
-               $this->assertEquals(self::$create_time, $authorization->getCreateTime());
-               $this->assertEquals(self::$id, $authorization->getId());
-               $this->assertEquals(self::$state, $authorization->getState());
-               $this->assertEquals(self::$parent_payment, $authorization->getParentPayment());
-               
-               $authorization = $this->authorizations['full'];
-               $this->assertEquals(AmountTest::$currency, $authorization->getAmount()->getCurrency());
-               $this->assertEquals(1, count($authorization->getLinks()));
-       }
-       
-       public function testSerializeDeserialize() {
-               $a1 = $this->authorizations['partial'];
-               $a2 = new Authorization();
-               $a2->fromJson($a1->toJson());
-               $this->assertEquals($a1, $a2);
-       }
-       public function testOperations() {
-               $authId = self::authorize();
-               $auth = Authorization::get($authId);
-               $this->assertNotNull($auth->getId());
-               
-               $amount = new Amount();
-               $amount->setCurrency("USD");
-               $amount->setTotal("1.00");
-               
-               $captur = new Capture();
-               $captur->setId($authId);
-               $captur->setAmount($amount);    
-               
-               $capt = $auth->capture($captur);
-               $this->assertNotNull( $capt->getId());
-               
-               $authId = self::authorize();
-               $auth = Authorization::get($authId);
-               $void = $auth->void();
-               $this->assertNotNull($void->getId());
-
-       }
-       
-       public function testReauthorize(){
-               $authorization = Authorization::get('7GH53639GA425732B');
-       
-               $amount = new Amount();
-               $amount->setCurrency("USD");
-               $amount->setTotal("1.00");
-               
-               $authorization->setAmount($amount);
-               try{
-                       $reauthorization = $authorization->reauthorize();
-               }catch (PPConnectionException $ex){
-                       $this->assertEquals(strpos($ex->getMessage(),"500"), false);
-               }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CaptureTest.php
deleted file mode 100644 (file)
index a1162fd..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Capture;
-use PayPal\Api\Refund;
-use PayPal\Api\Authorization;
-use PayPal\Api\Amount;
-use PayPal\Test\Constants;
-
-class CaptureTest extends \PHPUnit_Framework_TestCase {
-
-       private $captures;
-
-       public static $authorization_id = "AUTH-123";
-       public static $create_time = "2013-02-28T00:00:00Z";
-       public static $id = "C-5678";
-       public static $parent_payment = "PAY-123";
-       public static $state = "Created";
-
-       public static function createCapture() {
-               $capture = new Capture();
-               $capture->setCreateTime(self::$create_time);
-               $capture->setId(self::$id);
-               $capture->setParentPayment(self::$parent_payment);
-               $capture->setState(self::$state);               
-               
-               return $capture;
-       }
-       
-       public function setup() {
-               $this->captures['partial'] = self::createCapture();
-               
-               $capture = self::createCapture();
-               $capture->setAmount(AmountTest::createAmount());
-               $capture->setLinks(array(LinksTest::createLinks()));
-               $this->captures['full'] = $capture;
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$create_time, $this->captures['partial']->getCreateTime());
-               $this->assertEquals(self::$id, $this->captures['partial']->getId());
-               $this->assertEquals(self::$parent_payment, $this->captures['partial']->getParentPayment());
-               $this->assertEquals(self::$state, $this->captures['partial']->getState());
-               
-               $this->assertEquals(AmountTest::$currency, $this->captures['full']->getAmount()->getCurrency());
-               $links = $this->captures['full']->getLinks();
-               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
-       }
-       
-       public function testSerializeDeserialize() {
-               $c1 = $this->captures['partial'];
-               
-               $c2 = new Capture();
-               $c2->fromJson($c1->toJson());
-               
-               $this->assertEquals($c1, $c2);
-       }
-       
-       public function testOperations()
-       {
-               $authId = AuthorizationTest::authorize();
-               $auth = Authorization::get($authId);
-               
-               $amount = new Amount();
-               $amount->setCurrency("USD");
-               $amount->setTotal("1.00");
-               
-               $captr = new Capture();
-               $captr->setId($authId);
-               $captr->setAmount($amount);
-               
-               $capt = $auth->capture($captr);
-               $captureId = $capt->getId();
-               $this->assertNotNull($captureId);
-               
-               $refund = new Refund();
-               $refund->setId($captureId);
-               $refund->setAmount($amount);
-               
-               $capture = Capture::get($captureId);
-               $this->assertNotNull($capture->getId());
-               
-               $retund = $capture->refund($refund);
-               $this->assertNotNull($retund->getId());
-               
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardHistoryTest.php
deleted file mode 100644 (file)
index a7f1b53..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\CreditCardHistory;
-
-use PayPal\Api\Address;
-use PayPal\Api\CreditCard;
-use PayPal\Test\Constants;
-
-class CreditCardHistoryTest extends \PHPUnit_Framework_TestCase {
-       
-       private $cards;
-       
-       public static $id = "id";
-       public static $validUntil = "2013-02-28T00:00:00Z";
-       public static $state = "created";
-       public static $payerId = "payer-id";
-       public static $cardType = "visa";
-       public static $cardNumber = "4417119669820331";
-       public static $expireMonth = 11;
-       public static $expireYear = "2019";
-       public static $cvv = "012";
-       public static $firstName = "V";
-       public static $lastName = "C";
-       
-       public static function createCreditCard() {
-               $card = new CreditCard();
-               $card->setType(self::$cardType);
-               $card->setNumber(self::$cardNumber);
-               $card->setExpireMonth(self::$expireMonth);
-               $card->setExpireYear(self::$expireYear);
-               $card->setCvv2(self::$cvv);
-               $card->setFirstName(self::$firstName);
-               $card->setLastName(self::$lastName);
-               $card->setId(self::$id);
-               $card->setValidUntil(self::$validUntil);
-               $card->setState(self::$state);
-               $card->setPayerId(self::$payerId);
-               return $card;
-       }
-       
-       public function setup() {
-               
-               $card = self::createCreditCard();
-               $card->setBillingAddress(AddressTest::createAddress()); 
-               $card->setLinks(array(LinksTest::createLinks()));
-               $this->cards['full'] = $card;
-               
-               $card = self::createCreditCard();       
-               $this->cards['partial'] = $card;
-       }
-       
-       public function testGetterSetters() {
-               $cardHistory = new CreditCardHistory();
-               $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full']));
-               $cardHistory->setCount(2);
-               
-               $this->assertEquals(2, count($cardHistory->getCreditCards()));
-       }
-
-       
-       public function testSerializationDeserialization() {
-               $cardHistory = new CreditCardHistory();
-               $cardHistory->setCreditCards(array($this->cards['partial'], $this->cards['full']));
-               $cardHistory->setCount(2);
-       
-               $cardHistoryCopy = new CreditCardHistory();
-               $cardHistoryCopy->fromJson($cardHistory->toJSON());
-               
-               $this->assertEquals($cardHistory, $cardHistoryCopy);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTest.php
deleted file mode 100644 (file)
index 27896fe..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Address;
-use PayPal\Api\CreditCard;
-use PayPal\Test\Constants;
-class CreditCardTest extends \PHPUnit_Framework_TestCase {
-       
-       private $cards;
-       
-       public static $id = "id";
-       public static $validUntil = "2013-02-28T00:00:00Z";
-       public static $state = "created";
-       public static $payerId = "payer-id";
-       public static $cardType = "visa";
-       public static $cardNumber = "4417119669820331";
-       public static $expireMonth = 11;
-       public static $expireYear = "2019";
-       public static $cvv = "012";
-       public static $firstName = "V";
-       public static $lastName = "C";
-       
-       public static function createCreditCard() {
-               $card = new CreditCard();
-               $card->setType(self::$cardType);
-               $card->setNumber(self::$cardNumber);
-               $card->setExpireMonth(self::$expireMonth);
-               $card->setExpireYear(self::$expireYear);
-               $card->setCvv2(self::$cvv);
-               $card->setFirstName(self::$firstName);
-               $card->setLastName(self::$lastName);
-               $card->setId(self::$id);
-               $card->setValidUntil(self::$validUntil);
-               $card->setState(self::$state);
-               $card->setPayerId(self::$payerId);
-               return $card;
-       }
-       
-       public function setup() {
-               
-               $card = self::createCreditCard();
-               $card->setBillingAddress(AddressTest::createAddress()); 
-               $card->setLinks(array(LinksTest::createLinks()));
-               $this->cards['full'] = $card;
-               
-               $card = self::createCreditCard();       
-               $this->cards['partial'] = $card;
-       }
-       
-       public function testGetterSetters() {
-               $c = $this->cards['partial'];
-               $this->assertEquals(self::$cardType, $c->getType());
-               $this->assertEquals(self::$cardNumber, $c->getNumber());
-               $this->assertEquals(self::$expireMonth, $c->getExpireMonth());
-               $this->assertEquals(self::$expireYear, $c->getExpireYear());
-               $this->assertEquals(self::$cvv, $c->getCvv2());
-               $this->assertEquals(self::$firstName, $c->getFirstName());
-               $this->assertEquals(self::$lastName, $c->getLastName());
-               $this->assertEquals(self::$id, $c->getId());
-               $this->assertEquals(self::$validUntil, $c->getValidUntil());
-               $this->assertEquals(self::$state, $c->getState());
-               $this->assertEquals(self::$payerId, $c->getPayerId());
-               
-               $c = $this->cards['full'];
-               $this->assertEquals(AddressTest::$line1, $c->getBillingAddress()->getLine1());
-               $link = $c->getLinks();
-               $this->assertEquals(LinksTest::$href, $link[0]->getHref());
-       }
-       
-       public function testSerializeDeserialize() {
-               $c1 = $this->cards['full'];
-               $json = $c1->toJson();
-               
-               $c2 = new CreditCard();
-               $c2->fromJson($json);           
-               
-               $this->assertEquals($c1, $c2);
-       }
-       
-       public function testOperations() {
-               $c1 = $this->cards['full'];
-               
-//             $this->assertNull($c1->getId());
-               $c1->create();          
-               $this->assertNotNull($c1->getId());
-               
-               $c2 = CreditCard::get($c1->getId());
-               $this->assertEquals($c1->getBillingAddress(), $c2->getBillingAddress());
-               $this->assertGreaterThan(0, count($c2->getLinks()));
-               $this->assertEquals(self::$cardType, $c2->getType());
-               $this->assertNotNull($c2->getState());
-               $this->assertEquals(true, $c2->delete());
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/CreditCardTokenTest.php
deleted file mode 100644 (file)
index d1f8db9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\CreditCardToken;
-use PayPal\Test\Constants;
-
-class CreditCardTokenTest extends \PHPUnit_Framework_TestCase {
-
-       private $ccToken;
-
-       public static $payerId = "PAYER-123";
-       public static $creditCardId = "CC-123";
-
-       public static function createCreditCardToken() {
-               $ccToken = new CreditCardToken();
-               $ccToken->setPayerId(self::$payerId);
-               $ccToken->setCreditCardId(self::$creditCardId);
-               return $ccToken;
-       }
-       
-       public function setup() {
-               $this->ccToken = self::createCreditCardToken();         
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$payerId, $this->ccToken->getPayerId());
-               $this->assertEquals(self::$creditCardId, $this->ccToken->getCreditCardId());
-       }
-       
-       public function testSerializeDeserialize() {
-               $t1 = $this->ccToken;
-               
-               $t2 = new CreditCardToken();
-               $t2->fromJson($t1->toJson());
-               
-               $this->assertEquals($t1, $t2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/DetailsTest.php
deleted file mode 100644 (file)
index ae1cba9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Details;
-use PayPal\Test\Constants;
-
-class DetailsTest extends \PHPUnit_Framework_TestCase {
-
-       private $amountDetails;
-
-       public static $subtotal = "2.00";
-       public static $tax = "1.12";
-       public static $shipping = "3.15";
-       public static $fee = "4.99";
-
-       public static function createAmountDetails() {
-               $amountDetails = new Details();
-               $amountDetails->setSubtotal(self::$subtotal);
-               $amountDetails->setTax(self::$tax);
-               $amountDetails->setShipping(self::$shipping);
-               $amountDetails->setFee(self::$fee);
-               
-               return $amountDetails;
-       }
-
-       public function setup() {
-               $this->amountDetails = self::createAmountDetails();
-       }
-       
-       public function testGetterSetters() {
-               $this->assertEquals(self::$subtotal, $this->amountDetails->getSubtotal());
-               $this->assertEquals(self::$tax, $this->amountDetails->getTax());
-               $this->assertEquals(self::$shipping, $this->amountDetails->getShipping());
-               $this->assertEquals(self::$fee, $this->amountDetails->getFee());                
-       }
-       
-       public function testSerializeDeserialize() {
-               $a1 = $this->amountDetails;
-               
-               $a2 = new Details();
-               $a2->fromJson($a1->toJson());
-               
-               $this->assertEquals($a1, $a2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/FundingInstrumentTest.php
deleted file mode 100644 (file)
index cb420d6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\FundingInstrument;
-use PayPal\Test\Constants;
-
-class FundingInstrumentTest extends \PHPUnit_Framework_TestCase {
-
-       private $fi;
-
-       public static function createFundingInstrument() {
-               $fi = new FundingInstrument();
-               $fi->setCreditCard(CreditCardTest::createCreditCard());
-               $fi->setCreditCardToken(CreditCardTokenTest::createCreditCardToken());
-               return $fi;
-       }
-       
-       public function setup() {
-               $this->fi = self::createFundingInstrument();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(CreditCardTest::$cardNumber, $this->fi->getCreditCard()->getNumber());
-               $this->assertEquals(CreditCardTokenTest::$creditCardId, 
-                               $this->fi->getCreditCardToken()->getCreditCardId());
-       }
-       
-       public function testSerializeDeserialize() {
-               $fi1 = $this->fi;
-               
-               $fi2 = new FundingInstrument();
-               $fi2->fromJson($fi1->toJson());         
-               $this->assertEquals($fi1, $fi2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemListTest.php
deleted file mode 100644 (file)
index fe5f870..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Item;
-use PayPal\Api\ItemList;
-use PayPal\Test\Constants;
-
-class ItemListTest extends \PHPUnit_Framework_TestCase {
-       
-       private $items = array();
-       
-       private static $name = "item name";
-       private static $price = "1.12";
-       private static $quantity = "10";
-       private static $sku = "AXVTY123";
-       private static $currency = "USD";
-       
-       public static function createItemList() {
-               
-               $item = ItemTest::createItem();
-               
-               $itemList = new ItemList();
-               $itemList->setItems(array($item));
-               $itemList->setShippingAddress(ShippingAddressTest::createAddress());
-               
-               return $itemList;
-       }
-       
-       public function setup() {               
-               $this->items = self::createItemList();
-       }
-       
-       public function testGetterSetters() {
-               $items = $this->items->getItems();              
-               $this->assertEquals(ItemTest::createItem(), $items[0]);
-               $this->assertEquals(ShippingAddressTest::createAddress(), $this->items->getShippingAddress());
-       }
-       
-       public function testSerializeDeserialize() {
-               $itemList = new ItemList();
-               $itemList->fromJson($this->items->toJSON());
-       
-               $this->assertEquals($itemList, $this->items);
-       }
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ItemTest.php
deleted file mode 100644 (file)
index 59be288..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Item;
-use PayPal\Test\Constants;
-
-class ItemTest extends \PHPUnit_Framework_TestCase {
-       
-       private $item;
-       
-       public static $name = "item name";
-       public static $price = "1.12";
-       public static $quantity = "10";
-       public static $sku = "AXVTY123";
-       public static $currency = "USD";
-       
-       public static function createItem() {
-               $item = new Item();
-               $item->setName(self::$name);
-               $item->setPrice(self::$price);
-               $item->setQuantity(self::$quantity);
-               $item->setSku(self::$sku);
-               $item->setCurrency(self::$currency);
-               
-               return $item;
-       }
-       public function setup() {               
-               $this->item = ItemTest::createItem();
-       }
-       
-       public function testGetterSetters() {
-               $this->assertEquals(self::$name, $this->item->getName());
-               $this->assertEquals(self::$price, $this->item->getPrice());
-               $this->assertEquals(self::$sku, $this->item->getSku());
-               $this->assertEquals(self::$quantity, $this->item->getQuantity());
-               $this->assertEquals(self::$currency, $this->item->getCurrency());
-       }
-       
-       public function testSerializeDeserialize() {
-               $item = new Item();
-               $item->fromJson($this->item->toJSON());
-       
-               $this->assertEquals($item, $this->item);
-       }
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/LinksTest.php
deleted file mode 100644 (file)
index 68da69a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Links;
-use PayPal\Test\Constants;
-
-class LinksTest extends \PHPUnit_Framework_TestCase {
-
-       private $links;
-
-       public static $href = "USD";
-       public static $rel = "1.12";
-       public static $method = "1.12";
-       
-       public static function createLinks() {
-               $links = new Links();
-               $links->setHref(self::$href);
-               $links->setRel(self::$rel);
-               $links->setMethod(self::$method);
-               
-               return $links;
-       }
-       
-       public function setup() {
-               $this->links = self::createLinks();
-       }
-       
-       public function testGetterSetters() {
-               $this->assertEquals(self::$href, $this->links->getHref());
-               $this->assertEquals(self::$rel, $this->links->getRel());
-               $this->assertEquals(self::$method, $this->links->getMethod());
-       }
-       
-       public function testSerializeDeserialize() {
-               $link2 = new Links();
-               $link2->fromJson($this->links->toJSON());
-               $this->assertEquals($this->links, $link2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayeeTest.php
deleted file mode 100644 (file)
index ea9469f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Payee;
-use PayPal\Test\Constants;
-
-class PayeeTest extends \PHPUnit_Framework_TestCase {
-
-       private $payee;
-
-       public static $email = "test@paypal.com";
-       public static $merchant_id = "1XY12121";
-       public static $phone = "+14081234566";
-       
-
-       public static function createPayee() {
-               $payee = new Payee();
-               $payee->setEmail(self::$email);
-               $payee->setMerchantId(self::$merchant_id);
-               $payee->setPhone(self::$phone);         
-               
-               return $payee;
-       }
-       
-       public function setup() {
-               $this->payee = self::createPayee();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$email, $this->payee->getEmail());
-               $this->assertEquals(self::$merchant_id, $this->payee->getMerchantId());
-               $this->assertEquals(self::$phone, $this->payee->getPhone());
-       }
-       
-       public function testSerializeDeserialize() {
-               $p1 = $this->payee;
-               
-               $p2 = new Payee();
-               $p2->fromJson($p1->toJson());
-               
-               $this->assertEquals($p1, $p2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerInfoTest.php
deleted file mode 100644 (file)
index b1f5858..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\PayerInfo;
-use PayPal\Test\Constants;
-
-class PayerInfoTest extends \PHPUnit_Framework_TestCase {
-
-       private $payerInfo;
-
-       public static $email = "test@paypal.com";
-       public static $firstName = "first";
-       public static $lastName = "last";
-       public static $phone = "408-1234-5687";
-       public static $payerId = "PAYER-1234";
-
-       public static function createPayerInfo() {
-               $payerInfo = new PayerInfo();
-               $payerInfo->setEmail(self::$email);
-               $payerInfo->setFirstName(self::$firstName);
-               $payerInfo->setLastName(self::$lastName);
-               $payerInfo->setPhone(self::$phone);
-               $payerInfo->setPayerId(self::$payerId);
-               $payerInfo->setShippingAddress(AddressTest::createAddress());
-               
-               return $payerInfo;
-       }
-       
-       public function setup() {
-               $this->payerInfo = self::createPayerInfo();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$email, $this->payerInfo->getEmail());
-               $this->assertEquals(self::$firstName, $this->payerInfo->getFirstName());
-               $this->assertEquals(self::$lastName, $this->payerInfo->getLastName());
-               $this->assertEquals(self::$phone, $this->payerInfo->getPhone());
-               $this->assertEquals(self::$payerId, $this->payerInfo->getPayerId());
-               $this->assertEquals(AddressTest::$line1, $this->payerInfo->getShippingAddress()->getLine1());
-       }
-       
-       public function testSerializeDeserialize() {
-               $p1 = $this->payerInfo;
-               
-               $p2 = new PayerInfo();
-               $p2->fromJson($p1->toJson());
-               
-               $this->assertEquals($p1, $p2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PayerTest.php
deleted file mode 100644 (file)
index 7568a3c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\FundingInstrument;
-
-use PayPal\Api\Payer;
-use PayPal\Test\Constants;
-
-class PayerTest extends \PHPUnit_Framework_TestCase {
-
-       private $payer;
-
-       private static $paymentMethod = "credit_card";
-
-       public static function createPayer() {
-               $payer = new Payer();
-               $payer->setPaymentMethod(self::$paymentMethod);
-               $payer->setPayerInfo(PayerInfoTest::createPayerInfo());
-               $payer->setFundingInstruments(array(FundingInstrumentTest::createFundingInstrument()));
-               
-               return $payer;
-       }
-       
-       public function setup() {
-               $this->payer = self::createPayer();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$paymentMethod, $this->payer->getPaymentMethod());
-               $this->assertEquals(PayerInfoTest::$email, $this->payer->getPayerInfo()->getEmail());
-               
-               $fi = $this->payer->getFundingInstruments();
-               $this->assertEquals(CreditCardTokenTest::$creditCardId, $fi[0]->getCreditCardToken()->getCreditCardId());
-       }
-       
-       public function testSerializeDeserialize() {
-               $p1 = $this->payer;
-               
-               $p2 = new Payer();
-               $p2->fromJson($p1->toJson());
-               
-               $this->assertEquals($p1, $p2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentHistoryTest.php
deleted file mode 100644 (file)
index 577d282..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\PaymentHistory;
-use PayPal\Test\Constants;
-
-class PaymentHistoryTest extends \PHPUnit_Framework_TestCase {
-       
-       private $history;
-       
-       public static $count = "10";
-       public static $nextId = "11";
-       
-       public static function createPaymentHistory() {
-               $history = new PaymentHistory();
-               $history->setCount(self::$count);
-               $history->setNextId(self::$nextId);
-               $history->setPayments(array(PaymentTest::createPayment()));
-               return $history;
-       }
-       public function setup() {               
-               $this->history = PaymentHistoryTest::createPaymentHistory();
-       }
-       
-       public function testGetterSetters() {
-               $this->assertEquals(self::$count, $this->history->getCount());
-               $this->assertEquals(self::$nextId, $this->history->getNextId());
-               
-       }
-       
-       public function testSerializeDeserialize() {
-               $history = new PaymentHistory();
-               $history->fromJson($this->history->toJSON());
-       
-               $this->assertEquals($history, $this->history);
-       }
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/PaymentTest.php
deleted file mode 100644 (file)
index 2bf9795..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-use PayPal\Api\RedirectUrls;
-use PayPal\Api\Address;
-use PayPal\Api\Amount;
-use PayPal\Api\CreditCard;
-use PayPal\Api\Payer;
-use PayPal\Api\Payment;
-use PayPal\Api\FundingInstrument;
-use PayPal\Api\Transaction;
-use PayPal\Test\Constants;
-
-class PaymentTest extends \PHPUnit_Framework_TestCase {
-
-       private $payments;      
-
-       public static function createPayment() {
-               
-               $redirectUrls = new RedirectUrls();
-               $redirectUrls->setReturnUrl("http://localhost/return");
-               $redirectUrls->setCancelUrl("http://localhost/cancel");
-               
-               $payment = new Payment();
-               $payment->setIntent("sale");
-               $payment->setRedirectUrls($redirectUrls);
-               $payment->setPayer(PayerTest::createPayer());
-               $payment->setTransactions(array(TransactionTest::createTransaction()));
-               
-               return $payment;                                
-       }
-       
-       public static function createNewPayment() {
-               $payer = new Payer();
-               $payer->setPaymentMethod("credit_card");
-               $payer->setFundingInstruments(array(FundingInstrumentTest::createFundingInstrument()));
-               
-               $transaction = new Transaction();
-               $transaction->setAmount(AmountTest::createAmount());
-               $transaction->setDescription("This is the payment description.");
-               
-               $redirectUrls = new RedirectUrls();
-               $redirectUrls->setReturnUrl("http://localhost/return");
-               $redirectUrls->setCancelUrl("http://localhost/cancel");
-               
-               $payment = new Payment();
-               $payment->setIntent("sale");
-               $payment->setRedirectUrls($redirectUrls);
-               $payment->setPayer($payer);
-               $payment->setTransactions(array($transaction));
-       
-               return $payment;        
-       }
-       
-       public function setup() {               
-               $this->payments['full'] = self::createPayment();
-               $this->payments['new'] = self::createNewPayment();
-       }
-       
-       public function testSerializeDeserialize() {
-               $p2 = new Payment();
-               $p2->fromJson($this->payments['full']->toJSON());               
-               $this->assertEquals($p2, $this->payments['full']);
-       }
-       
-       public function testOperations() {
-
-               $p1 = $this->payments['new'];
-                
-               $p1->create();          
-               $this->assertNotNull($p1->getId());
-               
-               $p2 = Payment::get($p1->getId());
-               $this->assertNotNull($p2);
-               
-               $paymentHistory = Payment::all(array('count' => '10'));
-               $this->assertNotNull($paymentHistory);
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RefundTest.php
deleted file mode 100644 (file)
index 657e167..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Refund;
-use PayPal\Test\Constants;
-
-class RefundTest extends \PHPUnit_Framework_TestCase {
-
-       private $refund;
-
-       public static $captureId = "CAP-123";
-       public static $createTime = "2013-02-28T00:00:00Z";
-       public static $id = "R-5678";
-       public static $parentPayment = "PAY-123";
-
-       public static function createRefund() {
-               $refund = new Refund();
-        $refund->setCreateTime(self::$createTime);
-               $refund->setAmount(AmountTest::createAmount());
-               $refund->setCaptureId(self::$captureId);
-               $refund->setId(self::$id);
-               $refund->setLinks(array(LinksTest::createLinks()));
-               $refund->setParentPayment(self::$parentPayment);                
-               
-               return $refund;
-       }
-       
-       public function setup() {
-               $this->refund = self::createRefund();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$captureId, $this->refund->getCaptureId());
-               $this->assertEquals(self::$createTime, $this->refund->getCreateTime());
-               $this->assertEquals(self::$id, $this->refund->getId());
-               $this->assertEquals(self::$parentPayment, $this->refund->getParentPayment());           
-               $this->assertEquals(AmountTest::$currency, $this->refund->getAmount()->getCurrency());
-               $links = $this->refund->getLinks();
-               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
-       }
-       
-       public function testSerializeDeserialize() {
-               $r1 = $this->refund;
-               
-               $r2 = new Refund();
-               $r2->fromJson($r1->toJson());
-               
-               $this->assertEquals($r1, $r2);
-       }
-       
-       public function testOperations() {
-       
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/RelatedResourcesTest.php
deleted file mode 100644 (file)
index c977395..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\RelatedResources;
-use PayPal\Test\Constants;
-
-class RelatedResourcesTest extends \PHPUnit_Framework_TestCase {
-
-       private $RelatedResources;
-
-       public static function createRelatedResources() {
-               $relatedResources = new RelatedResources();
-               $relatedResources->setAuthorization(AuthorizationTest::createAuthorization());
-               $relatedResources->setCapture(CaptureTest::createCapture());
-               return $relatedResources;
-       }
-       
-       public function setup() {
-               $this->relatedResources = self::createRelatedResources();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(AuthorizationTest::$create_time, $this->relatedResources->getAuthorization()->getCreateTime());
-               $this->assertEquals(CaptureTest::$create_time, $this->relatedResources->getCapture()->getCreateTime());
-       }
-       
-       public function testSerializeDeserialize() {
-               $s1 = $this->relatedResources;
-               
-               $s2 = new RelatedResources();
-               $s2->fromJson($s1->toJson());
-               
-               $this->assertEquals($s1, $s2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/SaleTest.php
deleted file mode 100644 (file)
index b4c6972..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\Refund;
-use PayPal\Api\Sale;
-use PayPal\Test\Constants;
-use PayPal\Test\Api\AmountTest;
-use PayPal\Test\Api\PaymentTest;
-use PayPal\Test\Api\LinksTest;
-
-class SaleTest extends \PHPUnit_Framework_TestCase {
-
-       private $sale;
-
-       public static $captureId = "CAP-123";
-       public static $createTime = "2013-02-28T00:00:00Z";
-       public static $id = "R-5678";
-       public static $parentPayment = "PAY-123";
-       public static $state = "Created";
-
-       public static function createSale() {
-               $sale = new Sale();
-               $sale->setAmount(AmountTest::createAmount());
-               $sale->setCreateTime(self::$createTime);
-               $sale->setId(self::$id);
-               $sale->setLinks(array(LinksTest::createLinks()));
-               $sale->setParentPayment(self::$parentPayment);          
-               $sale->setState(self::$state);
-               return $sale;
-       }
-       
-       public function setup() {
-               $this->sale = self::createSale();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$createTime, $this->sale->getCreateTime());
-               $this->assertEquals(self::$id, $this->sale->getId());
-               $this->assertEquals(self::$parentPayment, $this->sale->getParentPayment());
-               $this->assertEquals(self::$state, $this->sale->getState());
-               $this->assertEquals(AmountTest::$currency, $this->sale->getAmount()->getCurrency());
-               $links = $this->sale->getLinks();
-               $this->assertEquals(LinksTest::$href, $links[0]->getHref());
-       }
-       
-       public function testSerializeDeserialize() {
-               $s1 = $this->sale;
-               
-               $s2 = new Sale();
-               $s2->fromJson($s1->toJson());
-               
-               $this->assertEquals($s1, $s2);
-       }
-       
-       public function testOperations() {
-               $payment = PaymentTest::createNewPayment();                     
-               $payment->create();
-               
-               $transactions = $payment->getTransactions();
-               $resources = $transactions[0]->getRelatedResources();           
-               $saleId = $resources[0]->getSale()->getId();
-               
-               $sale = Sale::get($saleId);
-               $this->assertNotNull($sale);            
-               
-               $refund = new Refund();
-               $refund->setAmount(AmountTest::createAmount());
-               $sale->refund($refund);
-               
-               $this->setExpectedException('\InvalidArgumentException');
-               $sale->refund(NULL);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/ShippingAddressTest.php
deleted file mode 100644 (file)
index 6ca8b93..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace PayPal\Test\Api;
-
-use PayPal\Api\ShippingAddress;
-use PayPal\Test\Constants;
-
-class ShippingAddressTest extends \PHPUnit_Framework_TestCase {
-
-       private $address;
-
-       public static $line1 = "3909 Witmer Road";
-       public static $line2 = "Niagara Falls"; 
-       public static $city = "Niagara Falls";
-       public static $state = "NY";
-       public static $postalCode = "14305";
-       public static $countryCode = "US";
-       public static $phone = "716-298-1822";
-       public static $recipientName = "TestUser";
-
-       public static function createAddress() {
-               $addr = new ShippingAddress();
-               $addr->setLine1(self::$line1);
-               $addr->setLine2(self::$line2);
-               $addr->setCity(self::$city);
-               $addr->setState(self::$state);
-               $addr->setPostalCode(self::$postalCode);
-               $addr->setCountryCode(self::$countryCode);
-               $addr->setPhone(self::$phone);
-               $addr->setRecipientName(self::$recipientName);
-               return $addr;
-       }
-       
-       public function setup() {
-               $this->address = self::createAddress();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(self::$line1, $this->address->getLine1());
-               $this->assertEquals(self::$line2, $this->address->getLine2());
-               $this->assertEquals(self::$city, $this->address->getCity());
-               $this->assertEquals(self::$state, $this->address->getState());
-               $this->assertEquals(self::$postalCode, $this->address->getPostalCode());
-               $this->assertEquals(self::$countryCode, $this->address->getCountryCode());
-               $this->assertEquals(self::$phone, $this->address->getPhone());
-               $this->assertEquals(self::$recipientName, $this->address->getRecipientName());
-       }
-       
-       public function testSerializeDeserialize() {
-               $a1 = $this->address;
-               
-               $a2 = new ShippingAddress();
-               $a2->fromJson($a1->toJson());
-               
-               $this->assertEquals($a1, $a2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Api/TransactionTest.php
deleted file mode 100644 (file)
index f2e0ba3..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-
-namespace PayPal\Test\Api;
-
-use PayPal\Api\SubTransaction;
-
-use PayPal\Api\Transaction;
-use PayPal\Test\Constants;
-
-class TransactionTest extends \PHPUnit_Framework_TestCase {
-
-       private $transaction;
-
-       public static $description = "desc . . . ";
-       public static $total = "1.12";  
-
-       public static function createTransaction() {
-               $transaction = new Transaction();
-               $transaction->setAmount(AmountTest::createAmount());
-               $transaction->setDescription(self::$description);
-               $transaction->setItemList(ItemListTest::createItemList());
-               $transaction->setPayee(PayeeTest::createPayee());
-               $transaction->setRelatedResources( array(RelatedResourcesTest::createRelatedResources()) );
-               return $transaction;
-       }
-       
-       public function setup() {
-               $this->transaction = self::createTransaction();
-       }
-
-       public function testGetterSetter() {
-               $this->assertEquals(AmountTest::$currency, $this->transaction->getAmount()->getCurrency());
-               $this->assertEquals(self::$description, $this->transaction->getDescription());
-               $items = $this->transaction->getItemList()->getItems();
-               $this->assertEquals(ItemTest::$quantity, $items[0]->getQuantity());
-               $this->assertEquals(PayeeTest::$email, $this->transaction->getPayee()->getEmail());
-               $resources = $this->transaction->getRelatedResources();
-               $this->assertEquals(AuthorizationTest::$create_time, $resources[0]->getAuthorization()->getCreateTime());
-       }
-       
-       public function testSerializeDeserialize() {
-               $t1 = $this->transaction;
-               
-               $t2 = new Transaction();
-               $t2->fromJson($t1->toJson());
-               
-               $this->assertEquals($t1, $t2);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Auth/OAuthTokenCredentialTest.php
deleted file mode 100644 (file)
index 5dfe13e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php\r
-\r
-// namespace PayPal\Test\Common;\r
-\r
-use PayPal\Auth\OAuthTokenCredential;\r
-use PayPal\Test\Constants;\r
-use PayPal\Core\PPConfigManager;\r
-use PayPal\Exception\PPConnectionException;\r
-class OAuthTokenCredentialTest extends PHPUnit_Framework_TestCase {\r
-       \r
-       public function testGetAccessToken() {\r
-               $cred = new OAuthTokenCredential(Constants::CLIENT_ID, Constants::CLIENT_SECRET);\r
-               $config = PPConfigManager::getInstance()->getConfigHashmap();\r
-               \r
-               $token = $cred->getAccessToken($config);                \r
-               $this->assertNotNull($token);\r
-               \r
-               // Check that we get the same token when issuing a new call before token expiry\r
-               $newToken = $cred->getAccessToken($config);\r
-               $this->assertNotNull($newToken);\r
-               $this->assertEquals($token, $newToken);\r
-               \r
-//             sleep(60*8);\r
-//             $newToken = $cred->getAccessToken();\r
-//             $this->assertNotNull($newToken);\r
-//             $this->assertNotEqual($token, $newToken);\r
-               \r
-       }\r
-       \r
-       public function testInvalidCredentials() {\r
-               $this->setExpectedException('PayPal\Exception\PPConnectionException');\r
-               $cred = new OAuthTokenCredential('dummy', 'secret');            \r
-               $this->assertNull($cred->getAccessToken(PPConfigManager::getInstance()->getConfigHashmap()));\r
-       }\r
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayClass.php
deleted file mode 100644 (file)
index 3470847..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace PayPal\Test\Common;
-use PayPal\Common\PPModel;
-class ArrayClass extends PPModel {
-
-       public function setName($name) {
-               $this->name = $name;
-       }
-       public function getName() {
-               return $this->name;
-       }
-
-       public function setDescription($desc) {
-               $this->desc = $desc;
-       }
-       public function getDescription() {
-               return $this->desc;
-       }
-       
-       public function setTags($tags) {
-               if(!is_array($tags)) {
-                       $tags = array($tags);
-               }
-               $this->tags = $tags;
-       }
-       public function getTags() {
-               return $this->tags;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ArrayUtilTest.php
deleted file mode 100644 (file)
index 824b684..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php\r
-namespace PayPal\Test\Common;\r
-use PayPal\Common\PPArrayUtil;\r
-\r
-class ArrayUtilTest extends \PHPUnit_Framework_TestCase {\r
-       \r
-       public function testIsAssocArray() {\r
-               \r
-               $arr = array(1, 2, 3);\r
-               $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));    \r
-               \r
-               $arr = array(\r
-                       'name' => 'John Doe',\r
-                       'City' => 'San Jose'\r
-               );\r
-               $this->assertEquals(true, PPArrayUtil::isAssocArray($arr));\r
-               \r
-               $arr[] = 'CA';\r
-               $this->assertEquals(false, PPArrayUtil::isAssocArray($arr));\r
-       }\r
-}\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ChildClass.php
deleted file mode 100644 (file)
index a9a294b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-namespace PayPal\Test\Common;
-use PayPal\Common\PPModel;
-class ChildClass extends SimpleClass {
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/ModelTest.php
deleted file mode 100644 (file)
index 2c5d477..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php \r
-namespace PayPal\Test\Common;\r
-use PayPal\Common\PPModel;\r
-use PayPal\Test\Common\ArrayClass;\r
-use PayPal\Test\Common\SimpleClass;\r
-use PayPal\Test\Common\NestedClass;\r
-class ModelTest extends \PHPUnit_Framework_TestCase {\r
-       \r
-       public function testSimpleClassConversion() {\r
-               $o = new SimpleClass();\r
-               $o->setName("test");\r
-               $o->setDescription("description");\r
-\r
-               $this->assertEquals("test", $o->getName());\r
-               $this->assertEquals("description", $o->getDescription());\r
-               \r
-               $json = $o->toJSON();           \r
-               $this->assertEquals('{"name":"test","desc":"description"}', $json);\r
-               \r
-               $newO = new SimpleClass();\r
-               $newO->fromJson($json);\r
-               $this->assertEquals($o, $newO);\r
-               \r
-       }\r
-       \r
-       \r
-       public function testArrayClassConversion() {\r
-               $o = new ArrayClass();\r
-               $o->setName("test");\r
-               $o->setDescription("description");\r
-               $o->setTags(array('payment', 'info', 'test'));\r
-               \r
-               $this->assertEquals("test", $o->getName());\r
-               $this->assertEquals("description", $o->getDescription());\r
-               $this->assertEquals(array('payment', 'info', 'test'), $o->getTags());\r
-               \r
-               $json = $o->toJSON();\r
-               $this->assertEquals('{"name":"test","desc":"description","tags":["payment","info","test"]}', $json);\r
-       \r
-               $newO = new ArrayClass();\r
-               $newO->fromJson($json);\r
-               $this->assertEquals($o, $newO); \r
-       }\r
-       \r
-       public function testNestedClassConversion() {\r
-               $n = new ArrayClass();\r
-               $n->setName("test");\r
-               $n->setDescription("description");\r
-//             $n->setTags(array('payment', 'info', 'test'));\r
-               $o = new NestedClass();\r
-               $o->setId('123');\r
-               $o->setInfo($n);\r
-               \r
-               $this->assertEquals("123", $o->getId());\r
-               $this->assertEquals("test", $o->getInfo()->getName());          \r
-//             $this->assertEquals(array('payment', 'info', 'test'), $o->getInfo()->getTags());\r
-               \r
-               $json = $o->toJSON();\r
-//             $this->assertEquals('{"id":"123","info":{"name":"test","desc":"description","tags":["payment","info","test"]}}', $json);\r
-               $this->assertEquals('{"id":"123","info":{"name":"test","desc":"description"}}', $json);\r
-               \r
-               $newO = new NestedClass();\r
-               $newO->fromJson($json);\r
-               $this->assertEquals($o, $newO);\r
-       }\r
-}\r
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/NestedClass.php
deleted file mode 100644 (file)
index 06e5e00..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace PayPal\Test\Common;
-use PayPal\Common\PPModel;
-class NestedClass extends PPModel {
-       
-       public function setId($id) {
-               $this->id = $id;
-       }
-       public function getId() {
-               return $this->id;
-       }
-       
-       /**
-        * 
-        * @param PayPal\Test\Common\ArrayClass $info
-        */
-       public function setInfo($info) {
-               $this->info = $info;
-       }
-       /**
-        * 
-        * @return PayPal\Test\Common\ArrayClass
-        */
-       public function getInfo() {
-               return $this->info;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/SimpleClass.php
deleted file mode 100644 (file)
index 86732b1..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-namespace PayPal\Test\Common;
-use PayPal\Common\PPModel;
-class SimpleClass extends PPModel {
-
-       public function setName($name) {
-               $this->name = $name;
-       }
-       public function getName() {
-               return $this->name;
-       }
-       
-       public function setDescription($desc) {
-               $this->desc = $desc;
-       }
-       public function getDescription() {
-               return $this->desc;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Common/UserAgentTest.php
deleted file mode 100644 (file)
index d945374..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php\r
-\r
-use PayPal\Common\PPUserAgent;\r
-\r
-class UserAgentTest extends PHPUnit_Framework_TestCase {\r
-       \r
-       public function testGetValue() {\r
-               $ua = PPUserAgent::getValue("name", "version");\r
-               list($id, $version, $features) = sscanf($ua, "PayPalSDK/%s %s (%s)");\r
-               \r
-               // Check that we pass the useragent in the expected format\r
-               $this->assertNotNull($id);\r
-               $this->assertNotNull($version);\r
-               $this->assertNotNull($features);\r
-               \r
-               $this->assertEquals("name", $id);\r
-               $this->assertEquals("version", $version);\r
-               \r
-               // Check that we pass in these mininal features\r
-               $this->assertThat($features, $this->stringContains("OS="));\r
-               $this->assertThat($features, $this->stringContains("Bit="));\r
-               $this->assertThat($features, $this->stringContains("Lang="));\r
-               $this->assertThat($features, $this->stringContains("V="));\r
-               $this->assertGreaterThan(5, count(explode(';', $features)));\r
-       }\r
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Constants.php
deleted file mode 100644 (file)
index 7c424e3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-namespace PayPal\Test;
-
-class Constants {
-       const CLIENT_ID = 'EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM';
-       const CLIENT_SECRET = 'EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM';
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/PayPal/Test/Rest/CallTest.php
deleted file mode 100644 (file)
index 3da124e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-// namespace PayPal\Test\Rest;
-
-use PayPal\Auth\OAuthTokenCredential;
-
-use PayPal\Rest\Call;
-use PayPal\Test\Constants;
-
-class CallTest  {
-
-       public function testExecuteWithExplicitCredentials() {
-               $cred = new OAuthTokenCredential(Constants::CLIENT_ID, Constants::CLIENT_SECRET);
-               $data = '"request":"test message"';
-
-               $call = new Call();
-               $ret = $call->execute('/v1/payments/echo', "POST", $data, $cred);
-               $this->assertEquals($data, $ret);
-       }
-
-       public function testExecuteWithInvalidCredentials() {
-
-               $cred = new OAuthTokenCredential('test', 'dummy');
-               $data = '"request":"test message"';
-
-               $call = new Call();
-               $this->setExpectedException('\PPConnectionException');
-               $ret = $call->execute('/v1/payments/echo', "POST", $data, $cred);
-
-       }
-
-
-       public function testExecuteWithDefaultCredentials() {
-
-               $data = '"request":"test message"';
-
-               $call = new Call();
-               $ret = $call->execute('/v1/payments/echo', "POST", $data);
-               $this->assertEquals($data, $ret);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/bootstrap.php
deleted file mode 100644 (file)
index d249596..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-
-// Include the composer autoloader
-$loader = require dirname(__DIR__) . '/vendor/autoload.php';
-$loader->add('PayPal\\Test', __DIR__);
-define("PP_CONFIG_PATH", __DIR__);
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/rest-api-sdk-php/tests/sdk_config.ini
deleted file mode 100644 (file)
index f73b92a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-;Account credentials from developer portal
-[Account]
-acct1.ClientId = EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM
-acct1.ClientSecret = EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM
-
-
-;Connection Information
-[Http]
-http.ConnectionTimeOut = 30
-http.Retry = 1
-;http.Proxy=http://[username:password]@hostname[:port][/path]
-
-
-;Service Configuration
-[Service]
-service.EndPoint="https://api.sandbox.paypal.com"
-; Uncomment this line for integrating with the live endpoint 
-; service.EndPoint="https://api.paypal.com"
-
-
-;Logging Information
-[Log]
-
-log.LogEnabled=true
-
-# When using a relative path, the log file is created
-# relative to the .php file that is the entry point
-# for this request. You can also provide an absolute
-# path here
-log.FileName=PayPal.log
-
-# Logging level can be one of FINE, INFO, WARN or ERROR
-# Logging is most verbose in the 'FINE' level and
-# decreases as you proceed towards ERROR
-log.LogLevel=FINE
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/.gitignore
deleted file mode 100644 (file)
index 0db5431..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-tests/reports
-build
-.DS_Store
-*.log
-
-# IDE
-.project
-.settings
-.buildpath
-*.bak
-
-# Composer
-vendor
-composer.lock
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/CHANGELOG.md
deleted file mode 100644 (file)
index bfa023a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-
-CHANGELOG
-========= 
-V2.4.0 (May 20, 2013)
----------------------------------------------------------------------------------------
-   * Bugfix - removing deprecated methods like setAccessToken, getAccessToken from baseService 
-   * Bugfix - adding correct thirdparty auth header
-   
-V2.4.0 (May 20, 2013)
----------------------------------------------------------------------------------------
-   * Updating SDK to use NameSpaces
-   
-
-V1.4.0 (April 26, 2013)
----------------------------------------------------------------------------------------
-   * Adding support for Openid Connect
-   
-
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/LICENSE.txt
deleted file mode 100644 (file)
index ad030e5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-PAYPAL, INC.
-
-SDK LICENSE
-
-NOTICE TO USER:  PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement.  Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
-
-As used in this Agreement, "PayPal" means PayPal, Inc.  "Software" means the software code accompanying this agreement.   "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.   
-
-1.  LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
-
-Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose.  You may not modify the Documentation.
-
-No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement.  You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
-
-If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution.  You may distribute the Software in object code form under your own license, provided that your license agreement:
-
-(a)    complies with the terms and conditions of this license agreement; 
-
-(b)    effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
-
-(c)    effectively excludes all liability for damages on behalf of PayPal;
-
-(d)    states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
-
-(e)    states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.  
-
-2.  DISCLAIMER OF WARRANTY
-PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE.  Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations.  Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance.  Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you.  To the extent permissible, any implied warranties are limited to ninety (90) days.
-
-
-3.  LIMITATION OF LIABILITY
-PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION.  IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION. 
-
-4.  TRADEMARK USAGE
-PayPal is a trademark PayPal, Inc. in the United States and other countries.  Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.  
-
-5.  TERM
-Your rights under this Agreement shall terminate if you fail to comply with any of the material  terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance.  If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable. 
-
-6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof.  If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms.  Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA. 
-
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/README.md
deleted file mode 100644 (file)
index 035c047..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-### PayPal Core SDK - V2.4.0
-
-#### Prerequisites
-
- * PHP 5.3 and above
- * curl extension with support for OpenSSL
- * PHPUnit 3.5 for running test suite (Optional)
- * Composer
-
-#### Configuration
-  
-#### OpenID Connect Integration
-
-   1. Redirect your buyer to `PPOpenIdSession::getAuthorizationUrl($redirectUri, array('openid', 'address'));` to obtain authorization. The second argument is the list of access privileges that you want from the buyer.
-   2. Capture the authorization code that is available as a query parameter (`code`) in the redirect url
-   3. Exchange the authorization code for a access token, refresh token, id token combo
-
-
-```php
-    $token = PPOpenIdTokeninfo::createFromAuthorizationCode(
-               array(
-                       'code' => $authCode
-               )
-       );
-```
-   4. The access token is valid for a predefined duration and can be used for seamless XO or for retrieving user information
-
-
-```php
-   $user = PPOpenIdUserinfo::getUserinfo(
-               array(
-                       'access_token' => $token->getAccessToken()
-               )       
-       );
-```
-   5. If the access token has expired, you can obtain a new access token using the refresh token from the 3'rd step.
-
-```php
-   $token->createFromRefreshToken(array('openid', 'address'));
-```
-   6. Redirect your buyer to `PPOpenIdSession::getLogoutUrl($redirectUri, $idToken);` to log him out of paypal. 
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/build.xml
deleted file mode 100644 (file)
index 0496420..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project>
-<project name="PayPal_Core_SDK" default="build">
-
-       <property name="tests.dir" value="tests"/>
-       <property name="tests.out.dir" value="tests\reports"/>
-       
-       <condition property="PHPUNIT_BIN" value="phpunit.bat" else="phpunit">
-               <os family="windows" />
-       </condition>
-
-       <target name="clean">
-               <delete dir="${tests.out.dir}" />
-       </target>
-
-       <target name="test">
-               <mkdir dir="${tests.out.dir}" />
-               <exec dir="${basedir}" executable="${PHPUNIT_BIN}" failonerror="true">
-                       <arg line="--testdox --bootstrap ${tests.dir}\PPBootStrap.php --log-junit ${tests.out.dir}\phpunit.xml ${tests.dir}" />
-               </exec>
-       </target>
-
-       <target name="build" depends="clean, test" />
-</project>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/composer.json
deleted file mode 100644 (file)
index 961fb47..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-    "name": "paypal/sdk-core-php",
-    "description": "PayPal Core SDK for PHP",
-    "keywords": ["paypal", "php", "sdk"],
-    "type": "library",
-    "homepage": "https://github.com/paypal/sdk-core-php",
-    "license": "Apache2",
-    "authors": [
-        {
-            "name": "PayPal",
-            "homepage": "https://github.com/paypal/sdk-core-php/contributors"
-        }
-    ],
-    "require": {
-        "php": ">=5.3.0",
-        "ext-curl": "*"
-    },
-    "autoload": {
-        "psr-0": {
-            "PayPal": "lib/"
-        }
-    } 
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPCredential.php
deleted file mode 100644 (file)
index da994c4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-namespace PayPal\Auth;
-/**
- * Interface that represents API credentials
- */
-abstract class IPPCredential
-{
-       /**
-        * 
-        * @var IPPThirdPartyAuthorization
-        */
-       protected $thirdPartyAuthorization;
-       
-       public function setThirdPartyAuthorization($thirdPartyAuthorization) {
-               $this->thirdPartyAuthorization = $thirdPartyAuthorization;
-       }
-       
-       public function getThirdPartyAuthorization() {
-               return $this->thirdPartyAuthorization;
-       }
-       
-       public abstract function validate();
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/IPPThirdPartyAuthorization.php
deleted file mode 100644 (file)
index f019dfa..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-namespace PayPal\Auth;
-/**
- * 
- * Marker interface for implementations of third party authorization.
- * Third-party authorization allows you to make an API call on some 
- * other account\92s behalf 
- */
-interface IPPThirdPartyAuthorization {
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/AuthSignature.php
deleted file mode 100644 (file)
index 22bf706..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-//PayPal specific modification
-//Method to be called for generating signature
-
-class AuthSignature {
-
-       public function genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
-
-               $authServer = new OAuthServer(new MockOAuthDataStore());
-               $hmac_method = new OAuthSignatureMethodHmacSha1();
-               $authServer->add_signature_method($hmac_method);
-
-               $sig_method = $hmac_method;
-               $authConsumer = new OAuthConsumer($key, $secret, NULL);
-               $authToken = NULL;
-               $authToken = new OAuthToken($token, $tokenSecret);
-
-               //$params is the query param array which is required only in the httpMethod is "GET"
-               $params = array();
-               //TODO: set the Query parameters to $params if httpMethod is "GET"
-
-               $acc_req = OAuthRequest::from_consumer_and_token($authConsumer, $authToken, $httpMethod, $endpoint, $params);
-               $acc_req->sign_request($sig_method,$authConsumer, $authToken);
-               return  OAuthutil::parseQueryString($acc_req);
-       }
-       
-       public static function generateFullAuthString($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint) {
-               $authSignature = new AuthSignature();
-               $response = $authSignature->genSign($key, $secret, $token, $tokenSecret, $httpMethod, $endpoint);
-               return "token=" . $token . 
-                          ",signature=" . $response['oauth_signature'] .
-                      ",timestamp=" . $response['oauth_timestamp'];            
-       }
-       
-}
-?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/MockOAuthDataStore.php
deleted file mode 100644 (file)
index c9f0833..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php //vim: foldmethod=marker
-namespace PayPal\Auth\Oauth;
-class MockOAuthDataStore extends OAuthDataStore {/*{{{*/
-    private $consumer;
-    private $request_token;
-    private $access_token;
-    private $nonce;
-
-    function __construct() {/*{{{*/
-        $this->consumer = new OAuthConsumer("key", "secret", NULL);
-        $this->request_token = new OAuthToken("requestkey", "requestsecret", 1);
-        $this->access_token = new OAuthToken("accesskey", "accesssecret", 1);
-        $this->nonce = "nonce";
-    }/*}}}*/
-
-    function lookup_consumer($consumer_key) {/*{{{*/
-        if ($consumer_key == $this->consumer->key) return $this->consumer;
-        return NULL;
-    }/*}}}*/
-
-    function lookup_token($consumer, $token_type, $token) {/*{{{*/
-        $token_attrib = $token_type . "_token";
-        if ($consumer->key == $this->consumer->key
-            && $token == $this->$token_attrib->key) {
-            return $this->$token_attrib;
-        }
-        return NULL;
-    }/*}}}*/
-
-    function lookup_nonce($consumer, $token, $nonce, $timestamp) {/*{{{*/
-        if ($consumer->key == $this->consumer->key
-            && (($token && $token->key == $this->request_token->key)
-                || ($token && $token->key == $this->access_token->key))
-            && $nonce == $this->nonce) {
-            return $this->nonce;
-        }
-        return NULL;
-    }/*}}}*/
-
-    function new_request_token($consumer, $callback = NULL) {/*{{{*/
-        if ($consumer->key == $this->consumer->key) {
-            return $this->request_token;
-        }
-        return NULL;
-    }/*}}}*/
-
-    function new_access_token($token, $consumer, $verifier = NULL) {/*{{{*/
-        if ($consumer->key == $this->consumer->key
-            && $token->key == $this->request_token->key) {
-            return $this->access_token;
-        }
-        return NULL;
-    }/*}}}*/
-}/*}}}*/
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthConsumer.php
deleted file mode 100644 (file)
index 95bb48e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthConsumer {
-       public $key;
-       public $secret;
-
-       function __construct($key, $secret, $callback_url=NULL) {
-               $this->key = $key;
-               $this->secret = $secret;
-               $this->callback_url = $callback_url;
-       }
-
-       function __toString() {
-               return "OAuthConsumer[key=$this->key,secret=$this->secret]";
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthDataStore.php
deleted file mode 100644 (file)
index 2133acc..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthDataStore {
-       function lookup_consumer($consumer_key) {
-               // implement me
-       }
-
-       function lookup_token($consumer, $token_type, $token) {
-               // implement me
-       }
-
-       function lookup_nonce($consumer, $token, $nonce, $timestamp) {
-               // implement me
-       }
-
-       function new_request_token($consumer, $callback = null) {
-               // return a new token attached to this consumer
-       }
-
-       function new_access_token($token, $consumer, $verifier = null) {
-               // return a new access token attached to this consumer
-               // for the user associated with this token if the request token
-               // is authorized
-               // should also invalidate the request token
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthRequest.php
deleted file mode 100644 (file)
index fe86dd8..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthRequest {
-       public $parameters;
-       protected $http_method;
-       protected $http_url;
-       // for debug purposes
-       public $base_string;
-       public static $version = '1.0';
-       public static $POST_INPUT = 'php://input';
-
-       function __construct($http_method, $http_url, $parameters=NULL) {
-               $parameters = ($parameters) ? $parameters : array();
-               $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
-               $this->parameters = $parameters;
-               $this->http_method = $http_method;
-               $this->http_url = $http_url;
-       }
-
-
-       /**
-        * attempt to build up a request from what was passed to the server
-        */
-       public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
-               $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
-               ? 'http'
-               : 'https';
-               $http_url = ($http_url) ? $http_url : $scheme .
-                              '://' . $_SERVER['HTTP_HOST'] .
-                              ':' .
-               $_SERVER['SERVER_PORT'] .
-               $_SERVER['REQUEST_URI'];
-               $http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
-
-               // We weren't handed any parameters, so let's find the ones relevant to
-               // this request.
-               // If you run XML-RPC or similar you should use this to provide your own
-               // parsed parameter-list
-               if (!$parameters) {
-                       // Find request headers
-                       $request_headers = OAuthUtil::get_headers();
-
-                       // Parse the query-string to find GET parameters
-                       $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
-
-                       // It's a POST request of the proper content-type, so parse POST
-                       // parameters and add those overriding any duplicates from GET
-                       if ($http_method == "POST"
-                       &&  isset($request_headers['Content-Type'])
-                       && strstr($request_headers['Content-Type'],
-                     'application/x-www-form-urlencoded')
-                       ) {
-                               $post_data = OAuthUtil::parse_parameters(
-                               file_get_contents(self::$POST_INPUT)
-                               );
-                               $parameters = array_merge($parameters, $post_data);
-                       }
-
-                       // We have a Authorization-header with OAuth data. Parse the header
-                       // and add those overriding any duplicates from GET or POST
-                       if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') {
-                               $header_parameters = OAuthUtil::split_header(
-                               $request_headers['Authorization']
-                               );
-                               $parameters = array_merge($parameters, $header_parameters);
-                       }
-
-               }
-
-               return new OAuthRequest($http_method, $http_url, $parameters);
-       }
-
-       /**
-        * pretty much a helper function to set up the request
-        */
-       public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
-               $parameters = ($parameters) ?  $parameters : array();
-               $defaults = array("oauth_version" => OAuthRequest::$version,
-               // "oauth_nonce" => OAuthRequest::generate_nonce(),
-               "oauth_timestamp" => OAuthRequest::generate_timestamp(),
-
-                      "oauth_consumer_key" => $consumer->key);
-               if ($token)
-               $defaults['oauth_token'] = $token->key;
-
-               $parameters = array_merge($defaults, $parameters);
-               ksort($parameters);
-               return new OAuthRequest($http_method, $http_url, $parameters);
-       }
-
-       public function set_parameter($name, $value, $allow_duplicates = true) {
-               if ($allow_duplicates && isset($this->parameters[$name])) {
-                       // We have already added parameter(s) with this name, so add to the list
-                       if (is_scalar($this->parameters[$name])) {
-                               // This is the first duplicate, so transform scalar (string)
-                               // into an array so we can add the duplicates
-                               $this->parameters[$name] = array($this->parameters[$name]);
-                       }
-
-                       $this->parameters[$name][] = $value;
-               } else {
-                       $this->parameters[$name] = $value;
-               }
-       }
-
-       public function get_parameter($name) {
-               return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
-       }
-
-       public function get_parameters() {
-               return $this->parameters;
-       }
-
-       public function unset_parameter($name) {
-               unset($this->parameters[$name]);
-       }
-
-       /**
-        * The request parameters, sorted and concatenated into a normalized string.
-        * @return string
-        */
-       public function get_signable_parameters() {
-               // Grab all parameters
-               $params = $this->parameters;
-               ksort($params);
-               // Remove oauth_signature if present
-               // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
-               if (isset($params['oauth_signature'])) {
-                       unset($params['oauth_signature']);
-               }
-               foreach($params as $key => $value)
-               {
-                       $res[]=$key."=".$value;
-               }
-
-               return implode('&', $res);
-               //return OAuthUtil::build_http_query($params);
-       }
-
-       /**
-        * Returns the base string of this request
-        *
-        * The base string defined as the method, the url
-        * and the parameters (normalized), each urlencoded
-        * and the concated with &.
-        */
-       public function get_signature_base_string() {
-               $parts = array(
-               $this->get_normalized_http_method(),
-               $this->get_normalized_http_url(),
-               $this->get_signable_parameters()
-               );
-
-               $parts = OAuthUtil::urlencode_rfc3986($parts);
-
-               return implode('&', $parts);
-       }
-
-       /**
-        * just uppercases the http method
-        */
-       public function get_normalized_http_method() {
-               return strtoupper($this->http_method);
-       }
-
-       /**
-        * parses the url and rebuilds it to be
-        * scheme://host/path
-        */
-       public function get_normalized_http_url() {
-               $parts = parse_url($this->http_url);
-
-               $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
-               $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
-               $host = (isset($parts['host'])) ? $parts['host'] : '';
-               $path = (isset($parts['path'])) ? $parts['path'] : '';
-
-               if (($scheme == 'https' && $port != '443')
-               || ($scheme == 'http' && $port != '80')) {
-                       $host = "$host:$port";
-               }
-               return "$scheme://$host$path";
-       }
-
-       /**
-        * builds a url usable for a GET request
-        */
-       public function to_url() {
-               $post_data = $this->to_postdata();
-               $out = $this->get_normalized_http_url();
-               if ($post_data) {
-                       $out .= '?'.$post_data;
-               }
-               return $out;
-       }
-
-       /**
-        * builds the data one would send in a POST request
-        */
-       public function to_postdata() {
-               return OAuthUtil::build_http_query($this->parameters);
-       }
-
-       /**
-        * builds the Authorization: header
-        */
-       public function to_header($realm=null) {
-               $first = true;
-               if($realm) {
-                       $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
-                       $first = false;
-               } else
-               $out = 'Authorization: OAuth';
-
-               $total = array();
-               foreach ($this->parameters as $k => $v) {
-                       if (substr($k, 0, 5) != "oauth") continue;
-                       if (is_array($v)) {
-                               throw new OAuthException('Arrays not supported in headers');
-                       }
-                       $out .= ($first) ? ' ' : ',';
-                       $out .= OAuthUtil::urlencode_rfc3986($k) .
-              '="' .
-                       OAuthUtil::urlencode_rfc3986($v) .
-              '"';
-                       $first = false;
-               }
-               return $out;
-       }
-
-       public function __toString() {
-               return $this->to_url();
-       }
-
-
-       public function sign_request($signature_method,$consumer, $token) {
-                       
-               $empty=false;
-               $msg=array();
-               if( $token->key==null){
-                       $msg[] = 'Token key';
-               }
-               if($token->secret==null){
-                       $msg[] = 'Token secret';
-               }
-               if($consumer->key == null){
-
-                       $msg[] = 'Consumer key';
-               }
-               if($consumer->secret == null){
-
-                       $msg[] = 'Consumer secret';
-               }
-               if($this->http_url == null){
-
-                       $msg[] ='Endpoint';
-               }
-               if($this->http_method == null){
-
-                       $msg[] ='HTTP method';
-               }
-               if(count($msg))
-               {
-                       throw new OAuthException('Enter valid '. implode(',',$msg));
-               }
-               $this->set_parameter(
-      "oauth_signature_method",
-               $signature_method->get_name(),
-               false );
-
-               $signature = $this->build_signature($signature_method, $consumer, $token);
-               $this->set_parameter("oauth_signature", $signature, false);
-
-       }
-
-       public function build_signature($signature_method, $consumer, $token) {
-               $signature = $signature_method->build_signature($this, $consumer, $token);
-               return $signature;
-       }
-
-       /**
-        * util function: current timestamp
-        */
-       private static function generate_timestamp() {
-               return time();
-       }
-
-       /**
-        * util function: current nonce
-        */
-       private static function generate_nonce() {
-               $mt = microtime();
-               $rand = mt_rand();
-
-               return md5($mt . $rand); // md5s look nicer than numbers
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthServer.php
deleted file mode 100644 (file)
index 48c3257..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthServer {
-       protected $timestamp_threshold = 300; // in seconds, five minutes
-       protected $version = '1.0';             // hi blaine
-       protected $signature_methods = array();
-
-       protected $data_store;
-
-       function __construct($data_store) {
-               $this->data_store = $data_store;
-       }
-
-       public function add_signature_method($signature_method) {
-               $this->signature_methods[$signature_method->get_name()] =
-               $signature_method;
-       }
-
-       // high level functions
-
-       /**
-        * process a request_token request
-        * returns the request token on success
-        */
-       public function fetch_request_token(&$request) {
-               $this->get_version($request);
-
-               $consumer = $this->get_consumer($request);
-
-               // no token required for the initial token request
-               $token = NULL;
-
-               $this->check_signature($request, $consumer, $token);
-
-               // Rev A change
-               $callback = $request->get_parameter('oauth_callback');
-               $new_token = $this->data_store->new_request_token($consumer, $callback);
-
-               return $new_token;
-       }
-
-       /**
-        * process an access_token request
-        * returns the access token on success
-        */
-       public function fetch_access_token(&$request) {
-               $this->get_version($request);
-
-               $consumer = $this->get_consumer($request);
-
-               // requires authorized request token
-               $token = $this->get_token($request, $consumer, "request");
-
-               $this->check_signature($request, $consumer, $token);
-
-               // Rev A change
-               $verifier = $request->get_parameter('oauth_verifier');
-               $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
-
-               return $new_token;
-       }
-
-       /**
-        * verify an api call, checks all the parameters
-        */
-       public function verify_request(&$request) {
-               $this->get_version($request);
-               $consumer = $this->get_consumer($request);
-               $token = $this->get_token($request, $consumer, "access");
-               $this->check_signature($request, $consumer, $token);
-               return array($consumer, $token);
-       }
-
-       // Internals from here
-       /**
-        * version 1
-        */
-       private function get_version(&$request) {
-               $version = $request->get_parameter("oauth_version");
-               if (!$version) {
-                       // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
-                       // Chapter 7.0 ("Accessing Protected Ressources")
-                       $version = '1.0';
-               }
-               if ($version !== $this->version) {
-                       throw new OAuthException("OAuth version '$version' not supported");
-               }
-               return $version;
-       }
-
-       /**
-        * figure out the signature with some defaults
-        */
-       private function get_signature_method($request) {
-               $signature_method = $request instanceof OAuthRequest
-               ? $request->get_parameter("oauth_signature_method")
-               : NULL;
-
-               if (!$signature_method) {
-                       // According to chapter 7 ("Accessing Protected Ressources") the signature-method
-                       // parameter is required, and we can't just fallback to PLAINTEXT
-                       throw new OAuthException('No signature method parameter. This parameter is required');
-               }
-
-               if (!in_array($signature_method,
-               array_keys($this->signature_methods))) {
-                       throw new OAuthException(
-        "Signature method '$signature_method' not supported " .
-        "try one of the following: " .
-                       implode(", ", array_keys($this->signature_methods))
-                       );
-               }
-               return $this->signature_methods[$signature_method];
-       }
-
-       /**
-        * try to find the consumer for the provided request's consumer key
-        */
-       private function get_consumer($request) {
-               $consumer_key = $request instanceof OAuthRequest
-               ? $request->get_parameter("oauth_consumer_key")
-               : NULL;
-
-               if (!$consumer_key) {
-                       throw new OAuthException("Invalid consumer key");
-               }
-
-               $consumer = $this->data_store->lookup_consumer($consumer_key);
-               if (!$consumer) {
-                       throw new OAuthException("Invalid consumer");
-               }
-
-               return $consumer;
-       }
-
-       /**
-        * try to find the token for the provided request's token key
-        */
-       private function get_token($request, $consumer, $token_type="access") {
-               $token_field = $request instanceof OAuthRequest
-               ? $request->get_parameter('oauth_token')
-               : NULL;
-
-               $token = $this->data_store->lookup_token(
-               $consumer, $token_type, $token_field
-               );
-               if (!$token) {
-                       throw new OAuthException("Invalid $token_type token: $token_field");
-               }
-               return $token;
-       }
-
-       /**
-        * all-in-one function to check the signature on a request
-        * should guess the signature method appropriately
-        */
-       private function check_signature($request, $consumer, $token) {
-               // this should probably be in a different method
-               $timestamp = $request instanceof OAuthRequest
-               ? $request->get_parameter('oauth_timestamp')
-               : NULL;
-               $nonce = $request instanceof OAuthRequest
-               ? $request->get_parameter('oauth_nonce')
-               : NULL;
-
-               $this->check_timestamp($timestamp);
-               $this->check_nonce($consumer, $token, $nonce, $timestamp);
-
-               $signature_method = $this->get_signature_method($request);
-
-               $signature = $request->get_parameter('oauth_signature');
-               $valid_sig = $signature_method->check_signature(
-               $request,
-               $consumer,
-               $token,
-               $signature
-               );
-
-               if (!$valid_sig) {
-                       throw new OAuthException("Invalid signature");
-               }
-       }
-
-       /**
-        * check that the timestamp is new enough
-        */
-       private function check_timestamp($timestamp) {
-               if( ! $timestamp )
-               throw new OAuthException(
-        'Missing timestamp parameter. The parameter is required'
-        );
-
-        // verify that timestamp is recentish
-        $now = time();
-        if (abs($now - $timestamp) > $this->timestamp_threshold) {
-               throw new OAuthException(
-        "Expired timestamp, yours $timestamp, ours $now"
-               );
-        }
-       }
-
-       /**
-        * check that the nonce is not repeated
-        */
-       private function check_nonce($consumer, $token, $nonce, $timestamp) {
-               if( ! $nonce )
-               throw new OAuthException(
-        'Missing nonce parameter. The parameter is required'
-        );
-
-        // verify that the nonce is uniqueish
-        $found = $this->data_store->lookup_nonce(
-        $consumer,
-        $token,
-        $nonce,
-        $timestamp
-        );
-        if ($found) {
-               throw new OAuthException("Nonce already used: $nonce");
-        }
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethod.php
deleted file mode 100644 (file)
index 2e557d9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-/**
- * A class for implementing a Signature Method
- * See section 9 ("Signing Requests") in the spec
- */
-abstract class OAuthSignatureMethod {
-       /**
-        * Needs to return the name of the Signature Method (ie HMAC-SHA1)
-        * @return string
-        */
-       abstract public function get_name();
-
-       /**
-        * Build up the signature
-        * NOTE: The output of this function MUST NOT be urlencoded.
-        * the encoding is handled in OAuthRequest when the final
-        * request is serialized
-        * @param OAuthRequest $request
-        * @param OAuthConsumer $consumer
-        * @param OAuthToken $token
-        * @return string
-        */
-       abstract public function build_signature($request, $consumer, $token);
-
-       /**
-        * Verifies that a given signature is correct
-        * @param OAuthRequest $request
-        * @param OAuthConsumer $consumer
-        * @param OAuthToken $token
-        * @param string $signature
-        * @return bool
-        */
-       public function check_signature($request, $consumer, $token, $signature) {
-               $built = $this->build_signature($request, $consumer, $token);
-               return $built == $signature;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodHmacSha1.php
deleted file mode 100644 (file)
index 2c35c97..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-/**
- * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
- * where the Signature Base String is the text and the key is the concatenated values (each first
- * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
- * character (ASCII code 38) even if empty.
- *   - Chapter 9.2 ("HMAC-SHA1")
- */
-class OAuthSignatureMethodHmacSha1 extends OAuthSignatureMethod {
-       function get_name() {
-               return "HMAC-SHA1";
-       }
-
-       public function build_signature($request, $consumer, $token) {
-               $base_string = $request->get_signature_base_string();
-               $base_string=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $base_string);//convert base string to lowercase
-               $request->base_string = $base_string;
-
-               $key_parts = array(
-               $consumer->secret,
-               ($token) ? $token->secret : ""
-               );
-
-               $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
-               $key = implode('&', $key_parts);
-               $key=preg_replace("/(%[A-Za-z0-9]{2})/e", "strtolower('\\0')", $key);//convert to lowercase
-               return base64_encode(hash_hmac('sha1', $base_string, $key, true));
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodPLAINTEXT.php
deleted file mode 100644 (file)
index c29ebf3..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-/**
- * The PLAINTEXT method does not provide any security protection and SHOULD only be used
- * over a secure channel such as HTTPS. It does not use the Signature Base String.
- *   - Chapter 9.4 ("PLAINTEXT")
- */
-class OAuthSignatureMethodPLAINTEXT extends OAuthSignatureMethod {
-       public function get_name() {
-               return "PLAINTEXT";
-       }
-
-       /**
-        * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
-        * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
-        * empty. The result MUST be encoded again.
-        *   - Chapter 9.4.1 ("Generating Signatures")
-        *
-        * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
-        * OAuthRequest handles this!
-        */
-       public function build_signature($request, $consumer, $token) {
-               $key_parts = array(
-               $consumer->secret,
-               ($token) ? $token->secret : ""
-               );
-
-               $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
-               $key = implode('&', $key_parts);
-               $request->base_string = $key;
-
-               return $key;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthSignatureMethodRsaSha1.php
deleted file mode 100644 (file)
index 8dbcc5e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-/**
- * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
- * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
- * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
- * verified way to the Service Provider, in a manner which is beyond the scope of this
- * specification.
- *   - Chapter 9.3 ("RSA-SHA1")
- */
-abstract class OAuthSignatureMethodRsaSha1 extends OAuthSignatureMethod {
-       public function get_name() {
-               return "RSA-SHA1";
-       }
-
-       // Up to the SP to implement this lookup of keys. Possible ideas are:
-       // (1) do a lookup in a table of trusted certs keyed off of consumer
-       // (2) fetch via http using a url provided by the requester
-       // (3) some sort of specific discovery code based on request
-       //
-       // Either way should return a string representation of the certificate
-       protected abstract function fetch_public_cert(&$request);
-
-       // Up to the SP to implement this lookup of keys. Possible ideas are:
-       // (1) do a lookup in a table of trusted certs keyed off of consumer
-       //
-       // Either way should return a string representation of the certificate
-       protected abstract function fetch_private_cert(&$request);
-
-       public function build_signature($request, $consumer, $token) {
-               $base_string = $request->get_signature_base_string();
-               $request->base_string = $base_string;
-
-               // Fetch the private key cert based on the request
-               $cert = $this->fetch_private_cert($request);
-
-               // Pull the private key ID from the certificate
-               $privatekeyid = openssl_get_privatekey($cert);
-
-               // Sign using the key
-               $ok = openssl_sign($base_string, $signature, $privatekeyid);
-
-               // Release the key resource
-               openssl_free_key($privatekeyid);
-
-               return base64_encode($signature);
-       }
-
-       public function check_signature($request, $consumer, $token, $signature) {
-               $decoded_sig = base64_decode($signature);
-
-               $base_string = $request->get_signature_base_string();
-
-               // Fetch the public key cert based on the request
-               $cert = $this->fetch_public_cert($request);
-
-               // Pull the public key ID from the certificate
-               $publickeyid = openssl_get_publickey($cert);
-
-               // Check the computed signature against the one passed in the query
-               $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
-
-               // Release the key resource
-               openssl_free_key($publickeyid);
-
-               return $ok == 1;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthToken.php
deleted file mode 100644 (file)
index 50563e7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthToken {
-       // access tokens and request tokens
-       public $key;
-       public $secret;
-
-       /**
-        * key = the token
-        * secret = the token secret
-        */
-       function __construct($key, $secret) {
-               $this->key = $key;
-               $this->secret = $secret;
-       }
-
-       /**
-        * generates the basic string serialization of a token that a server
-        * would respond to request_token and access_token calls with
-        */
-       function to_string() {
-               return "oauth_token=" .
-               OAuthUtil::urlencode_rfc3986($this->key) .
-           "&oauth_token_secret=" .
-               OAuthUtil::urlencode_rfc3986($this->secret);
-       }
-
-       function __toString() {
-               return $this->to_string();
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Oauth/OAuthUtil.php
deleted file mode 100644 (file)
index 8c7d34c..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-namespace PayPal\Auth\Oauth;
-class OAuthUtil {
-       public static function urlencode_rfc3986($input) {
-               if (is_array($input)) {
-                       return array_map(array('PayPal\Auth\Oauth\OAuthUtil', 'urlencode_rfc3986'), $input);
-               } else if (is_scalar($input)) {
-                       $tmp1=str_replace('%7E', '~', rawurlencode($input));
-                       $tmp2=str_replace(".","%2E",$tmp1);
-                       $tmp3=str_replace("*","%2A",$tmp2);
-                       $tmp4=str_replace( '+', ' ',$tmp3);
-                       $tmp=str_replace("-","%2D",$tmp4);
-                       return $tmp;
-                       /*$tmp1=str_replace('%7E', '~', rawurlencode($input));
-                        $tmp2= str_replace(".","%2E",$tmp1);
-                               
-                               
-                        return $tmp;*/
-               }
-               else {
-                       return '';
-               }
-       }
-       public static function parseQueryString($str) {
-               $op = array();
-               $pairs = explode("&", $str);
-               foreach ($pairs as $pair) {
-                       list($k, $v) = array_map("urldecode", explode("=", $pair));
-                       $op[$k] = $v;
-               }
-               return $op;
-       }
-       //parses string to associative array -modified for PayPal Signature
-
-
-       // This decode function isn't taking into consideration the above
-       // modifications to the encoding process. However, this method doesn't
-       // seem to be used anywhere so leaving it as is.
-       public static function urldecode_rfc3986($string) {
-               return urldecode($string);
-       }
-
-       // Utility function for turning the Authorization: header into
-       // parameters, has to do some unescaping
-       // Can filter out any non-oauth parameters if needed (default behaviour)
-       // May 28th, 2010 - method updated to tjerk.meesters for a speed improvement.
-       //                  see http://code.google.com/p/oauth/issues/detail?id=163
-       public static function split_header($header, $only_allow_oauth_parameters = true) {
-               $params = array();
-               if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) {
-                       foreach ($matches[1] as $i => $h) {
-                               $params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]);
-                       }
-                       if (isset($params['realm'])) {
-                               unset($params['realm']);
-                       }
-               }
-               return $params;
-       }
-
-       // helper to try to sort out headers for people who aren't running apache
-       public static function get_headers() {
-               if (function_exists('apache_request_headers')) {
-                       // we need this to get the actual Authorization: header
-                       // because apache tends to tell us it doesn't exist
-                       $headers = apache_request_headers();
-
-                       // sanitize the output of apache_request_headers because
-                       // we always want the keys to be Cased-Like-This and arh()
-                       // returns the headers in the same case as they are in the
-                       // request
-                       $out = array();
-                       foreach ($headers AS $key => $value) {
-                               $key = str_replace(
-            " ",
-            "-",
-                               ucwords(strtolower(str_replace("-", " ", $key)))
-                               );
-                               $out[$key] = $value;
-                       }
-               } else {
-                       // otherwise we don't have apache and are just going to have to hope
-                       // that $_SERVER actually contains what we need
-                       $out = array();
-                       if( isset($_SERVER['CONTENT_TYPE']) )
-                       $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
-                       if( isset($_ENV['CONTENT_TYPE']) )
-                       $out['Content-Type'] = $_ENV['CONTENT_TYPE'];
-
-                       foreach ($_SERVER as $key => $value) {
-                               if (substr($key, 0, 5) == "HTTP_") {
-                                       // this is chaos, basically it is just there to capitalize the first
-                                       // letter of every word that is not an initial HTTP and strip HTTP
-                                       // code from przemek
-                                       $key = str_replace(
-            " ",
-            "-",
-                                       ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
-                                       );
-                                       $out[$key] = $value;
-                               }
-                       }
-               }
-               return $out;
-       }
-
-       // This function takes a input like a=b&a=c&d=e and returns the parsed
-       // parameters like this
-       // array('a' => array('b','c'), 'd' => 'e')
-       public static function parse_parameters( $input ) {
-               if (!isset($input) || !$input) return array();
-
-               $pairs = explode('&', $input);
-
-               $parsed_parameters = array();
-               foreach ($pairs as $pair) {
-                       $split = explode('=', $pair, 2);
-                       $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
-                       $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
-
-                       if (isset($parsed_parameters[$parameter])) {
-                               // We have already recieved parameter(s) with this name, so add to the list
-                               // of parameters with this name
-
-                               if (is_scalar($parsed_parameters[$parameter])) {
-                                       // This is the first duplicate, so transform scalar (string) into an array
-                                       // so we can add the duplicates
-                                       $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
-                               }
-
-                               $parsed_parameters[$parameter][] = $value;
-                       } else {
-                               $parsed_parameters[$parameter] = $value;
-                       }
-               }
-               return $parsed_parameters;
-       }
-
-       public static function build_http_query($params) {
-               if (!$params) return '';
-
-               // Urlencode both keys and values
-               $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
-               $values = OAuthUtil::urlencode_rfc3986(array_values($params));
-               $params = array_combine($keys, $values);
-
-               // Parameters are sorted by name, using lexicographical byte value ordering.
-               // Ref: Spec: 9.1.1 (1)
-               uksort($params, 'strcmp');
-
-               $pairs = array();
-               foreach ($params as $parameter => $value) {
-                       if (is_array($value)) {
-                               // If two or more parameters share the same name, they are sorted by their value
-                               // Ref: Spec: 9.1.1 (1)
-                               // June 12th, 2010 - changed to sort because of issue 164 by hidetaka
-                               sort($value, SORT_STRING);
-                               foreach ($value as $duplicate_value) {
-                                       $pairs[] = $parameter . '=' . $duplicate_value;
-                               }
-                       } else {
-                               $pairs[] = $parameter . '=' . $value;
-                       }
-               }
-               // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
-               // Each name-value pair is separated by an '&' character (ASCII code 38)
-               return implode('&', $pairs);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdAddress.php
deleted file mode 100644 (file)
index 4cee501..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<?php
-namespace PayPal\Auth\Openid;
-use PayPal\Common\PPModel;
-/**
- * End-User's preferred address.
- */
-class PPOpenIdAddress extends PPModel {
-
-               /**
-                * Full street address component, which may include house number, street name.
-                * @param string $street_address
-                */
-                public function setStreetAddress($street_address) {
-                       $this->street_address = $street_address;
-                       return $this;
-                }
-               
-               /**
-                * Full street address component, which may include house number, street name.
-                * @return string
-                */
-                public function getStreetAddress() {
-                       return $this->street_address;
-                }
-                
-               /**
-                * City or locality component.
-                * @param string $locality
-                */
-                public function setLocality($locality) {
-                       $this->locality = $locality;
-                       return $this;
-                }
-               
-               /**
-                * City or locality component.
-                * @return string
-                */
-                public function getLocality() {
-                       return $this->locality;
-                }
-                
-               /**
-                * State, province, prefecture or region component.
-                * @param string $region
-                */
-                public function setRegion($region) {
-                       $this->region = $region;
-                       return $this;
-                }
-               
-               /**
-                * State, province, prefecture or region component.
-                * @return string
-                */
-                public function getRegion() {
-                       return $this->region;
-                }
-                
-               /**
-                * Zip code or postal code component.
-                * @param string $postal_code
-                */
-                public function setPostalCode($postal_code) {
-                       $this->postal_code = $postal_code;
-                       return $this;
-                }
-               
-               /**
-                * Zip code or postal code component.
-                * @return string
-                */
-                public function getPostalCode() {
-                       return $this->postal_code;
-                }
-                
-               /**
-                * Country name component.
-                * @param string $country
-                */
-                public function setCountry($country) {
-                       $this->country = $country;
-                       return $this;
-                }
-               
-               /**
-                * Country name component.
-                * @return string
-                */
-                public function getCountry() {
-                       return $this->country;
-                }
-                
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdError.php
deleted file mode 100644 (file)
index 1c5e051..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-namespace PayPal\Auth\Openid;
-namespace PayPal\Common\PPModel;
-/**
- * Error resource
- */
-class PPOpenIdError extends PPModel {
-
-               /**
-                * A single ASCII error code from the following enum.
-                * @param string $error
-                */
-                public function setError($error) {
-                       $this->error = $error;
-                       return $this;
-                }
-               
-               /**
-                * A single ASCII error code from the following enum.
-                * @return string
-                */
-                public function getError() {
-                       return $this->error;
-                }
-                
-               /**
-                * A resource ID that indicates the starting resource in the returned results.
-                * @param string $error_description
-                */
-                public function setErrorDescription($error_description) {
-                       $this->error_description = $error_description;
-                       return $this;
-                }
-               
-               /**
-                * A resource ID that indicates the starting resource in the returned results.
-                * @return string
-                */
-                public function getErrorDescription() {
-                       return $this->error_description;
-                }
-                
-               /**
-                * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
-                * @param string $error_uri
-                */
-                public function setErrorUri($error_uri) {
-                       $this->error_uri = $error_uri;
-                       return $this;
-                }
-               
-               /**
-                * A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error.
-                * @return string
-                */
-                public function getErrorUri() {
-                       return $this->error_uri;
-                }
-                
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdSession.php
deleted file mode 100644 (file)
index ba76f0a..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-namespace PayPal\Auth\Openid;
-use PayPal\Core\PPConstants;
-use PayPal\Common\PPApiContext;
-use PayPal\Core\PPConstants;
-class PPOpenIdSession {
-
-       /**
-        * Returns the PayPal URL to which the user must be redirected to
-        * start the authentication / authorization process.
-        *
-        * @param string $redirectUri Uri on merchant website to where
-        *                              the user must be redirected to post paypal login
-        * @param array $scope The access privilges that you are requesting for
-        *                              from the user. Pass empty array for all scopes.
-        *                              See https://developer.paypal.com/webapps/developer/docs/classic/loginwithpaypal/ht_OpenIDConnect/#parameters for more
-        * @param PPApiContext $apiContext Optional API Context
-        */
-       public static function getAuthorizationUrl($redirectUri, $scope, $apiContext=null) {
-
-               if(is_null($apiContext)) {
-                       $apiContext = new PPApiContext();
-               }
-               $config = $apiContext->getConfig();
-
-               $scope = count($scope) != 0 ? $scope : array('openid', 'profile', 'address', 'email', 'phone', 'https://uri.paypal.com/services/paypalattributes');
-               if(!in_array('openid', $scope)) {
-                       $scope[] = 'openid';
-               }
-               $params = array(
-                               'client_id' => $config['acct1.ClientId'],
-                               'response_type' => 'code',
-                               'scope' => implode(" ", $scope),
-                               'redirect_uri' => $redirectUri
-               );
-               return sprintf("%s/v1/authorize?%s", self::getBaseUrl($config), http_build_query($params));
-       }
-
-
-       /**
-        * Returns the URL to which the user must be redirected to
-        * logout from the OpenID provider (i.e. PayPal)
-        *
-        * @param string $redirectUri Uri on merchant website to where
-        *                              the user must be redirected to post logout
-        * @param string $idToken id_token from the TokenInfo object
-        * @param PayPal/Rest/APIContext $apiContext Optional API Context
-        */
-       public static function getLogoutUrl($redirectUri, $idToken, $apiContext=null) {
-               
-               if(is_null($apiContext)) {
-                       $apiContext = new PPApiContext();
-               }
-               $config = $apiContext->getConfig();
-               
-               PPConstants::OPENID_REDIRECT_LIVE_URL;
-               $params = array(
-                               'id_token' => $idToken,
-                               'redirect_uri' => $redirectUri,
-                               'logout' => 'true'
-               );
-               return sprintf("%s/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params));
-       }
-
-       private static function getBaseUrl($config) {
-
-               if(array_key_exists('openid.RedirectUri', $config)) {
-                       return $config['openid.RedirectUri'];
-               } else if (array_key_exists('mode', $config)) {
-                       switch(strtoupper($config['mode'])) {
-                               case 'SANDBOX':
-                                       return PPConstants::OPENID_REDIRECT_SANDBOX_URL;
-                               case 'LIVE':
-                                       return PPConstants::OPENID_REDIRECT_LIVE_URL;   
-                       }
-               }
-               return ;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdTokeninfo.php
deleted file mode 100644 (file)
index cdb90d0..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-<?php
-namespace PayPal\Auth\Openid;
-use PayPal\Common\PPModel;
-/**
- * Token grant resource
- */
-class PPOpenIdTokeninfo extends PPModel {
-
-               /**
-                * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
-                * @param string $scope
-                */
-                public function setScope($scope) {
-                       $this->scope = $scope;
-                       return $this;
-                }
-               
-               /**
-                * OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
-                * @return string
-                */
-                public function getScope() {
-                       return $this->scope;
-                }
-                
-               /**
-                * The access token issued by the authorization server.
-                * @param string $access_token
-                */
-                public function setAccessToken($access_token) {
-                       $this->access_token = $access_token;
-                       return $this;
-                }
-               
-               /**
-                * The access token issued by the authorization server.
-                * @return string
-                */
-                public function getAccessToken() {
-                       return $this->access_token;
-                }
-                
-               /**
-                * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
-                * @param string $refresh_token
-                */
-                public function setRefreshToken($refresh_token) {
-                       $this->refresh_token = $refresh_token;
-                       return $this;
-                }
-               
-               /**
-                * The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in OAuth2.0 RFC6749 in Section 6.
-                * @return string
-                */
-                public function getRefreshToken() {
-                       return $this->refresh_token;
-                }
-                
-               /**
-                * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1).  Value is case insensitive.
-                * @param string $token_type
-                */
-                public function setTokenType($token_type) {
-                       $this->token_type = $token_type;
-                       return $this;
-                }
-               
-               /**
-                * The type of the token issued as described in OAuth2.0 RFC6749 (Section 7.1).  Value is case insensitive.
-                * @return string
-                */
-                public function getTokenType() {
-                       return $this->token_type;
-                }
-                
-               /**
-                * The id_token is a session token assertion that denotes the user's authentication status
-                * @param string $id_token
-                */
-                public function setIdToken($id_token) {
-                       $this->id_token = $id_token;
-                       return $this;
-                }
-               
-               /**
-                * The id_token is a session token assertion that denotes the user's authentication status
-                * @return string
-                */
-                public function getIdToken() {
-                       return $this->id_token;
-                }
-                
-               /**
-                * The lifetime in seconds of the access token.
-                * @param integer $expires_in
-                */
-                public function setExpiresIn($expires_in) {
-                       $this->expires_in = $expires_in;
-                       return $this;
-                }
-               
-               /**
-                * The lifetime in seconds of the access token.
-                * @return integer
-                */
-                public function getExpiresIn() {
-                       return $this->expires_in;
-                }
-                
-
-        /**
-                * Creates an Access Token from an Authorization Code.
-                *
-                * @path /v1/identity/openidconnect/tokenservice
-                * @method POST
-                * @param array $params (allowed values are grant_type, code and redirect_uri)
-                *                              (optional) grant_type is the Token grant type. Defaults to authorization_code
-                *                              code is Authorization code previously received from the authorization server
-                *                              redirect_uri Redirection endpoint that must match the one provided during the 
-                *                                      authorization request that ended in receiving the authorization code.
-                * @param PPApiContext $apiContext Optional API Context   
-                * @return PPOpenIdTokeninfo
-                */
-               public static function createFromAuthorizationCode($params, $apiContext=null) {
-                       static $allowedParams = array('grant_type' => 1, 'code' => 1, 'redirect_uri' => 1);
-                       if(is_null($apiContext)) {
-                               $apiContext = new PPApiContext();
-                       }
-                       
-                       if(!array_key_exists('grant_type', $params)) {
-                               $params['grant_type'] = 'authorization_code';
-                       }       
-                       
-                       $call = new PPRestCall($apiContext);
-                       $token = new PPOpenIdTokeninfo();
-                       $token->fromJson(
-                               $call->execute(array('PPOpenIdHandler'),
-                                       "/v1/identity/openidconnect/tokenservice" , "POST", 
-                                       http_build_query(array_intersect_key($params, $allowedParams)),
-                                       array('Content-Type' => 'application/x-www-form-urlencoded')
-                       ));
-                       return $token;
-               }
-        /**
-                * Creates an Access Token from an Refresh Token.
-                *
-                * @path /v1/identity/openidconnect/tokenservice
-                * @method POST
-                * @param array $params (allowed values are grant_type and scope)
-                *                              (optional) refresh_token refresh token. If one is not passed, refresh token from the current object is used.
-                *                              (optional) grant_type is the Token grant type. Defaults to refresh_token
-                *                              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
-                */
-               public function createFromRefreshToken($params, $apiContext=null) {
-                       
-                       static $allowedParams = array('grant_type' => 1, 'refresh_token' => 1, 'scope' => 1);
-                       if(is_null($apiContext)) {
-                               $apiContext = new PPApiContext();
-                       }
-                                                       
-                       if(!array_key_exists('grant_type', $params)) {
-                               $params['grant_type'] = 'refresh_token';
-                       }
-                       if(!array_key_exists('refresh_token', $params)) {
-                               $params['refresh_token'] = $this->getRefreshToken();
-                       }
-                                               
-                       
-                       $call = new PPRestCall($apiContext);                    
-                       $this->fromJson(
-                               $call->execute(array('PPOpenIdHandler'), 
-                                       "/v1/identity/openidconnect/tokenservice", "POST",
-                                       http_build_query(array_intersect_key($params, $allowedParams)),
-                                       array('Content-Type' => 'application/x-www-form-urlencoded')
-                       ));
-                       return $this;
-               }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/Openid/PPOpenIdUserinfo.php
deleted file mode 100644 (file)
index 29ff51f..0000000
+++ /dev/null
@@ -1,400 +0,0 @@
-<?php
-namespace PayPal\Auth\Openid;
-use PayPal\Common\PPModel;
-/**
- * OpenIdConnect UserInfo Resource
- */
-class PPOpenIdUserinfo extends PPModel {
-
-               /**
-                * Subject - Identifier for the End-User at the Issuer.
-                * @param string $user_id
-                */
-                public function setUserId($user_id) {
-                       $this->user_id = $user_id;
-                       return $this;
-                }
-               
-               /**
-                * Subject - Identifier for the End-User at the Issuer.
-                * @return string
-                */
-                public function getUserId() {
-                       return $this->user_id;
-                }
-                
-               /**
-                * Subject - Identifier for the End-User at the Issuer.
-                * @param string $sub
-                */
-                public function setSub($sub) {
-                       $this->sub = $sub;
-                       return $this;
-                }
-               
-               /**
-                * Subject - Identifier for the End-User at the Issuer.
-                * @return string
-                */
-                public function getSub() {
-                       return $this->sub;
-                }
-                
-               /**
-                * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
-                * @param string $name
-                */
-                public function setName($name) {
-                       $this->name = $name;
-                       return $this;
-                }
-               
-               /**
-                * End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
-                * @return string
-                */
-                public function getName() {
-                       return $this->name;
-                }
-                
-               /**
-                * Given name(s) or first name(s) of the End-User
-                * @param string $given_name
-                */
-                public function setGivenName($given_name) {
-                       $this->given_name = $given_name;
-                       return $this;
-                }
-               
-               /**
-                * Given name(s) or first name(s) of the End-User
-                * @return string
-                */
-                public function getGivenName() {
-                       return $this->given_name;
-                }
-                
-               /**
-                * Surname(s) or last name(s) of the End-User.
-                * @param string $family_name
-                */
-                public function setFamilyName($family_name) {
-                       $this->family_name = $family_name;
-                       return $this;
-                }
-               
-               /**
-                * Surname(s) or last name(s) of the End-User.
-                * @return string
-                */
-                public function getFamilyName() {
-                       return $this->family_name;
-                }
-                
-               /**
-                * Middle name(s) of the End-User.
-                * @param string $middle_name
-                */
-                public function setMiddleName($middle_name) {
-                       $this->middle_name = $middle_name;
-                       return $this;
-                }
-               
-               /**
-                * Middle name(s) of the End-User.
-                * @return string
-                */
-                public function getMiddleName() {
-                       return $this->middle_name;
-                }
-                
-               /**
-                * URL of the End-User's profile picture.
-                * @param string $picture
-                */
-                public function setPicture($picture) {
-                       $this->picture = $picture;
-                       return $this;
-                }
-               
-               /**
-                * URL of the End-User's profile picture.
-                * @return string
-                */
-                public function getPicture() {
-                       return $this->picture;
-                }
-                
-               /**
-                * End-User's preferred e-mail address.
-                * @param string $email
-                */
-                public function setEmail($email) {
-                       $this->email = $email;
-                       return $this;
-                }
-               
-               /**
-                * End-User's preferred e-mail address.
-                * @return string
-                */
-                public function getEmail() {
-                       return $this->email;
-                }
-                
-               /**
-                * True if the End-User's e-mail address has been verified; otherwise false.
-                * @param boolean $email_verified
-                */
-                public function setEmailVerified($email_verified) {
-                       $this->email_verified = $email_verified;
-                       return $this;
-                }
-               
-               /**
-                * True if the End-User's e-mail address has been verified; otherwise false.
-                * @return boolean
-                */
-                public function getEmailVerified() {
-                       return $this->email_verified;
-                }
-                
-               /**
-                * End-User's gender.
-                * @param string $gender
-                */
-                public function setGender($gender) {
-                       $this->gender = $gender;
-                       return $this;
-                }
-               
-               /**
-                * End-User's gender.
-                * @return string
-                */
-                public function getGender() {
-                       return $this->gender;
-                }
-                
-               /**
-                * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
-                * @param string $birthday
-                */
-                public function setBirthday($birthday) {
-                       $this->birthday = $birthday;
-                       return $this;
-                }
-               
-               /**
-                * End-User's birthday, represented as an YYYY-MM-DD format. They year MAY be 0000, indicating it is omited. To represent only the year, YYYY format would be used.
-                * @return string
-                */
-                public function getBirthday() {
-                       return $this->birthday;
-                }
-                
-               /**
-                * Time zone database representing the End-User's time zone
-                * @param string $zoneinfo
-                */
-                public function setZoneinfo($zoneinfo) {
-                       $this->zoneinfo = $zoneinfo;
-                       return $this;
-                }
-               
-               /**
-                * Time zone database representing the End-User's time zone
-                * @return string
-                */
-                public function getZoneinfo() {
-                       return $this->zoneinfo;
-                }
-                
-               /**
-                * End-User's locale.
-                * @param string $locale
-                */
-                public function setLocale($locale) {
-                       $this->locale = $locale;
-                       return $this;
-                }
-               
-               /**
-                * End-User's locale.
-                * @return string
-                */
-                public function getLocale() {
-                       return $this->locale;
-                }
-                
-               /**
-                * End-User's language.
-                * @param string $language
-                */
-                public function setLanguage($language) {
-                       $this->language = $language;
-                       return $this;
-                }
-               
-               /**
-                * End-User's language.
-                * @return string
-                */
-                public function getLanguage() {
-                       return $this->language;
-                }
-                
-               /**
-                * End-User's verified status.
-                * @param boolean $verified
-                */
-                public function setVerified($verified) {
-                       $this->verified = $verified;
-                       return $this;
-                }
-               
-               /**
-                * End-User's verified status.
-                * @return boolean
-                */
-                public function getVerified() {
-                       return $this->verified;
-                }
-                
-               /**
-                * End-User's preferred telephone number.
-                * @param string $phone_number
-                */
-                public function setPhoneNumber($phone_number) {
-                       $this->phone_number = $phone_number;
-                       return $this;
-                }
-               
-               /**
-                * End-User's preferred telephone number.
-                * @return string
-                */
-                public function getPhoneNumber() {
-                       return $this->phone_number;
-                }
-                
-               /**
-                * End-User's preferred address.
-                * @param PPOpenIdAddress $address
-                */
-                public function setAddress($address) {
-                       $this->address = $address;
-                       return $this;
-                }
-               
-               /**
-                * End-User's preferred address.
-                * @return PPOpenIdAddress
-                */
-                public function getAddress() {
-                       return $this->address;
-                }
-                
-               /**
-                * Verified account status.
-                * @param boolean $verified_account
-                */
-                public function setVerifiedAccount($verified_account) {
-                       $this->verified_account = $verified_account;
-                       return $this;
-                }
-               
-               /**
-                * Verified account status.
-                * @return boolean
-                */
-                public function getVerifiedAccount() {
-                       return $this->verified_account;
-                }
-                
-               /**
-                * Account type.
-                * @param string $account_type
-                */
-                public function setAccountType($account_type) {
-                       $this->account_type = $account_type;
-                       return $this;
-                }
-               
-               /**
-                * Account type.
-                * @return string
-                */
-                public function getAccountType() {
-                       return $this->account_type;
-                }
-                
-               /**
-                * Account holder age range.
-                * @param string $age_range
-                */
-                public function setAgeRange($age_range) {
-                       $this->age_range = $age_range;
-                       return $this;
-                }
-               
-               /**
-                * Account holder age range.
-                * @return string
-                */
-                public function getAgeRange() {
-                       return $this->age_range;
-                }
-                
-               /**
-                * Account payer identifier.
-                * @param string $payer_id
-                */
-                public function setPayerId($payer_id) {
-                       $this->payer_id = $payer_id;
-                       return $this;
-                }
-               
-               /**
-                * Account payer identifier.
-                * @return string
-                */
-                public function getPayerId() {
-                       return $this->payer_id;
-                }
-                
-
-        /**
-                * returns user details
-                *
-                * @path /v1/identity/openidconnect/userinfo
-                * @method GET
-                * @param array $params (allowed values are access_token)
-                *                                      access_token - access token from the createFromAuthorizationCode / createFromRefreshToken calls  
-                * @param PPApiContext $apiContext Optional API Context
-                * @return PPOpenIdUserinfo
-                */
-               public static function getUserinfo($params, $apiContext=null) {
-                       static $allowedParams = array( 'schema' => 1);
-                       if(is_null($apiContext)) {
-                               $apiContext = new PPApiContext();
-                       }
-                                               
-                       if(!array_key_exists('schema', $params)) {
-                               $params['schema'] = 'openid';
-                       }                       
-                       $requestUrl = "/v1/identity/openidconnect/userinfo?"
-                                       . http_build_query(array_intersect_key($params, $allowedParams));                       
-                       $call = new PPRestCall($apiContext);
-                       $ret = new PPOpenIdUserinfo();
-                       $ret->fromJson(
-                               $call->execute(array('PPOpenIdHandler'), $requestUrl, "GET", "", 
-                                       array(
-                                               'Authorization' => "Bearer " . $params['access_token'],
-                                               'Content-Type'=> 'x-www-form-urlencoded'
-                                       )
-                               )
-                       );
-                       return $ret;
-               }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPCertificateCredential.php
deleted file mode 100644 (file)
index a33ab96..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-namespace PayPal\Auth;
-use PayPal\Exception\PPMissingCredentialException;
-use PayPal\Auth\IPPCredential;
-/**
- * 
- * Client certificate based credentials
- */
-class PPCertificateCredential extends IPPCredential {
-       
-       /**
-        * API username
-        * @var string
-        */
-       protected $userName;
-       
-       /**
-        * API password
-        * @var string
-        */
-       protected $password;
-
-       /**
-        * Path to PEM encoded API certificate on local filesystem
-        * @var string
-        */
-       protected $certificatePath;
-
-       /**
-        * Password used to protect the API certificate
-        * @var string
-        */
-       protected $certificatePassPhrase;
-       
-       /**
-        * Application Id that uniquely identifies an application that uses the
-        * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
-        * The application Id is issued by PayPal.
-        * Test application Ids are available for the sandbox environment
-        * @var string
-        */
-       protected $applicationId;       
-       
-       /**
-        * Constructs a new certificate credential object
-        * 
-        * @param string $userName      API username
-        * @param string $password      API password
-        * @param string $certPath      Path to PEM encoded client certificate file
-        * @param string $certificatePassPhrase password need to use the certificate
-        */
-       public function __construct($userName, $password, $certPath, $certificatePassPhrase=NULL) {
-               $this->userName = trim($userName);
-               $this->password = trim($password);
-               $this->certificatePath = trim($certPath);
-               $this->certificatePassPhrase = $certificatePassPhrase; 
-               $this->validate();
-       }
-       
-       public function validate() {
-               
-               if (empty($this->userName)) {
-                       throw new PPMissingCredentialException("username cannot be empty");
-               }
-               if (empty($this->password)) {
-                       throw new PPMissingCredentialException("password cannot be empty");
-               }               
-               if (empty($this->certificatePath)) {
-                       throw new PPMissingCredentialException("certificate cannot be empty");
-               }
-       }
-
-       public function getUserName() {
-               return $this->userName;
-       }
-
-       public function getPassword() {
-               return $this->password;
-       }
-       
-       public function getCertificatePath() {
-               if (realpath($this->certificatePath)) {
-                       return realpath($this->certificatePath);
-               } else if(defined('PP_CONFIG_PATH')) {
-                       return constant('PP_CONFIG_PATH') . DIRECTORY_SEPARATOR . $this->certificatePath;
-               } else {
-                       return realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".."  .DIRECTORY_SEPARATOR . ".."     . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . $this->certificatePath);
-               }
-       }
-
-       public function getCertificatePassPhrase() {
-               return $this->certificatePassPhrase;
-       }
-       
-       public function setApplicationId($applicationId) {
-               $this->applicationId = trim($applicationId);
-       }
-       
-       public function getApplicationId() {
-               return $this->applicationId;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSignatureCredential.php
deleted file mode 100644 (file)
index d1e6f49..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-namespace PayPal\Auth;
-use PayPal\Exception\PPMissingCredentialException;
-/**
- * API signature (3-token) based credentials
- */
-class PPSignatureCredential extends IPPCredential {
-
-       /**
-        * API username
-        * @var string
-        */
-       protected $userName;
-
-       /**
-        * API password
-        * @var string
-        */
-       protected $password;
-       /**
-        * API Signature
-        * @var string
-        */
-       protected $signature;
-
-       /**
-        * Application Id that uniquely identifies an application that uses the
-        * Platform APIs - Not required for Express Checkout / MassPay / DCC etc
-        * Application Ids are issued by PayPal.
-        * Test application Ids are available for the sandbox environment
-        * @var string
-        */
-       protected $applicationId;
-
-       public function __construct($userName, $password, $signature) {
-               $this->userName = trim($userName);
-               $this->password = trim($password);
-               $this->signature = trim($signature);
-               $this->validate();
-       }
-
-       public function validate() {
-
-               if (empty($this->userName)) {
-                       throw new PPMissingCredentialException("username cannot be empty");
-               }
-               if (empty($this->password)) {
-                       throw new PPMissingCredentialException("password cannot be empty");
-               }
-               // Signature can be empty if using 3-rd party auth tokens from permissions API
-       }
-
-       public function getUserName() {
-               return $this->userName;
-       }
-       public function getPassword() {
-               return $this->password;
-       }
-       public function getSignature() {
-               return $this->signature;
-       }
-
-       public function setApplicationId($applicationId) {
-               $this->applicationId = trim($applicationId);
-       }
-       public function getApplicationId() {
-               return $this->applicationId;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPSubjectAuthorization.php
deleted file mode 100644 (file)
index 27f1f8f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-namespace PayPal\Auth;
-/**
- *
- * Represents the older subject based "third party authorization"
- * New apps can use the more flexible token based authorization
- */
-class PPSubjectAuthorization implements IPPThirdPartyAuthorization {
-
-       /**
-        * Paypal emailid of the party who has granted API rights
-        * to the API caller. Your API username must have been 
-        * granted permission by this third-party to make any particular 
-        * PayPal API request.
-        * @var string
-        */
-       private $subject;
-       
-       public function __construct($subject) {
-               $this->subject = $subject;
-       }
-       
-       public function getSubject() {
-               return $this->subject;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Auth/PPTokenAuthorization.php
deleted file mode 100644 (file)
index d9a80e7..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace PayPal\Auth;
-use PayPal\Auth\IPPThirdPartyAuthorization;
-/**
- *
- * Represents token based third party authorization
- * Token based authorization credentials are obtained using
- * the Permissions API
- */
-class PPTokenAuthorization implements IPPThirdPartyAuthorization {
-       
-       /**
-        * Permanent access token that identifies the relationship 
-        * between the authorizing user and the API caller.
-        * @var string
-        */
-       private $accessToken;
-       
-       /**
-        * The token secret/password that will need to be used when 
-        * generating the signature.
-        * @var string
-        */
-       private $tokenSecret;
-       
-       public function __construct($accessToken, $tokenSecret) {
-               $this->accessToken = $accessToken;
-               $this->tokenSecret = $tokenSecret;
-       }
-       
-       public function getAccessToken() {
-               return $this->accessToken;
-       }
-       
-       public function getTokenSecret() {
-               return $this->tokenSecret;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPApiContext.php
deleted file mode 100644 (file)
index 5affd24..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-namespace PayPal\Common;
-use PayPal\Core\PPConfigManager;
-/**
- * 
- * Container for Call level parameters such as
- * SDK configuration 
- */
-class PPApiContext {
-       
-       /**
-        * 
-        * @var array Dynamic SDK configuration
-        */
-       protected $config;
-       
-       public function setConfig($config) {
-               $this->config = $config;
-       }
-       
-       public function getConfig() {
-               if(!isset($this->config)) {
-                       $this->config = PPConfigManager::getInstance()->getConfigHashmap();
-               }
-               return $this->config;
-       }
-       
-       public function __construct($config=null) {
-               if(!is_null($config)) {
-                       $this->config = $config;
-               }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPArrayUtil.php
deleted file mode 100644 (file)
index a93fe19..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-namespace PayPal\Common;
-class PPArrayUtil {
-       
-       /**
-        * 
-        * @param array $arr
-        * @return true if $arr is an associative array
-        */
-       public static function isAssocArray(array $arr) {
-               foreach($arr as $k => $v) {
-                       if(is_int($k)) {
-                               return false;
-                       }
-               }
-               return true;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPModel.php
deleted file mode 100644 (file)
index ec4ae90..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php 
-namespace PayPal\Common;
-
-/**
- * Generic Model class that all API domain classes extend
- * Stores all member data in a hashmap that enables easy 
- * JSON encoding/decoding
- */
-class PPModel {
-
-       private $_propMap = array();    
-               
-       public function __get($key) {
-               return $this->_propMap[$key];
-       }
-       
-       public function __set($key, $value) {
-               $this->_propMap[$key] = $value;
-       }
-       
-       public function __isset($key) {
-               return isset($this->_propMap[$key]);
-       }
-       
-       public function __unset($key) {
-               unset($this->_propMap[$key]);
-       }
-       
-       
-       private function _convertToArray($param) {
-               $ret = array();         
-               foreach($param as $k => $v) {
-                       if($v instanceof PPModel ) {                            
-                               $ret[$k] = $v->toArray();
-                       } else if (is_array($v)) {
-                               $ret[$k] = $this->_convertToArray($v);
-                       } else {
-                               $ret[$k] = $v;
-                       }
-               }
-               return $ret;
-       }
-       
-       public function fromArray($arr) {
-               
-               foreach($arr as $k => $v) {
-                       if(is_array($v)) {
-                               $clazz = PPReflectionUtil::getPropertyClass(get_class($this), $k);
-                               
-                               if(PPArrayUtil::isAssocArray($v)) {
-                                       $o = new $clazz();
-                                       $o->fromArray($v);
-                                       $this->__set($k, $o);
-                               } else {
-                                       $arr =  array();                
-                                       foreach($v as $nk => $nv) {
-                                               if(is_array($nv)) {
-                                                       $o = new $clazz();
-                                                       $o->fromArray($nv);
-                                                       $arr[$nk] = $o;
-                                               } else {
-                                                       $arr[$nk] = $nv;
-                                               }
-                                       }
-                                       $this->__set($k, $arr);
-                               } 
-                       }else {
-                               $this->$k = $v;
-                       }
-               }
-       }
-       
-       public function fromJson($json) {
-               $this->fromArray(json_decode($json, true));
-       }
-       
-       public function toArray() {             
-               return $this->_convertToArray($this->_propMap);
-       }
-       
-       public function toJSON() {              
-               return json_encode($this->toArray());
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPReflectionUtil.php
deleted file mode 100644 (file)
index 83bfd8f..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-namespace PayPal\Common;
-class PPReflectionUtil {
-       
-       
-       /**
-        * @var array|ReflectionMethod[]
-        */
-       private static $propertiesRefl = array();
-       
-       /**
-        * @var array|string[]
-        */
-       private static $propertiesType = array();
-       
-       
-       /**
-        * 
-        * @param string $class
-        * @param string $propertyName
-        */
-       public static function getPropertyClass($class, $propertyName) {
-               
-               if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['return'])) {               
-//                     if (substr($annotations['param'], -2) === '[]') {
-//                             $param = substr($annotations['param'], 0, -2);
-//                     }
-                       $param = $annotations['return'];
-               }
-               
-               if(isset($param)) {
-                       $anno = explode(' ', $param);
-                       return $anno[0];
-               } else {
-                       return 'string';
-               }
-       }
-       
-       
-       /**
-        * @param string $class
-        * @param string $propertyName
-        * @throws RuntimeException
-        * @return string
-        */
-       public static function propertyAnnotations($class, $propertyName)
-       {
-               $class = is_object($class) ? get_class($class) : $class;
-               if (!class_exists('ReflectionProperty')) {
-                       throw new \RuntimeException("Property type of " . $class . "::{$propertyName} cannot be resolved");
-               }
-       
-               if ($annotations =& self::$propertiesType[$class][$propertyName]) {
-                       return $annotations;
-               }
-               
-               if (!($refl =& self::$propertiesRefl[$class][$propertyName])) {
-                       $getter = method_exists($class, "get" . ucfirst($propertyName)) ? "get". ucfirst($propertyName)
-                               : "get". preg_replace("/([_-\s]?([a-z0-9]+))/e", "ucwords('\\2')", $propertyName);
-                       $refl = new \ReflectionMethod($class, $getter);
-                       self::$propertiesRefl[$class][$propertyName] = $refl;
-               }
-       
-               // todo: smarter regexp
-               if (!preg_match_all('~\@([^\s@\(]+)[\t ]*(?:\(?([^\n@]+)\)?)?~i', $refl->getDocComment(), $annots, PREG_PATTERN_ORDER)) {
-                       return NULL;
-               }
-               foreach ($annots[1] as $i => $annot) {
-                       $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
-               }
-       
-               return $annotations;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Common/PPUserAgent.php
deleted file mode 100644 (file)
index 551c93b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-namespace PayPal\Common;
-class PPUserAgent {
-
-       /**
-        * Returns the value of the User-Agent header
-        * Add environment values and php version numbers
-        * @param string $sdkName
-        * @param string $sdkVersion
-        */
-       public static function getValue($sdkName, $sdkVersion) {
-               
-               $featureList = array(
-                       'lang=PHP',
-                       'v=' . PHP_VERSION,
-                       'bit=' . self::_getPHPBit(),
-                       'os=' . str_replace(' ' , '_', php_uname('s') . ' ' . php_uname('r')),
-                       'machine=' . php_uname('m')
-               );
-               if(defined('OPENSSL_VERSION_TEXT')) {
-                       $opensslVersion = explode(' ', OPENSSL_VERSION_TEXT);
-                       $featureList[] = 'openssl='. $opensslVersion[1];
-               }
-               if(function_exists('curl_version')) {
-                       $curlVersion = curl_version();
-                       $featureList[] = 'curl=' . $curlVersion['version'];
-               }
-               return sprintf("PayPalSDK/%s %s (%s)", $sdkName, $sdkVersion, implode(';', $featureList));
-       }
-       
-       private static function _getPHPBit() {
-               switch(PHP_INT_SIZE) {
-                       case 4:
-                               return '32';
-                       case 8:
-                               return '64';
-                       default:
-                               return PHP_INT_SIZE;
-               }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPAPIService.php
deleted file mode 100644 (file)
index 876b408..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPLoggingManager;
-use PayPal\Formatter\FormatterFactory;
-use PayPal\Core\PPRequest;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Handler\PPAuthenticationHandler;
-use PayPal\Auth\PPTokenAuthorization;
-
-class PPAPIService {
-
-       public $endpoint;
-       public $config;
-       public $options = array();
-       public $serviceName;
-       private $logger;
-       private $handlers = array();
-       private $serviceBinding;
-       private $port;
-       private $apiMethod;
-       public function __construct($port, $serviceName, $serviceBinding, $handlers=array(), $config) {
-               
-               $this->config = $config;
-               $this->serviceName = $serviceName;
-               $this->port = $port;
-
-               $this->logger = new PPLoggingManager(__CLASS__, $this->config);
-               $this->handlers = $handlers;
-               $this->serviceBinding = $serviceBinding;
-               
-       }
-
-       public function setServiceName($serviceName) {
-               $this->serviceName = $serviceName;
-       }
-
-       public function addHandler($handler) {
-               $this->handlers[] = $handler;
-       }
-
-       public function makeRequest($apiMethod, $params, $apiUsername = null) {
-               
-               $this->apiMethod = $apiMethod;
-               if(is_string($apiUsername) || is_null($apiUsername)) {
-                       // $apiUsername is optional, if null the default account in config file is taken
-                       $credMgr = PPCredentialManager::getInstance($this->config);
-                       $apiCredential = clone($credMgr->getCredentialObject($apiUsername ));
-               } else {
-                       $apiCredential = $apiUsername; //TODO: Aargh
-               }
-           if((isset($this->config['accessToken']) && isset($this->config['tokenSecret']))) {
-                       $apiCredential->setThirdPartyAuthorization(
-                                       new PPTokenAuthorization($this->config['accessToken'], $this->config['tokenSecret']));
-               }
-
-
-               $request = new PPRequest($params, $this->serviceBinding);
-               $request->setCredential($apiCredential);
-               $httpConfig = new PPHttpConfig(null, PPHttpConfig::HTTP_POST);
-               $this->runHandlers($httpConfig, $request);
-
-               $formatter = FormatterFactory::factory($this->serviceBinding);
-               $payload = $formatter->toString($request);
-               $connection = PPConnectionManager::getInstance()->getConnection($httpConfig, $this->config);
-               $this->logger->info("Request: $payload");
-               $response = $connection->execute($payload);
-               $this->logger->info("Response: $response");
-
-               return array('request' => $payload, 'response' => $response);
-       }
-
-       private function runHandlers($httpConfig, $request) {
-       
-               $this->getOptions();
-               
-               foreach($this->handlers as $handlerClass) {
-                       $handler = new $handlerClass();
-                       $handler->handle($httpConfig, $request, $this->options);
-               }
-               $handler = new PPAuthenticationHandler();
-               $handler->handle($httpConfig, $request, $this->options);
-       }
-       
-       private function getOptions()
-       {
-               $this->options['port'] = $this->port;
-               $this->options['serviceName'] = $this->serviceName;
-               $this->options['serviceBinding'] = $this->serviceBinding;
-               $this->options['config'] = $this->config;
-               $this->options['apiMethod'] = $this->apiMethod;
-       }       
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPBaseService.php
deleted file mode 100644 (file)
index fc6de3f..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPAPIService;
-class PPBaseService {
-
-    // SDK Name
-       protected  static $SDK_NAME = "paypal-php-sdk";
-       // SDK Version
-       protected static $SDK_VERSION = "2.1.96";
-       
-       private $serviceName;
-       private $serviceBinding;
-       private $handlers;
-       
-   /*
-    * Setters and getters for Third party authentication (Permission Services)
-    */
-       protected $accessToken;
-       protected $tokenSecret;
-       
-       protected $lastRequest;
-       protected $lastResponse;
-       
-       
-       
-       // config hash map
-       public $config;
-
-       /**
-        * Compute the value that needs to sent for the PAYPAL_REQUEST_SOURCE
-        * parameter when making API calls
-        */
-       public static function getRequestSource()
-       {
-               return str_replace(" ", "-", self::$SDK_NAME) . "-" . self::$SDK_VERSION;
-       }
-       
-
-    public function getLastRequest() {
-               return $this->lastRequest;
-       }
-    public function setLastRequest($lastRqst) {
-               $this->lastRequest = $lastRqst;
-       }
-    public function getLastResponse() {
-               return $this->lastResponse;
-       }
-    public function setLastResponse($lastRspns) {
-               $this->lastResponse = $lastRspns;
-       }
-
-       public function __construct($serviceName, $serviceBinding, $handlers=array(), $config = null) {
-               $this->serviceName = $serviceName;
-               $this->serviceBinding = $serviceBinding;
-               $this->handlers = $handlers;
-               if($config == null)
-               {
-                       $configFile = PPConfigManager::getInstance();
-                       $this->config = $configFile->getConfigHashmap();
-               }
-               else 
-               {
-                       $this->config = PPConfigManager::mergrDefaults($config);
-               }
-       }
-
-       public function getServiceName() {
-               return $this->serviceName;
-       }
-
-       /**
-        * 
-        * @param string $method - API method to call
-        * @param object $requestObject Request object 
-        * @param mixed $apiCredential - Optional API credential - can either be
-        *              a username configured in sdk_config.ini or a ICredential object
-        *      created dynamically             
-        */
-       public function call($port, $method, $requestObject, $apiUserName = NULL) {             
-               $service = new PPAPIService($port, $this->serviceName, 
-                               $this->serviceBinding, $this->handlers,$this->config);          
-               $ret = $service->makeRequest($method, $requestObject, $apiUserName);
-               $this->lastRequest = $ret['request'];
-               $this->lastResponse = $ret['response'];
-               return $this->lastResponse;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConfigManager.php
deleted file mode 100644 (file)
index f03560e..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPConfigManager;
-use PayPal\Exception\PPConfigurationException;
-/**
- * PPConfigManager loads the SDK configuration file and
- * hands out appropriate config params to other classes
- */
-
-
-class PPConfigManager {
-
-       public $config;
-       /**
-        * @var PPConfigManager
-        */
-       
-       //default config values
-       public static $defaults = array(
-               "http.ConnectionTimeOut" => "30",
-               "http.Retry" => "5",
-       );
-       
-       private static $instance;
-
-       private function __construct(){
-               if(defined('PP_CONFIG_PATH')) {
-                       $configFile = constant('PP_CONFIG_PATH') . '/sdk_config.ini';
-               } else {                
-                       $configFile = implode(DIRECTORY_SEPARATOR,
-                               array(dirname(__FILE__), "..", "config", "sdk_config.ini"));
-               }
-               $this->load($configFile);
-       }
-
-       // create singleton object for PPConfigManager
-       public static function getInstance()
-       {
-               if ( !isset(self::$instance) ) {
-                       self::$instance = new PPConfigManager();
-               }
-               return self::$instance;
-       }
-
-       //used to load the file
-       private function load($fileName) {
-
-               $this->config = @parse_ini_file($fileName);
-               if($this->config == NULL || count($this->config) == 0) {
-                       throw new PPConfigurationException("Config file $fileName not found","303");
-               }
-       }
-
-       /**
-        * simple getter for configuration params
-        * If an exact match for key is not found,
-        * does a "contains" search on the key
-        */
-       public function get($searchKey){
-
-               if(array_key_exists($searchKey, $this->config))
-               {
-                       return $this->config[$searchKey];
-               }
-               else {
-                       $arr = array();
-                       foreach ($this->config as $k => $v){
-                               if(strstr($k, $searchKey)){
-                                       $arr[$k] = $v;
-                               }
-                       }
-                       
-                       return $arr;
-               }
-
-       }
-
-       /**
-        * Utility method for handling account configuration
-        * return config key corresponding to the API userId passed in
-        *
-        * If $userId is null, returns config keys corresponding to
-        * all configured accounts
-        */
-       public function getIniPrefix($userId = null) {
-
-               if($userId == null) {
-                       $arr = array();
-                       foreach ($this->config as $key => $value) {
-                               $pos = strpos($key, '.');
-                               if(strstr($key, "acct")){
-                                       $arr[] = substr($key, 0, $pos);
-                               }
-                       }
-                       return array_unique($arr);
-               } else {
-                       $iniPrefix = array_search($userId, $this->config);
-                       $pos = strpos($iniPrefix, '.');
-                       $acct = substr($iniPrefix, 0, $pos);
-                       
-                       return $acct;
-               }
-       }
-       
-       /**
-        * returns the config file hashmap
-        * 
-        */
-       public function getConfigHashmap()
-       {
-               return $this->config;
-       }
-       
-       /**
-        * use  the default configuration if it is not passed in hashmap
-        */
-       public static function mergrDefaults($config)
-       {
-               return array_merge(PPConfigManager::$defaults, $config);
-       }
-}
-
-    
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConnectionManager.php
deleted file mode 100644 (file)
index 0b4a93c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPConnectionManager;
-use PayPal\Core\PPHttpConnection;
-class PPConnectionManager
-{
-       /**
-        * reference to singleton instance
-        * @var PPConnectionManager
-        */
-       private static $instance;
-
-       private function __construct()
-       {
-       }
-
-       public static function getInstance() {
-               if( self::$instance == null ) {
-                       self::$instance = new PPConnectionManager();
-               }
-               return self::$instance;
-       }
-
-       /**
-        * This function returns a new PPHttpConnection object
-        */
-       public function getConnection($httpConfig, $config) {
-               if(isset( $config["http.ConnectionTimeOut"] )) {
-                       $httpConfig->setHttpTimeout( $config["http.ConnectionTimeOut"] );
-               }
-               if(isset( $config["http.Proxy"] )) {
-                       $httpConfig->setHttpProxy($config["http.Proxy"] );
-               }
-               if(isset( $config["http.Retry"] )) {
-                       $retry =  $config["http.Retry"];
-                       $httpConfig->setHttpRetryCount($retry ) ;
-               }
-               
-               return new PPHttpConnection($httpConfig, $config);
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPConstants.php
deleted file mode 100644 (file)
index da09c92..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-namespace PayPal\Core;
-class PPConstants
-{
-    const MERCHANT_SANDBOX_SIGNATURE_ENDPOINT = "https://api-3t.sandbox.paypal.com/2.0";
-    const MERCHANT_SANDBOX_CERT_ENDPOINT = "https://api.sandbox.paypal.com/2.0";
-    const PLATFORM_SANDBOX_ENDPOINT = "https://svcs.sandbox.paypal.com/";
-    const REST_SANDBOX_ENDPOINT = "https://api.sandbox.paypal.com/";
-    const IPN_SANDBOX_ENDPOINT = "https://www.sandbox.paypal.com/cgi-bin/webscr";
-    const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect";
-
-    const MERCHANT_LIVE_SIGNATURE_ENDPOINT = "https://api-3t.paypal.com/2.0";
-    const MERCHANT_LIVE_CERT_ENDPOINT = "https://api.paypal.com/2.0";
-    const PLATFORM_LIVE_ENDPOINT = "https://svcs.paypal.com/";
-    const REST_LIVE_ENDPOINT = "https://api.paypal.com/";
-    const IPN_LIVE_ENDPOINT = "https://ipnpb.paypal.com/cgi-bin/webscr";
-    const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com/webapps/auth/protocol/openidconnect";
-}
-
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPCredentialManager.php
deleted file mode 100644 (file)
index c9b1a43..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPCredentialManager;
-use PayPal\Auth\PPSignatureCredential;
-use PayPal\Auth\PPCertificateCredential;
-use PayPal\Auth\PPSubjectAuthorization;
-use PayPal\Exception\PPInvalidCredentialException;
-use PayPal\Exception\PPMissingCredentialException;
-
-class PPCredentialManager
-{
-       private static $instance;
-       //hashmap to contain credentials for accounts.
-       private $credentialHashmap = array();
-       /**
-        * Contains the API username of the default account to use
-        * when authenticating API calls.
-        * @var string
-        */
-       private $defaultAccountName;
-       
-       /*
-        * Constructor initialize credential for multiple accounts specified in property file.
-        */
-       private function __construct($config){
-               try {
-                       $this->initCredential($config);
-               } catch (Exception $e) {
-                       $this->credentialHashmap = array();
-                       throw $e;
-               }               
-       }
-       
-       /*
-        * Create singleton instance for this class.
-        */
-       public static function getInstance($config)
-       {
-               
-                       return self::$instance = new PPCredentialManager($config);
-               
-       }
-       
-       /*
-        * Load credentials for multiple accounts, with priority given to Signature credential. 
-        */
-       private function initCredential($config){
-       //      $configMgr = PPConfigManager::getInstance();
-               $suffix = 1;
-               $prefix = "acct";
-
-       //      $credArr = $configMgr->get($prefix);
-       //      $arrayPartKeys = $configMgr->getIniPrefix();
-               
-               if(array_key_exists($prefix, $config))
-               {
-                       $credArr =  $this->config[$searchKey];
-               }
-               else {
-                       $arr = array();
-                       foreach ($config as $k => $v){
-                               if(strstr($k, $prefix)){
-                                       $arr[$k] = $v;
-                               }
-                       }
-                               
-                       $credArr =  $arr;
-               }
-               
-               $arr = array();
-               foreach ($config as $key => $value) {
-                       $pos = strpos($key, '.');
-                       if(strstr($key, "acct")){
-                               $arr[] = substr($key, 0, $pos);
-                       }
-               }
-               $arrayPartKeys =  array_unique($arr);
-               
-               if(count($arrayPartKeys) == 0)
-                       throw new PPMissingCredentialException("No valid API accounts have been configured");
-
-               $key = $prefix.$suffix;
-               while (in_array($key, $arrayPartKeys)){
-                                                       
-                       if(isset($credArr[$key.".Signature"]) 
-                                       && $credArr[$key.".Signature"] != null && $credArr[$key.".Signature"] != ""){
-                                       
-                               $userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
-                               $password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
-                               $signature = isset($credArr[$key.'.Signature']) ? $credArr[$key.'.Signature'] : "";
-                               
-                               $this->credentialHashmap[$userName] = new PPSignatureCredential($userName, $password, $signature);
-                               if (isset($credArr[$key.'.AppId'])) {                           
-                                       $this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
-                               }
-                               
-                       } elseif (isset($credArr[$key.".CertPath"]) 
-                                       && $credArr[$key.".CertPath"] != null && $credArr[$key.".CertPath"] != ""){
-                                               
-                               $userName = isset($credArr[$key.'.UserName']) ? $credArr[$key.'.UserName'] : "";
-                               $password = isset($credArr[$key.'.Password']) ? $credArr[$key.'.Password'] : "";
-                               $certPassPhrase = isset($credArr[$key.'.CertKey']) ? $credArr[$key.'.CertKey'] : "";    
-                               $certPath = isset($credArr[$key.'.CertPath']) ? $credArr[$key.'.CertPath'] : "";                                
-                               
-                               $this->credentialHashmap[$userName] = new PPCertificateCredential($userName, $password, $certPath, $certPassPhrase);
-                               if (isset($credArr[$key.'.AppId'])) {
-                                       $this->credentialHashmap[$userName]->setApplicationId($credArr[$key.'.AppId']);
-                               }                               
-                       } elseif (isset($credArr[$key.".ClientId"]) && isset($credArr[$key.".ClientId"]) ){
-                               $userName = $key;
-                               $this->credentialHashmap[$userName] = array('clientId' => $credArr[$key.".ClientId"], 
-                                               'clientSecret' => $credArr[$key.".ClientSecret"]);
-                       }
-                       if($userName && isset($credArr[$key . ".Subject"]) && trim($credArr[$key . ".Subject"]) != "" ) {
-                               $this->credentialHashmap[$userName]->setThirdPartyAuthorization(
-                                               new PPSubjectAuthorization($credArr[$key . ".Subject"]));
-                       }
-                       
-                       if ($userName && $this->defaultAccountName == null) {
-                               if(array_key_exists($key. '.UserName', $credArr)) {
-                                       $this->defaultAccountName = $credArr[$key . '.UserName'];
-                               } else {
-                                       $this->defaultAccountName = $key;
-                               }
-                       }
-                       $suffix++;
-                       $key = $prefix.$suffix;
-               }
-
-       }
-
-       /*
-        * Obtain Credential Object based on UserId provided.
-        */
-       public function getCredentialObject($userId = null){
-               
-               if($userId == null) {                   
-                       $credObj = $this->credentialHashmap[$this->defaultAccountName];
-               } else if (array_key_exists($userId, $this->credentialHashmap)) {
-                       $credObj = $this->credentialHashmap[$userId];
-               }
-                       
-               if (empty($credObj)) {
-                       throw new PPInvalidCredentialException("Invalid userId $userId");
-               }
-               return $credObj;
-       }
-       
-       
-       public function __clone()
-       {
-               trigger_error('Clone is not allowed.', E_USER_ERROR);
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConfig.php
deleted file mode 100644 (file)
index a8523bc..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Exception\PPConfigurationException;
-class PPHttpConfig {
-
-       /**
-        * Some default options for curl
-        * These are typically overridden by PPConnectionManager
-        */
-       public static $DEFAULT_CURL_OPTS = array(
-               CURLOPT_SSLVERSION => 3,
-               CURLOPT_CONNECTTIMEOUT => 10,
-               CURLOPT_RETURNTRANSFER => TRUE,
-               CURLOPT_TIMEOUT        => 60,   // maximum number of seconds to allow cURL functions to execute
-               CURLOPT_USERAGENT      => 'PayPal-PHP-SDK',
-               CURLOPT_HTTPHEADER     => array(),
-               CURLOPT_SSL_VERIFYHOST => 2,
-               CURLOPT_SSL_VERIFYPEER => 1
-       );      
-       
-       const HEADER_SEPARATOR = ';';   
-       const HTTP_GET = 'GET';
-       const HTTP_POST = 'POST';
-
-       private $headers = array();
-
-       private $curlOptions;
-
-       private $url;
-
-       private $method;
-       /***
-        * Number of times to retry a failed HTTP call
-        */
-       private $retryCount;
-
-       /**
-        * 
-        * @param string $url
-        * @param string $method  HTTP method (GET, POST etc) defaults to POST
-        */
-       public function __construct($url=null, $method=self::HTTP_POST) {
-               $this->url = $url;
-               $this->method = $method;
-               $this->curlOptions = self::$DEFAULT_CURL_OPTS;
-       }
-       
-       public function getUrl() {
-               return $this->url;
-       }
-       
-       public function getMethod() {
-               return $this->method;
-       }
-       
-       public function getHeaders() {
-               return $this->headers;
-       }
-       
-       public function getHeader($name) {
-               if(array_key_exists($name, $this->headers)) {
-                       return $this->headers[$name];
-               }
-               return NULL;
-       }
-
-       public function setUrl($url) {
-               $this->url = $url;
-       }
-       
-       public function setHeaders(array $headers) {
-               $this->headers = $headers;
-       }
-
-       public function addHeader($name, $value, $overWrite=true) {
-               if(!array_key_exists($name, $this->headers) || $overWrite) {
-                       $this->headers[$name] = $value;
-               } else {
-                       $this->headers[$name] = $this->headers[$name] . HEADER_SEPARATOR . $value;                      
-               }
-       }
-       
-       public function removeHeader($name) {
-               unset($this->headers[$name]);
-       }
-
-       
-       
-       public function getCurlOptions() {
-               return $this->curlOptions;
-       }
-
-       public function addCurlOption($name, $value) {
-               $this->curlOptions[$name] = $value;
-       }
-
-       public function setCurlOptions($options) {
-               $this->curlOptions = $options;
-       }
-
-       
-
-       /**
-        * Set ssl parameters for certificate based client authentication
-        *
-        * @param string $certPath - path to client certificate file (PEM formatted file)
-        */
-       public function setSSLCert($certPath, $passPhrase=NULL) {               
-               $this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath);
-               if(isset($passPhrase) && trim($passPhrase) != "") {
-                       $this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase;
-               }
-       }
-
-       /**
-        * Set connection timeout in seconds
-        * @param integer $timeout
-        */
-       public function setHttpTimeout($timeout) {
-               $this->curlOptions[CURLOPT_CONNECTTIMEOUT] = $timeout;
-       }
-
-       /**
-        * Set HTTP proxy information
-        * @param string $proxy
-        * @throws PPConfigurationException
-        */
-       public function setHttpProxy($proxy) {
-               $urlParts = parse_url($proxy);
-               if($urlParts == false || !array_key_exists("host", $urlParts))
-                       throw new PPConfigurationException("Invalid proxy configuration ".$proxy);
-
-               $this->curlOptions[CURLOPT_PROXY] = $urlParts["host"];
-               if(isset($urlParts["port"]))
-                       $this->curlOptions[CURLOPT_PROXY] .=  ":" . $urlParts["port"];
-               if(isset($urlParts["user"]))
-                       $this->curlOptions[URLOPT_PROXYUSERPWD] = $urlParts["user"] . ":" . $urlParts["pass"];
-       }       
-       
-       /**
-        * @param integer $retry
-        */
-       public function setHttpRetryCount($retryCount) {
-               $this->retryCount = $retryCount;
-       }       
-
-       public function getHttpRetryCount() {
-               return $this->retryCount;
-       }
-       
-       /**
-        * Sets the User-Agent string on the HTTP request
-        * @param string $userAgentString
-        */
-       public function setUserAgent($userAgentString) {
-               $this->curlOptions[CURLOPT_USERAGENT] = $userAgentString;
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPHttpConnection.php
deleted file mode 100644 (file)
index 2c39520..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPLoggingManager;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Exception\PPConnectionException;
-
-/**
- * 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
-{
-
-       private $httpConfig;
-
-       /**
-        * HTTP status codes for which a retry must be attempted
-        */
-       private static $retryCodes = array('401', '403', '404', );
-
-       private $logger;
-
-       public function __construct($httpConfig, $config)
-       {
-               if( !function_exists("curl_init") ) {
-                       throw new PPConfigurationException("Curl module is not available on this system");
-               }
-               $this->httpConfig = $httpConfig;
-               $this->logger = new PPLoggingManager(__CLASS__, $config);
-       }       
-
-       private function getHttpHeaders() {
-               
-               $ret = array();
-               foreach($this->httpConfig->getHeaders() as $k=>$v) {
-                       $ret[] = "$k: $v";
-               }
-               return $ret;
-       }
-       
-       /**
-        * Executes an HTTP request
-        *
-        * @param string $data query string OR POST content as a string
-        * @throws PPConnectionException
-        */
-       public function execute($data) {
-               $this->logger->fine("Connecting to " . $this->httpConfig->getUrl());                    
-               $this->logger->fine("Payload " . $data);
-
-               $ch = curl_init($this->httpConfig->getUrl());
-               curl_setopt_array($ch, $this->httpConfig->getCurlOptions());            
-               curl_setopt($ch, CURLOPT_URL, $this->httpConfig->getUrl());             
-               curl_setopt($ch, CURLOPT_HEADER, false);
-               curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeaders());
-               
-               switch($this->httpConfig->getMethod()) {
-                       case 'POST':
-                               curl_setopt($ch, CURLOPT_POST, true);
-                               curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
-                               break;
-               }
-               if($this->httpConfig->getMethod() != NULL) {
-                       curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->httpConfig->getMethod());
-               }
-               foreach($this->getHttpHeaders() as $header) {
-                       //TODO: Strip out credentials and other secure info when logging.
-                       $this->logger->info("Adding header $header");
-               }
-               $result = curl_exec($ch);
-               if ((curl_errno($ch) == 60) && ($this->httpConfig->getMethod() != "DELETE")) {
-                       $this->logger->info("Invalid or no certificate authority found - Retrying using bundled CA certs file");
-                       curl_setopt($ch, CURLOPT_CAINFO,
-                       dirname(__FILE__) . '/cacert.pem');
-                       $result = curl_exec($ch);
-               }
-               $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
-               $retries = 0;
-               if(in_array($httpStatus, self::$retryCodes) && $this->httpConfig->getHttpRetryCount() != null) {
-                       $this->logger->info("Got $httpStatus response from server. Retrying");
-
-                       do      {
-                               $result = curl_exec($ch);
-                               $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);
-                       } while (in_array($httpStatus, self::$retryCodes) && (++$retries < $this->httpConfig->getHttpRetryCount()) );
-               }
-               if ( curl_errno($ch) ) {
-                       $ex = new PPConnectionException($this->httpConfig->getUrl(), curl_error($ch), curl_errno($ch));
-                       curl_close($ch);
-                       throw $ex;
-               }
-
-               curl_close($ch);
-
-               if(in_array($httpStatus, self::$retryCodes)) {
-                       $ex = new PPConnectionException($this->httpConfig->getUrl() , 
-                                       "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}. Retried $retries times.");
-                       $ex->setData($result);
-                       throw $ex;
-               } else if($httpStatus < 200 || $httpStatus >=300) {
-                       $ex = new PPConnectionException($this->httpConfig->getUrl() , 
-                                       "Got Http response code $httpStatus when accessing {$this->httpConfig->getUrl()}.");
-                       $ex->setData($result);
-                       throw $ex;
-               }
-               return $result;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPLoggingManager.php
deleted file mode 100644 (file)
index cc817e3..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-namespace PayPal\Core;
-/**
- * Simple Logging Manager.
- * This does an error_log for now
- * Potential frameworks to use are PEAR logger, log4php from Apache
- */
-
-class PPLoggingLevel {
-
-       // FINE Logging Level
-       const FINE = 3;
-
-       // INFO Logging Level
-       const INFO = 2;
-
-       // WARN Logging Level
-       const WARN = 1;
-
-       // ERROR Logging Level
-       const ERROR = 0;
-}
-
-class PPLoggingManager {
-
-       // Default Logging Level
-       const DEFAULT_LOGGING_LEVEL = 0;
-
-       // Logger name
-       private $loggerName;
-
-       // Log enabled
-       private $isLoggingEnabled;
-
-       // Configured logging level
-       private $loggingLevel;
-
-       // Configured logging file
-       private $loggerFile;
-
-       public function __construct($loggerName, $config = null) {
-               $this->loggerName = $loggerName;
-               if($config == null) {
-                       $config = PPConfigManager::getInstance()->getConfigHashmap();
-               }               
-               $this->isLoggingEnabled = (array_key_exists('log.LogEnabled', $config) && $config['log.LogEnabled'] == '1');            
-                
-               if($this->isLoggingEnabled) {
-                       $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;
-               }
-       }
-
-       private function log($message, $level=PPLoggingLevel::INFO) {
-               if($this->isLoggingEnabled && ($level <= $this->loggingLevel)) {
-                       error_log( $this->loggerName . ": $message\n", 3, $this->loggerFile);
-               }
-       }
-
-       public function error($message) {
-               $this->log($message, PPLoggingLevel::ERROR);
-       }
-
-       public function warning($message) {
-               $this->log($message, PPLoggingLevel::WARN);
-       }
-
-       public function info($message) {
-               $this->log($message, PPLoggingLevel::INFO);
-       }
-
-       public function fine($message) {
-               $this->log($message, PPLoggingLevel::FINE);
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPMessage.php
deleted file mode 100644 (file)
index 82be10a..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-namespace PayPal\Core;
-use PayPal\Core\PPUtils;
-/**
- * @author 
- */
-abstract class PPMessage
-{
-
-       /**
-        * @param string $prefix
-        * @return string
-        */
-       public function toNVPString($prefix = '')
-       {
-               $nvp = array();
-               foreach (get_object_vars($this) as $property => $defaultValue) {
-                       
-                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
-                               continue;
-                       }
-
-                       if (is_object($propertyValue)) {
-                               $nvp[] = $propertyValue->toNVPString($prefix . $property . '.'); // prefix
-
-                       } elseif (is_array($defaultValue) || is_array($propertyValue)) {
-                               foreach (array_values($propertyValue) as $i => $item) {
-                                       if (!is_object($item)){
-                        $nvp[] = $prefix . $property . "($i)" . '=' . urlencode($item);
-                                       }else{
-                        $nvp[] = $item->toNVPString($prefix . $property . "($i).");
-                    }
-                               }
-
-                       } else {
-                               // Handle classes with attributes
-                               if($property == 'value' && ($anno = PPUtils::propertyAnnotations($this, $property)) != NULL && isset($anno['value']) ) {
-                                       $nvpKey = substr($prefix, 0, -1); // Remove the ending '.'
-                               } else {
-                                       $nvpKey = $prefix . $property ;
-                               }
-                               $nvp[] = $nvpKey . '=' . urlencode($propertyValue);
-                       }
-               }
-
-               return implode('&', $nvp);
-       }
-
-
-
-       /**
-        * @param array $map
-        * @param string $prefix
-        */
-       public function init(array $map = array(), $prefix = '')
-       {
-               if (empty($map)) {
-                       return;
-               }
-
-               $map = PPUtils::lowerKeys($map);
-
-               foreach (get_object_vars($this) as $property => $defaultValue) {
-                       if (array_key_exists($propKey = strtolower($prefix . $property), $map) &&
-                                       $this->isBuiltInType(($type = PPUtils::propertyType($this, $property)))){
-                               $type = PPUtils::propertyType($this, $property);                                
-                               $this->{$property} = urldecode($map[$propKey]);
-                               continue; // string
-
-                       } elseif (!$filtered = PPUtils::filterKeyPrefix($map, $propKey)) {
-                               continue; // NULL
-                       }
-               
-                       if (!class_exists($type = PPUtils::propertyType($this, $property)) && !$this->isBuiltInType($type)) {
-                               trigger_error("Class $type not found.", E_USER_NOTICE);
-                               continue; // just ignore
-                       }
-
-                       if (is_array($defaultValue) || PPUtils::isPropertyArray($this, $property)) { // array of objects                                
-                               if($this->isBuiltInType($type)) { // Array of simple types                                      
-                                       foreach($filtered as $key => $value) {
-                                               $this->{$property}[trim($key, "()")] = urldecode($value);
-                                       }
-                               } else { // Array of complex objects    
-                                       $delim = '.';                                   
-                                       for ($i = 0; $itemValues = PPUtils::filterKeyPrefix($filtered, "($i)") ;$i++) {                                 
-                                               $this->{$property}[$i] = $item = new $type();
-                                               $item->init(PPUtils::filterKeyPrefix($itemValues, "."));
-                                               if(array_key_exists("", $itemValues)) {
-                                                       $item->value = urldecode($itemValues[""]);
-                                               }
-                                       }
-                                       // Handle cases where we have a list of objects
-                                       // with just the value present and all attributes values are null 
-                                       foreach($filtered as $key => $value) {                                          
-                                               $idx = trim($key, "()");                                                
-                                               if(is_numeric($idx) && (is_null($this->{$property}) || !array_key_exists($idx, $this->{$property})) ) {
-                                                       $this->{$property}[$idx] = new $type;
-                                                       $this->{$property}[$idx]->value = urldecode($value);
-                                               }                                               
-                                       }
-                               }                               
-                       } else { // one object
-                               $this->{$property} = new $type();
-                               $this->{$property}->init(PPUtils::filterKeyPrefix($filtered, '.')); // unprefix
-                               if(array_key_exists("", $filtered)) {
-                                       $this->{$property}->value = urldecode($filtered[""]);
-                               }
-                       }
-               }
-       }
-
-       private function isBuiltInType($typeName) {
-               static $types = array('string', 'int', 'integer', 'bool', 'boolean', 'float', 'decimal', 'long', 'datetime', 'double');
-               return in_array(strtolower($typeName), $types);
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPRequest.php
deleted file mode 100644 (file)
index 22e7f69..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-namespace PayPal\Core;
-/**
- * Encapsulates API request information
- *
- */
-class PPRequest {
-       
-       /**
-        * Request Object
-        *
-        * @var object
-        */
-       private $requestObject;
-       
-       /**
-        * Optional credentials associated with
-        * the request
-        * @var ICredential
-        */
-       private $credential;
-               
-       /**
-        * Transport binding for this request.
-        * Can be NVP, SOAP etc
-        * @var string
-        */
-       private $bindingType;
-
-       /**
-        * 
-        * Holder for any binding specific info
-        * @var array
-        */
-       private $bindingInfo = array();
-       
-       public function __construct($requestObject, $bindingType) {
-               $this->requestObject = $requestObject;
-               $this->bindingType = $bindingType;
-       }
-
-       public function getRequestObject() {
-               return $this->requestObject;
-       }
-       
-       public function getBindingType() {
-               return $this->bindingType;
-       }
-       
-       public function getBindingInfo($name=NULL) {
-               if(isset($name)) {
-                       return $this->bindingInfo[$name];
-               }
-               return $this->bindingInfo;
-       }
-       
-       /**
-        * 
-        * @param string $name
-        * @param mixed $value
-        */
-       public function addBindingInfo($name, $value) {
-               $this->bindingInfo[$name] = $value;
-       }
-       
-       public function setCredential($credential) {
-               $this->credential = $credential;
-       }
-       
-       public function getCredential() {
-               return $this->credential;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPUtils.php
deleted file mode 100644 (file)
index 3ef6d8b..0000000
+++ /dev/null
@@ -1,397 +0,0 @@
-<?php
-namespace PayPal\Core;
-class PPUtils
-{
-
-       /**
-        *
-        * Convert a Name Value Pair (NVP) formatted string into
-        * an associative array taking care to urldecode array values
-        *
-        * @param string $nvpString
-        * @return array
-        */
-       public static function nvpToMap($nvpString)
-       {
-               $ret = array();
-               $params = explode("&", $nvpString);
-               foreach ($params as $p) {
-                       list($k, $v) = explode("=", $p);
-                       $ret[$k] = urldecode($v);
-               }
-               return $ret;
-       }
-
-
-
-       /**
-        * Returns true if the array contains a key like $key
-        *
-        * @param array $map
-        * @param string $key
-        * @return bool
-        */
-       public static function array_match_key($map, $key)
-       {
-               $replace = str_replace(array(
-                               '(',
-                               ')',
-                               '.'
-               ), array(
-                               '\(',
-                               '\)',
-                               '\.'
-               ), $key);
-
-               $pattern = "/$replace*/";
-
-               foreach ($map as $k => $v) {
-                       preg_match($pattern, $k, $matches);
-                       if (count($matches) > 0) {
-                               return true;
-                       }
-               }
-               return false;
-       }
-
-
-
-       /**
-        * Get the local IP address. The client address is a required
-        * request parameter for some API calls
-        */
-       public static function getLocalIPAddress()
-       {
-               if (array_key_exists("SERVER_ADDR", $_SERVER)) {
-                       // SERVER_ADDR is available only if we are running the CGI SAPI
-                       return $_SERVER['SERVER_ADDR'];
-
-               } else {
-                       if (function_exists("gethostname")) {
-                               // gethostname is available only in PHP >= v5.3
-                               return gethostbyname(gethostname());
-
-                       } else {
-                               // fallback if nothing works
-                               return "127.0.0.1";
-                       }
-               }
-       }
-
-       public static function xmlToArray($xmlInput)
-       {
-               $xml = simplexml_load_string($xmlInput);
-
-               $ns = $xml->getNamespaces(true);
-               $soap = $xml->children($ns['SOAP-ENV']);
-               $getChild = $soap->Body->children();
-               $array = array();
-               $ret = PPUtils::convertXmlObjToArr($getChild, $array);
-               return $ret;
-       }
-
-
-
-       private static function convertXmlObjToArr($obj, &$arr)
-       {
-               $children = $obj->children();
-               foreach ($children as $elementName => $node) {
-                       $nextIdx = count($arr);
-                       $arr[$nextIdx] = array();
-                       $arr[$nextIdx]['name'] = strtolower((string)$elementName);
-                       $arr[$nextIdx]['attributes'] = array();
-                       $attributes = $node->attributes();
-                       foreach ($attributes as $attributeName => $attributeValue) {
-                               $attribName = strtolower(trim((string)$attributeName));
-                               $attribVal = trim((string)$attributeValue);
-                               $arr[$nextIdx]['attributes'][$attribName] = $attribVal;
-                       }
-                       $text = (string)$node;
-                       $text = trim($text);
-                       if (strlen($text) > 0) {
-                               $arr[$nextIdx]['text'] = $text;
-                       }
-                       $arr[$nextIdx]['children'] = array();
-                       PPutils::convertXmlObjToArr($node, $arr[$nextIdx]['children']);
-               }
-               return $arr;
-       }
-
-
-
-       /**
-        * Escapes invalid xml characters
-        *
-        * @param $textContent = xml data to be escaped
-        * @return string
-        */
-       public static function escapeInvalidXmlCharsRegex($textContent)
-       {
-               return htmlspecialchars($textContent, (1 | 2), 'UTF-8', false);
-       }
-
-
-
-       /**
-        * @param array $map
-        * @param string $keyPrefix
-        * @return array
-        */
-       public static function filterKeyPrefix(array $map, $keyPrefix)
-       {
-               $filtered = array();
-               foreach ($map as $key => $val) {
-                       if (($pos = stripos($key, $keyPrefix)) !== 0) {
-                               continue;
-                       }
-
-                       $filtered[substr_replace($key, '', 0, strlen($keyPrefix))] = $val;
-               }
-
-               return $filtered;
-       }
-
-
-
-       /**
-        * @var array|ReflectionProperty[]
-        */
-       private static $propertiesRefl = array();
-
-       /**
-        * @var array|string[]
-        */
-       private static $propertiesType = array();
-
-
-
-       /**
-        * @param string $class
-        * @param string $propertyName
-        * @throws RuntimeException
-        * @return string
-        */
-       public static function propertyAnnotations($class, $propertyName)
-       {
-               $class = is_object($class) ? get_class($class) : $class;
-               if (!class_exists('ReflectionProperty')) {
-                       throw new \RuntimeException("Property type of " . $class . "::{$propertyName} cannot be resolved");
-               }
-
-               if ($annotations =& self::$propertiesType[$class][$propertyName]) {
-                       return $annotations;
-               }
-
-               if (!($refl =& self::$propertiesRefl[$class][$propertyName])) {
-                       $refl = new \ReflectionProperty($class, $propertyName);
-               }
-
-               // todo: smarter regexp
-               if (!preg_match_all('~\@([^\s@\(]+)[\t ]*(?:\(?([^\n@]+)\)?)?~i', $refl->getDocComment(), $annots, PREG_PATTERN_ORDER)) {
-                       return NULL;
-               }
-               foreach ($annots[1] as $i => $annot) {
-                       $annotations[strtolower($annot)] = empty($annots[2][$i]) ? TRUE : rtrim($annots[2][$i], " \t\n\r)");
-               }
-
-               return $annotations;
-       }
-
-       /**
-        * @param string $class
-        * @param string $propertyName
-        * @return string
-        */
-       public static function isAttributeProperty($class, $propertyName) {
-               if (($annotations = self::propertyAnnotations($class, $property))) {
-                       return $annotations['attribute'];
-               }
-               return FALSE;
-       }
-
-       /**
-        * @param string $class
-        * @param string $propertyName
-        * @return string
-        */
-       public static function isPropertyArray($class, $propertyName) {
-               if (($annotations = self::propertyAnnotations($class, $propertyName))) {
-                       if (isset($annotations['var']) && substr($annotations['var'], -2) === '[]') {
-                               return TRUE;
-
-                       } elseif (isset($annotations['array'])) {
-                               return TRUE;
-                       }
-               }
-
-               return FALSE;
-       }
-
-
-
-       /**
-        * @param string $class
-        * @param string $propertyName
-        * @throws RuntimeException
-        * @return string
-        */
-       public static function propertyType($class, $propertyName)
-       {
-               if (($annotations = self::propertyAnnotations($class, $propertyName)) && isset($annotations['var'])) {
-                       if (substr($annotations['var'], -2) === '[]') {
-                               return substr($annotations['var'], 0, -2);
-                       }
-
-                       return $annotations['var'];
-               }
-
-               return 'string';
-       }
-
-       /**
-        * @param object $object
-        * @return array
-        */
-       public static function objectProperties($object)
-       {
-               $props = array();
-               foreach (get_object_vars($object) as $property => $default) {
-                       $annotations = self::propertyAnnotations($object, $property);
-                       if (isset($annotations['name'])) {
-                               $props[strtolower($annotations['name'])] = $property;
-                       }
-
-                       $props[strtolower($property)] = $property;
-               }
-
-               return $props;
-       }
-
-
-
-       /**
-        * @param array $array
-        * @return array
-        */
-       public static function lowerKeys(array $array)
-       {
-               $ret = array();
-               foreach ($array as $key => $value) {
-                       $ret[strtolower($key)] = $value;
-               }
-
-               return $ret;
-       }
-
-}
-
-
-
-/**
- * XMLToArray Generator Class
- *
- * @author  :  MA Razzaque Rupom <rupom_315@yahoo.com>, <rupom.bd@gmail.com>
- *             Moderator, phpResource (LINK1http://groups.yahoo.com/group/phpresource/LINK1)
- *             URL: LINK2http://www.rupom.infoLINK2
- * @version :  1.0
- * @date       06/05/2006
- * Purpose  : Creating Hierarchical Array from XML Data
- * Released : Under GPL
- */
-class XmlToArray
-{
-
-       var $xml = '';
-
-
-
-       /**
-        * Default Constructor
-        *
-        * @param $xml = xml data
-        * @return none
-        */
-       function XmlToArray($xml)
-       {
-               $this->xml = $xml;
-       }
-
-
-
-       /**
-        * _struct_to_array($values, &$i)
-        *
-        * This is adds the contents of the return xml into the array for easier processing.
-        * Recursive, Static
-        *
-        * @access    private
-        * @param    array  $values this is the xml data in an array
-        * @param    int    $i  this is the current location in the array
-        * @return    Array
-        */
-       function _struct_to_array($values, &$i)
-       {
-               $child = array();
-               if (isset($values[$i]['value'])) {
-                       array_push($child, $values[$i]['value']);
-               }
-
-               while ($i++ < count($values)) {
-                       switch ($values[$i]['type']) {
-                               case 'cdata':
-                                       array_push($child, $values[$i]['value']);
-                                       break;
-
-                               case 'complete':
-                                       $name = $values[$i]['tag'];
-                                       if (!empty($name)) {
-                                               $child[$name] = ($values[$i]['value']) ? ($values[$i]['value']) : '';
-                                               if (isset($values[$i]['attributes'])) {
-                                                       $child[$name] = $values[$i]['attributes'];
-                                               }
-                                       }
-                                       break;
-
-                               case 'open':
-                                       $name = $values[$i]['tag'];
-                                       $size = isset($child[$name]) ? sizeof($child[$name]) : 0;
-                                       $child[$name][$size] = $this->_struct_to_array($values, $i);
-                                       break;
-
-                               case 'close':
-                                       return $child;
-                                       break;
-                       }
-               }
-               return $child;
-       }
-
-
-
-       /**
-        * createArray($data)
-        *
-        * This is adds the contents of the return xml into the array for easier processing.
-        *
-        * @access    public
-        * @return    Array
-        */
-       function createArray()
-       {
-               $xml = $this->xml;
-               $values = array();
-               $index = array();
-               $array = array();
-               $parser = xml_parser_create();
-               xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
-               xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
-               xml_parse_into_struct($parser, $xml, $values, $index);
-               xml_parser_free($parser);
-               $i = 0;
-               $name = $values[$i]['tag'];
-               $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';
-               $array[$name] = $this->_struct_to_array($values, $i);
-               return $array;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php
deleted file mode 100644 (file)
index 123bf4b..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?php
-namespace PayPal\Core;
-/**
- * @author 
- */
-abstract class PPXmlMessage
-{
-
-       /**
-        * @return string
-        */
-       public function toSOAP()
-       {
-               return $this->toXMLString();
-       }
-
-
-
-       /**
-        * @return string
-        */
-       public function toXMLString()
-       {
-               if (count($properties = get_object_vars($this)) >= 2 && array_key_exists('value', $properties)) {
-                       $attributes = array();
-                       foreach (array_keys($properties) as $property) {
-                               if ($property === 'value') continue;
-                               if (($annots = PPUtils::propertyAnnotations($this, $property)) && isset($annots['attribute'])) {
-                                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
-                                               $attributes[] = NULL;
-                                               continue;
-                                       }
-
-                                       $attributes[] = $property . '="' . PPUtils::escapeInvalidXmlCharsRegex($propertyValue) . '"';
-                               }
-                       }
-
-                       if (count($attributes)) {
-                               return implode(' ', $attributes) . '>' . PPUtils::escapeInvalidXmlCharsRegex($this->value);
-                       }
-               }
-
-               $xml = array();
-               foreach ($properties as $property => $defaultValue) {
-                       if (($propertyValue = $this->{$property}) === NULL || $propertyValue == NULL) {
-                               continue;
-                       }
-
-                       if (is_array($defaultValue) || is_array($propertyValue)) {
-                               foreach ($propertyValue as $item) {
-                                       if (!is_object($item)) {
-                                               $xml[] = $this->buildProperty($property, $item);
-                                       }else{
-                                               $xml[] = $this->buildProperty($property, $item);
-                                       }
-                               }
-
-                       } else {
-                               $xml[] = $this->buildProperty($property, $propertyValue);
-                       }
-               }
-
-               return implode($xml);
-       }
-
-
-
-       /**
-        * @param string $property
-        * @param PPXmlMessage|string $value
-        * @param string $namespace
-        * @return string
-        */
-       private function buildProperty($property, $value, $namespace = 'ebl')
-       {
-               $annotations = PPUtils::propertyAnnotations($this, $property);
-               if (!empty($annotations['namespace'])) {
-                       $namespace = $annotations['namespace'];
-               }
-               if (!empty($annotations['name'])) {
-                       $property = $annotations['name'];
-               }
-
-               $el = '<' . $namespace . ':' . $property;
-               if (!is_object($value)) {
-                       $el .= '>' . PPUtils::escapeInvalidXmlCharsRegex($value);
-
-               } else {
-                       if (substr($value = $value->toXMLString(), 0, 1) === '<' || $value=='') {
-                               $el .= '>' . $value;
-
-                       } else {
-                               $el .= ' ' . $value;
-                       }
-               }
-
-               return $el . '</' . $namespace . ':' . $property . '>';
-       }
-
-
-
-       /**
-        * @param array $map
-        * @param string $prefix
-        */
-       public function init(array $map = array(), $prefix = '')
-       {
-               if (empty($map)) {
-                       return;
-               }
-
-               if (($first = reset($map)) && !is_array($first) && !is_numeric(key($map))) {
-                       parent::init($map, $prefix);
-                       return;
-               }
-
-               $propertiesMap = PPUtils::objectProperties($this);
-               $arrayCtr = array();            
-               foreach ($map as $element) {
-               
-                       if (empty($element) || empty($element['name'])) {
-                               continue;
-
-                       } elseif (!array_key_exists($property = strtolower($element['name']), $propertiesMap)) {
-                               if (!preg_match('~^(.+)[\[\(](\d+)[\]\)]$~', $property, $m)) {
-                                       continue;
-                               }
-
-                               $element['name'] = $m[1];
-                               $element['num'] = $m[2];
-                       }
-                       $element['name'] = $propertiesMap[strtolower($element['name'])];
-                       if(PPUtils::isPropertyArray($this, $element['name'])) {                         
-                               $arrayCtr[$element['name']] = isset($arrayCtr[$element['name']]) ? ($arrayCtr[$element['name']]+1) : 0;                         
-                               $element['num'] = $arrayCtr[$element['name']];
-                       } 
-                       if (!empty($element["attributes"]) && is_array($element["attributes"])) {
-                               foreach ($element["attributes"] as $key => $val) {
-                                       $element["children"][] = array(
-                                               'name' => $key,
-                                               'text' => $val,
-                                       );
-                               }
-
-                               if (isset($element['text'])) {
-                                       $element["children"][] = array(
-                                               'name' => 'value',
-                                               'text' => $element['text'],
-                                       );
-                               }
-
-                               $this->fillRelation($element['name'], $element);
-
-                       } elseif (!empty($element['text'])) {
-                               $this->{$element['name']} = $element['text'];
-
-                       } elseif (!empty($element["children"]) && is_array($element["children"])) {
-                               $this->fillRelation($element['name'], $element);
-                       }
-               }               
-       }
-
-
-
-       /**
-        * @param string $property
-        * @param array $element
-        */
-       private function fillRelation($property, array $element)
-       {
-               if (!class_exists($type = PPUtils::propertyType($this, $property))) {
-                       trigger_error("Class $type not found.", E_USER_NOTICE);
-                       return; // just ignore
-               }
-
-               if (isset($element['num'])) { // array of objects
-                       $this->{$property}[$element['num']] = $item = new $type();
-                       $item->init($element['children']);
-
-               } else {
-                       $this->{$property} = new $type();
-                       $this->{$property}->init($element["children"]);
-               }
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Core/cacert.pem
deleted file mode 100644 (file)
index 1202c20..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-Verisign Class 3 Public Primary Certification Authority
-=======================================================
------BEGIN CERTIFICATE-----
-MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
-FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
-XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
-A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
-f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
-hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
-TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
-WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
-Tqj/ZA1k
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority - G2
-============================================================
------BEGIN CERTIFICATE-----
-MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
-MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
-dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
-MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
-dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO
-FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71
-lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB
-MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT
-1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD
-Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9
------END CERTIFICATE-----
-
-
-Verisign Class 3 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
-EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
-cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
-EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
-055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
-j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
-/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
-xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
-t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
------END CERTIFICATE-----
-
-Verisign Class 4 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
-tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
-8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
-Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
-Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
-mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
-fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
-RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
-UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
------END CERTIFICATE-----
-VeriSign Class 3 Public Primary Certification Authority - G5
-============================================================
------BEGIN CERTIFICATE-----
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
-biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
-dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
-YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
-j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
-Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
-Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
-fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
-BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
-Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
-aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
-SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
-X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
-KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
-Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
-ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
------END CERTIFICATE-----
-VeriSign Universal Root Certification Authority
-===============================================
------BEGIN CERTIFICATE-----
-MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
-IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
-aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
-1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
-MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
-9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
-AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
-tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
-CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
-a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
-DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
-Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
-Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
-P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
-wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
-mJO37M2CYfE45k+XmCpajQ==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G4
-============================================================
------BEGIN CERTIFICATE-----
-MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
-VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
-b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
-ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
-cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
-b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
-Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
-rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
-/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
-HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
-Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
-A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
-AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
------END CERTIFICATE-----
-Verisign Class 3 Public Primary Certification Authority
-=======================================================
------BEGIN CERTIFICATE-----
-MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx
-FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow
-XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
-A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
-f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
-hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky
-CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX
-bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/
-D/xwzoiQ
------END CERTIFICATE-----
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/OAuthException.php
deleted file mode 100644 (file)
index e10ea33..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-namespace PayPal\Exception;
-/* Generic exception class
- */
-class OAuthException extends \Exception {
-       // pass
-}
-?>
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConfigurationException.php
deleted file mode 100644 (file)
index 60dfa57..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-namespace PayPal\Exception;
-class PPConfigurationException extends \Exception {
-
-       public function __construct($message=null,$code=0) {
-               parent::__construct($message, $code);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPConnectionException.php
deleted file mode 100644 (file)
index d0a0bf3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-namespace PayPal\Exception;
-class PPConnectionException extends \Exception
-{
-       /**
-        * The url that was being connected to when the exception occured
-        * @var string
-        */
-       private $url;
-       
-       /**
-        * Any response data that was returned by the server
-        * @var string
-        */
-       private $data;
-
-       public function __construct($url, $message, $code = 0) {                
-               parent::__construct($message, $code);
-               $this->url = $url;              
-       }
-       
-       public function setData($data) {
-               $this->data = $data;
-       }
-       
-       public function getData() {
-               return $this->data;
-       }
-       
-       public function getUrl() {
-               return $this->url;
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPInvalidCredentialException.php
deleted file mode 100644 (file)
index c492173..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-namespace PayPal\Exception;
-
-class PPInvalidCredentialException extends \Exception{
-
-       public function __construct($message = null, $code = 0) {
-               parent::__construct($message, $code);
-       }
-       
-       public function errorMessage()
-       {
-               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
-               .': <b>'.$this->getMessage().'</b>';
-               return $errorMsg;
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPMissingCredentialException.php
deleted file mode 100644 (file)
index a33ae8f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-namespace PayPal\Exception;
-
-class PPMissingCredentialException extends \Exception{
-
-       public function __construct($message = null, $code = 0) {
-               parent::__construct($message, $code);
-       }
-
-       public function errorMessage()
-       {
-               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
-               .': <b>'.$this->getMessage().'</b>';
-
-               return $errorMsg;
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Exception/PPTransformerException.php
deleted file mode 100644 (file)
index 616db00..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-namespace PayPal\Exception;
-class PPTransformerException extends \Exception{
-
-       public function __construct($message = null, $code = 0) {
-               parent::__construct($message, $code);
-       }
-
-       public function errorMessage()
-       {
-               $errorMsg = 'Error on line '.$this->getLine().' in '.$this->getFile()
-               .': <b>'.$this->getMessage().'</b>';
-
-               return $errorMsg;
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/FormatterFactory.php
deleted file mode 100644 (file)
index 9c26f46..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-namespace PayPal\Formatter;
-class FormatterFactory {
-       public static function factory($bindingType) {
-               switch ($bindingType) {
-                       case 'NV':
-                               return new PPNVPFormatter();
-                               break;
-                       case 'SOAP':
-                               return new PPSOAPFormatter();
-                               break;
-                       default:
-                               throw new InvalidArgumentException("Invalid value for bindingType. You passed $bindingType");   
-               }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/IPPFormatter.php
deleted file mode 100644 (file)
index 28e19b7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace PayPal\Formatter;
-/**
- * Interface for all classes that format objects to
- * and from a on-wire representation
- * 
- * For every new payload format, write a new formatter
- * class that implements this interface
- *
- */
-interface IPPFormatter {
-       
-       /**
-        * 
-        * @param PPRequest $request The request to format
-        * @param array $options Any formatter specific options 
-        *   to be passed in 
-        */
-       public function toString($request, $options=array());
-       
-       public function toObject($string, $options=array());
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPNVPFormatter.php
deleted file mode 100644 (file)
index 6a5a586..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-namespace PayPal\Formatter;
-class PPNVPFormatter implements IPPFormatter {
-       
-       public function toString($request, $options=array()) {          
-               return $request->getRequestObject()->toNVPString();
-       }
-       
-       public function toObject($string, $options=array()) {
-               throw new BadMethodCallException("Unimplemented");
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Formatter/PPSOAPFormatter.php
deleted file mode 100644 (file)
index 1c2920b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-namespace PayPal\Formatter;
-class PPSOAPFormatter implements IPPFormatter {
-       
-       private static $SOAP_NAMESPACE = ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ';
-       
-       public function toString($request, $options=array()) {
-                               
-               $customNamespace = ( $request->getBindingInfo('namespace') != null ) ?  $request->getBindingInfo('namespace') : "";
-               $soapEnvelope = '<soapenv:Envelope ' . self::$SOAP_NAMESPACE . " $customNamespace >";
-
-               $soapHeader = '<soapenv:Header>';
-               if($request->getBindingInfo('securityHeader') != null) {
-                       $soapHeader .= $request->getBindingInfo('securityHeader');
-               }               
-               $soapHeader .= '</soapenv:Header>';
-                               
-               $soapBody = '<soapenv:Body>';
-               $soapBody .= $request->getRequestObject()->toXMLString();
-               $soapBody .= '</soapenv:Body>';
-               
-               return $soapEnvelope . $soapHeader . $soapBody . '</soapenv:Envelope>';
-       }
-       
-       public function toObject($string, $options=array()) {
-               throw new BadMethodCallException("Unimplemented");
-       }       
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/IPPHandler.php
deleted file mode 100644 (file)
index 42b4216..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
-namespace PayPal\Handler;
-interface IPPHandler {
-       /**
-        * 
-        * @param PPHttpConfig $httpConfig
-        * @param PPRequest $request 
-        */
-       public function handle($httpConfig, $request, $options);
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPAuthenticationHandler.php
deleted file mode 100644 (file)
index 427487f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Auth\PPSignatureCredential;
-use PayPal\Auth\PPCertificateCredential;
-use PayPal\Auth\PPTokenAuthorization;
-use PayPal\Auth\Oauth\AuthSignature;
-use PayPal\Handler\IPPHandler;
-use PayPal\Handler\PPSignatureAuthHandler;
-use PayPal\Handler\PPCertificateAuthHandler;
-use PayPal\Exception\PPInvalidCredentialException;
-
-
-class PPAuthenticationHandler implements IPPHandler {  
-       
-       public function handle($httpConfig, $request, $options) {
-               $credential = $request->getCredential();
-               if(isset($credential)) {
-                       $thirdPartyAuth = $credential->getThirdPartyAuthorization();
-                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
-                               $authSignature = AuthSignature::generateFullAuthString($credential->getUsername(), $credential->getPassword(), $thirdPartyAuth->getAccessToken(), $thirdPartyAuth->getTokenSecret(), $httpConfig->getMethod(), $httpConfig->getUrl());
-                               if($options['port'] == 'PayPalAPI' || $options['port'] == 'PayPalAPIAA') {
-                                       $httpConfig->addHeader('X-PP-AUTHORIZATION', $authSignature);
-                               }
-                               else {
-                                       $httpConfig->addHeader('X-PAYPAL-AUTHORIZATION', $authSignature);
-                               }
-                       }
-                       if($credential instanceof PPSignatureCredential) {
-                               $handler = new PPSignatureAuthHandler($credential);
-                       } else if($credential instanceof PPCertificateCredential) {
-                               $handler = new PPCertificateAuthHandler($credential);
-                       } else {
-                               throw new PPInvalidCredentialException();
-                       }
-                       $handler->handle($httpConfig, $request, $options);
-               }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPCertificateAuthHandler.php
deleted file mode 100644 (file)
index 4b24cba..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Auth\PPTokenAuthorization;
-use PayPal\Auth\PPSubjectAuthorization;
-use PayPal\Auth\Oauth\AuthSignature;
-use PayPal\Handler\IPPHandler;
-class PPCertificateAuthHandler implements IPPHandler {
-
-       public function handle($httpConfig, $request, $options) {
-
-               $credential = $request->getCredential();
-               if(!isset($credential)) {
-                       return;
-               }
-               
-               $httpConfig->setSSLCert($credential->getCertificatePath(), $credential->getCertificatePassPhrase());
-               $thirdPartyAuth = $credential->getThirdPartyAuthorization();
-       
-               switch($request->getBindingType()) {
-                       case 'NV':
-                               if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
-                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
-                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());                                       
-                                       if($thirdPartyAuth) {
-                                               $httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
-                                       }
-                               }
-                               break;
-                       case 'SOAP':
-                               if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
-                                       $securityHeader = '<ns:RequesterCredentials/>';
-                               } else {
-                                       $securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
-                                       $securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
-                                       $securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';                                   
-                                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
-                                               $securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
-                                       }
-                                       $securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
-                                       $request->addBindingInfo('securityHeader' , $securityHeader);
-                               }
-                               break;  
-               }                               
-       }
-
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPGenericServiceHandler.php
deleted file mode 100644 (file)
index 51c1e0e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Handler\IPPHandler;
-use PayPal\Core\PPUtils;
-use PayPal\Core\PPBaseService;
-class PPGenericServiceHandler implements IPPHandler {
-
-       public function handle($httpConfig, $request, $options) {
-               $httpConfig->addHeader('X-PAYPAL-REQUEST-DATA-FORMAT', $request->getBindingType());
-               $httpConfig->addHeader('X-PAYPAL-RESPONSE-DATA-FORMAT', $request->getBindingType());
-               $httpConfig->addHeader('X-PAYPAL-DEVICE-IPADDRESS', PPUtils::getLocalIPAddress());
-               $httpConfig->addHeader('X-PAYPAL-REQUEST-SOURCE', PPBaseService::getRequestSource());
-                       if(isset($options['config']['service.SandboxEmailAddress']))
-                       {
-                               $httpConfig->addHeader('X-PAYPAL-SANDBOX-EMAIL-ADDRESS', $options['config']['service.SandboxEmailAddress']);
-                       }
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPMerchantServiceHandler.php
deleted file mode 100644 (file)
index 8f56366..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Auth\PPSignatureCredential;
-use PayPal\Auth\PPCertificateCredential;
-use PayPal\Core\PPConstants;
-class PPMerchantServiceHandler extends PPGenericServiceHandler {
-       private $endpoint;
-       private $config;
-       public function handle($httpConfig, $request, $options) {
-               parent::handle($httpConfig, $request, $options);
-               $this->config = $options['config'];
-               $credential = $request->getCredential();
-               if($options['port'] != null && isset($this->config['service.EndPoint.'.$options['port']]))
-               {
-                       $this->endpoint = $this->config['service.EndPoint.'.$options['port']];
-               }
-               // for backward compatibilty (for those who are using old config files with 'service.EndPoint')
-               else if (isset($this->config['service.EndPoint']))
-               {
-                       $this->endpoint = $this->config['service.EndPoint'];
-               }
-               else if (isset($this->config['mode']))
-               {
-                       if(strtoupper($this->config['mode']) == 'SANDBOX')
-                       {
-                               if($credential instanceof PPSignatureCredential)
-                               {
-                                       $this->endpoint = PPConstants::MERCHANT_SANDBOX_SIGNATURE_ENDPOINT;
-                               }
-                               else if($credential instanceof PPCertificateCredential)
-                               {
-                                       $this->endpoint = PPConstants::MERCHANT_SANDBOX_CERT_ENDPOINT;
-                               }
-                       }
-                       else if(strtoupper($this->config['mode']) == 'LIVE')
-                       {
-                       if($credential instanceof PPSignatureCredential)
-                               {
-                                       $this->endpoint = PPConstants::MERCHANT_LIVE_SIGNATURE_ENDPOINT;
-                               }
-                               else if($credential instanceof PPCertificateCredential)
-                               {
-                                       $this->endpoint = PPConstants::MERCHANT_LIVE_CERT_ENDPOINT;
-                               }
-                       }
-               }
-               else
-               {
-                       throw new PPConfigurationException('endpoint Not Set');
-               }
-               
-               if($options['serviceBinding'] == 'SOAP' )
-               {
-                       $httpConfig->setUrl($this->endpoint);
-               }
-               else 
-               {
-                       throw new PPConfigurationException('expecting service binding to be SOAP');
-               }
-               
-               $request->addBindingInfo("namespace", "xmlns:ns=\"urn:ebay:api:PayPalAPI\" xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\" xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\" xmlns:ed=\"urn:ebay:apis:EnhancedDataTypes\"");
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPOpenIdHandler.php
deleted file mode 100644 (file)
index b66ec5e..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Core\PPConstants;
-class PPOpenIdHandler implements IPPHandler {
-       
-       private $apiContext;
-       
-       private static $sdkName = "openid-sdk-php";     
-       private static $sdkVersion = "1.4.0";
-       
-       public function __construct($apiContext) {
-               $this->apiContext = $apiContext;
-       }
-
-       public function handle($httpConfig, $request, $options) {
-
-               $config = $this->apiContext->getConfig();
-               $httpConfig->setUrl(
-                       rtrim(trim($this->_getEndpoint($config)), '/') . 
-                               (isset($options['path']) ? $options['path'] : '')
-               );
-               
-               if(!array_key_exists("Authorization", $httpConfig->getHeaders())) {                     
-                       $auth = base64_encode($config['acct1.ClientId'] . ':' . $config['acct1.ClientSecret']);
-                       $httpConfig->addHeader("Authorization", "Basic $auth");
-               }
-               if(!array_key_exists("User-Agent", $httpConfig->getHeaders())) {
-                       $httpConfig->addHeader("User-Agent", PPUserAgent::getValue(self::$sdkName, self::$sdkVersion));
-               }
-       }
-       
-       private function _getEndpoint($config) {
-               if (isset($config['openid.EndPoint'])) {
-                       return $config['openid.EndPoint'];
-               } else if (isset($config['service.EndPoint'])) {
-                       return $config['service.EndPoint'];
-               } else if (isset($config['mode'])) {
-                       switch (strtoupper($config['mode'])) {
-                               case 'SANDBOX':
-                                       return PPConstants::REST_SANDBOX_ENDPOINT;
-                               case 'LIVE':
-                                       return PPConstants::REST_LIVE_ENDPOINT;
-                               default:
-                                       throw new PPConfigurationException('The mode config parameter must be set to either sandbox/live');
-                       }
-               } else {
-                       throw new PPConfigurationException('You must set one of service.endpoint or mode parameters in your configuration');
-               }
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPPlatformServiceHandler.php
deleted file mode 100644 (file)
index 7b3c50e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Core\PPConstants;
-use PayPal\Handler\PPGenericServiceHandler;
-use PayPal\Exception\PPConfigurationException;
-
-
-class PPPlatformServiceHandler extends PPGenericServiceHandler {
-       private $endpoint;
-       private $config;
-       public function handle($httpConfig, $request, $options) {
-               parent::handle($httpConfig, $request, $options);
-               $this->config = $options['config'];
-               $credential = $request->getCredential();
-               //TODO: Assuming existence of getApplicationId
-               if($credential && $credential->getApplicationId() != NULL) {
-                       $httpConfig->addHeader('X-PAYPAL-APPLICATION-ID', $credential->getApplicationId());
-               }
-               if($options['port'] != null && isset($this->config['service.EndPoint.'.$options['port']]))
-               {
-                       $endpnt = 'service.EndPoint.'.$options['port']; 
-                       $this->endpoint = $this->config[$endpnt];
-               }
-               // for backward compatibilty (for those who are using old config files with 'service.EndPoint')
-               else if (isset($this->config['service.EndPoint']))
-               {
-                       $this->endpoint = $this->config['service.EndPoint'];
-               }
-               else if (isset($this->config['mode']))
-               {
-                       if(strtoupper($this->config['mode']) == 'SANDBOX')
-                       {
-                               $this->endpoint = PPConstants::PLATFORM_SANDBOX_ENDPOINT;
-                       }
-                       else if(strtoupper($this->config['mode']) == 'LIVE')
-                       {
-                               $this->endpoint = PPConstants::PLATFORM_LIVE_ENDPOINT;
-                       }
-               }
-               else
-               {
-                       throw new PPConfigurationException('endpoint Not Set');
-               }
-               $httpConfig->setUrl($this->endpoint . $options['serviceName'] . '/' .  $options['apiMethod']);
-       
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Handler/PPSignatureAuthHandler.php
deleted file mode 100644 (file)
index 428d5e4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-namespace PayPal\Handler;
-use PayPal\Auth\PPTokenAuthorization;
-use PayPal\Auth\PPSubjectAuthorization;
-use PayPal\Auth\Oauth\AuthSignature;
-use PayPal\Core\PPConstants;
-use PayPal\Handler\IPPHandler;
-
-class PPSignatureAuthHandler implements IPPHandler {
-               
-       public function handle($httpConfig, $request, $options) {
-               
-               $credential = $request->getCredential();
-               if(!isset($credential)) {
-                       return;
-               }               
-               $thirdPartyAuth = $credential->getThirdPartyAuthorization();
-
-               switch($request->getBindingType()) {
-                       case 'NV':
-                               if(!$thirdPartyAuth || !$thirdPartyAuth instanceof PPTokenAuthorization) {
-                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-USERID', $credential->getUserName());
-                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-PASSWORD', $credential->getPassword());
-                                       $httpConfig->addHeader('X-PAYPAL-SECURITY-SIGNATURE', $credential->getSignature());
-                                       if($thirdPartyAuth) {
-                                               $httpConfig->addHeader('X-PAYPAL-SECURITY-SUBJECT', $thirdPartyAuth->getSubject());
-                                       }
-                               }
-                               break;
-                       case 'SOAP':
-                               if($thirdPartyAuth && $thirdPartyAuth instanceof PPTokenAuthorization) {
-                                       $request->addBindingInfo('securityHeader' , '<ns:RequesterCredentials/>');
-                               } else {
-                                       $securityHeader = '<ns:RequesterCredentials><ebl:Credentials>';
-                                       $securityHeader .= '<ebl:Username>' . $credential->getUserName() . '</ebl:Username>';
-                                       $securityHeader .= '<ebl:Password>' . $credential->getPassword() . '</ebl:Password>';
-                                       $securityHeader .= '<ebl:Signature>' . $credential->getSignature() . '</ebl:Signature>';                                        
-                                       if($thirdPartyAuth && $thirdPartyAuth instanceof PPSubjectAuthorization) {
-                                               $securityHeader .= '<ebl:Subject>' . $thirdPartyAuth->getSubject() . '</ebl:Subject>';
-                                       }
-                                       $securityHeader .= '</ebl:Credentials></ns:RequesterCredentials>';
-                                       $request->addBindingInfo('securityHeader' , $securityHeader);                                   
-                               }
-                               break;
-               }
-       }
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/IPN/PPIPNMessage.php
deleted file mode 100644 (file)
index ffb2383..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-<?php
-namespace PayPal\IPN;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Exception\PPConfigurationException;
-use PayPal\Core\PPConfigManager;
-use PayPal\Core\PPConstants;
-use PayPal\Core\PPConnectionManager;
-/**
- *
- *
- */
-class PPIPNMessage {
-
-       const IPN_CMD = 'cmd=_notify-validate';
-
-       /*
-        *@var boolian
-       *
-       */
-       private $isIpnVerified;
-
-       /*
-        *@var config
-       *
-       */
-       private $config;
-       /**
-        *
-        * @var array
-        */
-       private $ipnData = array();
-
-       /**
-        *
-        * @param string $postData OPTIONAL post data. If null,
-        *                              the class automatically reads incoming POST data
-        *                              from the input stream
-       */
-       public function __construct($postData='', $config = null) {
-               if($config == null)
-               {
-                       $conf = PPConfigManager::getInstance();
-                       $this->config = $conf->config;
-               }
-               else
-               {
-                       $this->config = $config;
-               }
-               if($postData == '') {
-                       // reading posted data from directly from $_POST may causes serialization issues with array data in POST
-                       // reading raw POST data from input stream instead.
-                       $postData = file_get_contents('php://input');
-               }
-
-               $rawPostArray = explode('&', $postData);
-               foreach ($rawPostArray as $keyValue) {
-                       $keyValue = explode ('=', $keyValue);
-                       if (count($keyValue) == 2)
-                               $this->ipnData[$keyValue[0]] = urldecode($keyValue[1]);
-               }
-               //var_dump($this->ipnData);
-       }
-
-       /**
-        * Returns a hashmap of raw IPN data
-        *
-        * @return array
-        */
-       public function getRawData() {
-               return $this->ipnData;
-       }
-
-       /**
-        * Validates a IPN message
-        *
-        * @return boolean
-        */
-       public function validate() {
-               if(isset($this->isIpnVerified))
-               {
-                       return $this->isIpnVerified;
-               }
-               else
-               {
-                       $request = self::IPN_CMD;
-                       if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {
-                               $get_magic_quotes_exists = true;
-                       } else {
-                               $get_magic_quotes_exists = false;
-                       }
-                       foreach ($this->ipnData as $key => $value) {
-                               if($get_magic_quotes_exists) {
-                                       $value = urlencode(stripslashes($value));
-                               } else {
-                                       $value = urlencode($value);
-                               }
-                               $request .= "&$key=$value";
-                       }
-                               
-                       $httpConfig = new PPHttpConfig($this->setEndpoint());
-                       $httpConfig->addCurlOption(CURLOPT_FORBID_REUSE, 1);
-                       $httpConfig->addCurlOption(CURLOPT_HTTPHEADER, array('Connection: Close'));
-
-                       $connection = PPConnectionManager::getInstance()->getConnection($httpConfig, $this->config);
-                       $response = $connection->execute($request);
-                       if($response == 'VERIFIED') {
-                               $this->isIpnVerified = true;
-                               return true;
-                       }
-                       $this->isIpnVerified = false;
-                       return false; // value is 'INVALID'
-               }
-       }
-
-       /**
-        * Returns the transaction id for which
-        * this IPN was generated, if one is available
-        *
-        * @return string
-        */
-       public function getTransactionId() {
-               if(isset($this->ipnData['txn_id'])) {
-                       return $this->ipnData['txn_id'];
-               } else if(isset($this->ipnData['transaction[0].id'])) {
-                       $idx = 0;
-                       do {
-                               $transId[] =  $this->ipnData["transaction[$idx].id"];
-                               $idx++;
-                       } while(isset($this->ipnData["transaction[$idx].id"]));
-                       return $transId;
-               }
-       }
-
-       /**
-        * Returns the transaction type for which
-        * this IPN was generated
-        *
-        * @return string
-        */
-       public function getTransactionType() {
-               return $this->ipnData['transaction_type'];
-       }
-       
-       private function setEndpoint()
-       {
-               if(isset($this->config['service.EndPoint.IPN']))
-               {
-                       $url = $this->config['service.EndPoint.IPN'];
-               }
-               else if(isset($this->config['mode']))
-               {
-                       if(strtoupper($this->config['mode']) == 'SANDBOX')
-                       {
-                               $url = PPConstants::IPN_SANDBOX_ENDPOINT;
-                       }
-                       else if (strtoupper($this->config['mode']) == 'LIVE')
-                       {
-                               $url = PPConstants::IPN_LIVE_ENDPOINT;
-                       }
-                       else
-                       {
-                               throw new PPConfigurationException('mode should be LIVE or SANDBOX');
-                       }
-               }
-               else
-               {
-                       throw new PPConfigurationException('No COnfig file found');
-               }
-               return $url;
-       }
-
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/lib/PayPal/Transport/PPRestCall.php
deleted file mode 100644 (file)
index cb8910e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-namespace PayPal\Transport;
-use PayPal\Core\PPLoggingManager;
-use PayPal\Core\PPHttpConfig;
-use PayPal\Core\PPHttpConnection;
-class PPRestCall {
-
-       
-       /**
-        * 
-        * @var PPLoggingManager logger interface
-        */
-       private $logger;
-       
-       private $apiContext;
-
-       public function __construct($apiContext) {
-               $this->apiContext = $apiContext;
-               $this->logger = new PPLoggingManager(__CLASS__, $apiContext->getConfig());
-       }
-
-       /**
-        * @param array $handlers array of handlers
-        * @param string $path   Resource path relative to base service endpoint
-        * @param string $method HTTP method - one of GET, POST, PUT, DELETE, PATCH etc
-        * @param string $data   Request payload
-        * @param array $headers HTTP headers
-        */
-       public function execute($handlers, $path, $method, $data='', $headers=array()) {
-
-               $config = $this->apiContext->getConfig();               
-               $httpConfig = new PPHttpConfig(null, $method);
-               $httpConfig->setHeaders($headers + 
-                       array(
-                               'Content-Type' => 'application/json'
-                       )       
-               );
-               
-               foreach($handlers as $handler) {
-                       $handler = new $handler($this->apiContext);
-                       $handler->handle($httpConfig, $data, array('path' => $path));
-               }
-               $connection = new PPHttpConnection($httpConfig, $config);
-               $response = $connection->execute($data);
-               $this->logger->fine($response);
-               
-               return $response;
-       }
-       
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdAddressTest.php
deleted file mode 100644 (file)
index 87475c4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php 
-use PayPal\Auth\Openid\PPOpenIdAddress;
-/**
- * Test class for PPOpenIdAddress.
- *
- */
-class PPOpenIdAddressTest extends \PHPUnit_Framework_TestCase {
-       
-       public $addr;
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp() {
-               $this->addr = new PPOpenIdAddress();
-               $this->addr->setCountry("US")->setLocality("San Jose")
-               ->setPostalCode("95112")->setRegion("CA")
-               ->setStreetAddress("1, North 1'st street");
-       }
-       
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-       
-       /**
-        * @test
-        */
-       public function testSerializationDeserialization() {                            
-               $addrCopy = new PPOpenIdAddress();
-               $addrCopy->fromJson($this->addr->toJson());
-               
-               $this->assertEquals($this->addr, $addrCopy);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdSessionTest.php
deleted file mode 100644 (file)
index 46e84d1..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-use PayPal\Common\PPApiContext;
-use PayPal\Auth\Openid\PPOpenIdSession;
-/**
- * Test class for PPOpenIdSession.
- *
- */
-class PPOpenIdSessionTest extends \PHPUnit_Framework_TestCase {
-       
-       private $context;
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-               $this->context = new PPApiContext(
-                       array(
-                               'acct1.ClientId' => 'DummyId',
-                               'acct1.ClientSecret' => 'A8VERY8SECRET8VALUE0',
-                               'mode' => 'live'
-                       )
-               );
-       }
-       
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-       
-
-       /**
-        * @test
-        */
-       public function testLoginUrlForMultipleScopes() {
-       
-               $redirectUri = 'http://mywebsite.com';
-               $scope = array('this', 'that', 'and more');
-       
-               $expectedBaseUrl = "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
-       
-               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
-                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - custom scope");
-       
-               $scope = array();
-               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=openid+profile+address+email+phone+" . urlencode("https://uri.paypal.com/services/paypalattributes") . "&redirect_uri=" . urlencode($redirectUri),
-                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - default scope");
-       
-               $scope = array('openid');
-               $this->assertEquals($expectedBaseUrl . "?client_id=ProxyRP-01&response_type=code&scope=openid&redirect_uri=" . urlencode($redirectUri),
-                               PPOpenIdSession::getAuthorizationUrl($redirectUri, $scope), "Failed case - openid scope");
-       }
-       
-       /**
-        * @test
-        */
-       public function testLoginWithCustomConfig() {
-       
-               $redirectUri = 'http://mywebsite.com';
-               $scope = array('this', 'that', 'and more');
-       
-               $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, $this->context), "Failed case - custom config");
-       }
-       
-       /**
-        * @test
-        */
-       public function testLogoutWithCustomConfig() {
-               
-               $redirectUri = 'http://mywebsite.com';
-               $idToken = 'abc';
-               
-               $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");
-       }
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdTokeninfoTest.php
deleted file mode 100644 (file)
index 999145d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php 
-use PayPal\Auth\Openid\PPOpenIdTokeninfo;
-/**
- * Test class for PPOpenIdTokeninfo.
- *
- */
-class PPOpenIdTokeninfoTest extends \PHPUnit_Framework_TestCase {
-       
-       public $token;
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp() {
-               $this->token = new PPOpenIdTokeninfo();
-               $this->token->setAccessToken("Access token")
-                                       ->setExpiresIn(900)
-                                       ->setRefreshToken("Refresh token")
-                                       ->setScope("openid address")
-                                       ->setTokenType("Bearer");
-       }
-       
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-       
-       /**
-        * @test
-        */
-       public function testSerializationDeserialization() {                            
-               $tokenCopy = new PPOpenIdTokeninfo();
-               $tokenCopy->fromJson($this->token->toJson());
-               
-               $this->assertEquals($this->token, $tokenCopy);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/Openid/PPOpenIdUserinfoTest.php
deleted file mode 100644 (file)
index 330d843..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-use PayPal\Auth\Openid\PPOpenIdUserinfo;
-/**
- * Test class for PPOpenIdUserinfo.
- *
- */
-class PPOpenIdUserinfoTest extends \PHPUnit_Framework_TestCase {
-       
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-       }
-       
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-       
-
-       /**
-        * @test
-        */
-       public function testSerializationDeserialization() {
-               $user = new PPOpenIdUserinfo();
-               $user->setAccountType("PERSONAL")->setAgeRange("20-30")->setBirthday("1970-01-01")
-                       ->setEmail("me@email.com")->setEmailVerified(true)
-                       ->setFamilyName("Doe")->setMiddleName("A")->setGivenName("John")
-                       ->setLocale("en-US")->setGender("male")->setName("John A Doe")
-                       ->setPayerId("A-XZASASA")->setPhoneNumber("1-408-111-1111")
-                       ->setPicture("http://gravatar.com/me.jpg")
-                       ->setSub("me@email.com")->setUserId("userId")
-                       ->setVerifiedAccount(true)->setZoneinfo("America/PST");
-               
-               $userCopy = new PPOpenIdUserinfo();
-               $userCopy->fromJson($user->toJSON());
-               
-               $this->assertEquals($user, $userCopy);
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPAPIServiceTest.php
deleted file mode 100644 (file)
index 4d7cca9..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-use PayPal\Core\PPAPIService;
-/**
- * Test class for PPAPIService.
- *
- */
-class PPAPIServiceTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPAPIService
-     */
-    protected $object;
-    
-    private $config = array(
-               'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
-               'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
-               'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
-               'acct1.AppId' =>        'APP-80W284485P519543T' ,
-               'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
-               'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
-               'acct2.CertPath' =>     'cert_key.pem'  ,
-               'acct2.AppId' =>        'APP-80W284485P519543T' ,
-               'http.ConnectionTimeOut' =>     '30'    ,
-               'http.Retry' =>         '5'     ,
-               'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
-               'service.DevCentralURL' => 'https://developer.paypal.com'       ,
-               'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
-               'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
-               'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
-               'log.FileName' => 'PayPal1.log' ,
-               'log.LogLevel' =>       'INFO'  ,
-               'log.LogEnabled' =>     '1'     ,
-    
-    
-    );
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPAPIService(null,'AdaptiveAccounts', 'SOAP', null, $this->config);
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testSetServiceName()
-    {  
-       $this->assertEquals('AdaptiveAccounts',$this->object->serviceName);
-       $this->object->setServiceName('Invoice');
-        $this->assertEquals('Invoice',$this->object->serviceName);
-    }
-
-    /**
-     * @test
-     */
-    public function testMakeRequest()
-    {
-
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBaseServiceTest.php
deleted file mode 100644 (file)
index 0b2b592..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-use PayPal\Core\PPBaseService;
-/**
- * Test class for PPBaseService.
- *
- */
-class PPBaseServiceTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPBaseService
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPBaseService('serviceName', 'serviceBinding', null);
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testGetServiceName()
-    {
-        $this->assertEquals('serviceName',$this->object->getServiceName() );
-    }
-
-
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPBootStrap.php
deleted file mode 100644 (file)
index dd5d70f..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-/**
- * Please run composer update from the root folder to run test cases
- */
-
-if(file_exists(dirname(__FILE__) . '/../PPBootstrap.php')) {
-    require dirname(__FILE__) . '/../PPBootstrap.php';
-} else if(file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
-       define('PP_CONFIG_PATH', dirname(__FILE__));
-    require dirname(__FILE__) . '/../vendor/autoload.php';
-}
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCertificateCredentialTest.php
deleted file mode 100644 (file)
index 6716e40..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-use PayPal\Auth\PPCertificateCredential;
-use PayPal\Exception\PPMissingCredentialException;
-/**
- * Test class for PPCertificateCredential.
- *
- */
-class PPCertificateCredentialTest extends \PHPUnit_Framework_TestCase
-{
-       /**
-        * @var PPCertificateCredential
-        */
-       protected $credential;
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-               $this->credential = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
-               $this->credential->setApplicationId('APP-80W284485P519543T');
-       }
-
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-
-       /**@test
-        */
-       public function testValidateUname()
-       {
-               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
-               $credUname = new PPCertificateCredential("", "1255077037", "cacert.pem");
-               $credUname->validate();
-               $setNotExpectedException('PPMissingCredentialException');
-               $credCorrect = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
-               $var = $credCorrect->validate();
-               $this->assertNull($var);
-       }
-       /**
-        * @test
-        */
-       public function testValidatePwd()
-       {
-               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
-               $credpwd = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "", "cacert.pem");
-               $credpwd->validate();
-
-       }
-       /**
-        * @test
-        */
-       public function testValidateCertPath()
-       {
-               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
-               $credCertPath = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "");
-               $credCertPath->validate();
-       }
-       /**
-        * @test
-        */
-       public function testGetAppId()
-       {
-               $credAppid = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "cacert.pem");
-               $credAppid->setApplicationId("APP-ID");
-               $this->assertEquals($credAppid->getApplicationId(), "APP-ID");
-       }
-
-       /**
-        * @test
-        */
-       public function testGetUserName()
-       {
-               $this->assertEquals('platfo_1255077030_biz_api1.gmail.com', $this->credential->getUserName());
-
-       }
-
-       /**
-        * @test
-        */
-       public function testGetPassword()
-       {
-               $this->assertEquals('1255077037', $this->credential->getPassword());
-       }
-
-       /**
-        * @test
-        */
-       public function testGetCertificatePath()
-       {
-               $this->assertStringEndsWith(dirname(__FILE__). DIRECTORY_SEPARATOR .'cacert.pem', $this->credential->getCertificatePath());
-       }
-
-       /**@test
-        */
-       public function testGetApplicationId()
-       {
-               $this->assertEquals('APP-80W284485P519543T', $this->credential->getApplicationId());
-       }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigManagerTest.php
deleted file mode 100644 (file)
index eda5d38..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-use PayPal\Core\PPConfigManager;
-/**
- * Test class for PPConfigManager.
- *
- */
-class PPConfigManagerTest extends \PHPUnit_Framework_TestCase
-{
-       /**
-        * @var PPConfigManager
-        */
-       protected $object;
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-               $this->object = PPConfigManager::getInstance();
-       }
-
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-
-
-
-       /**
-        * @test
-        */
-       public function testGetInstance()
-       {
-               $instance = $this->object->getInstance();
-               $this->assertTrue($instance instanceof PPConfigManager);
-       }
-
-       /**
-        * @test
-        */
-       public function testGetIniPrefix()
-       {
-               $ret = $this->object->getIniPrefix();
-               $this->assertContains('acct1', $ret);
-               $this->assertEquals(sizeof($ret), 2);
-               
-               $ret = $this->object->getIniPrefix('jb-us-seller_api1.paypal.com');
-               $this->assertEquals('acct1', $ret);
-       }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConfigurationExceptionTest.php
deleted file mode 100644 (file)
index 420cd11..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-use PayPal\Exception\PPConfigurationException;
-/**
- * Test class for PPConfigurationException.
- *
- */
-class PPConfigurationExceptionTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPConfigurationException
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPConfigurationException('Test PPConfigurationException');
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-    public function testPPConfigurationException()
-    {
-       $this->setExpectedException('PayPal\Exception\PPConfigurationException');
-       throw new PPConfigurationException('Test PPConfigurationException');
-
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionExceptionTest.php
deleted file mode 100644 (file)
index d01550a..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-use PayPal\Exception\PPConnectionException;
-/**
- * Test class for PPConnectionException.
- *
- */
-class PPConnectionExceptionTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPConnectionException
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPConnectionException('http://testURL', 'test message');
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testGetUrl()
-    {
-       $this->assertEquals('http://testURL',$this->object->getUrl());
-    }
-    /**
-     * @test
-     */
- public function testPPConnectionException()
-    {
-       $this->setExpectedException('PayPal\Exception\PPConnectionException');
-       throw new PPConnectionException('http://testURL','Test msg PPConnectionException');
-       
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPConnectionManagerTest.php
deleted file mode 100644 (file)
index 999c464..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-use PayPal\Core\PPConnectionManager;
-use PayPal\Core\PPHttpConnection;
-use PayPal\Core\PPHttpConfig;
-/**
- * Test class for PPConnectionManager.
- *
- */
-class PPConnectionManagerTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPConnectionManager
-     */
-    protected $object;
-    
-    private $config = array(
-               'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
-               'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
-               'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
-               'acct1.AppId' =>        'APP-80W284485P519543T' ,
-               'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
-               'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
-               'acct2.CertPath' =>     'cert_key.pem'  ,
-               'acct2.AppId' =>        'APP-80W284485P519543T' ,
-               'http.ConnectionTimeOut' =>     '30'    ,
-               'http.Retry' =>         '5'     ,
-               'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
-               'service.DevCentralURL' => 'https://developer.paypal.com'       ,
-               'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
-               'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
-               'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
-               'log.FileName' => 'PayPal1.log' ,
-               'log.LogLevel' =>       'INFO'  ,
-               'log.LogEnabled' =>     '1'     ,
-    
-    
-    );
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object =  PPConnectionManager::getInstance();
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testGetInstance()
-    {
-        $instance = $this->object->getInstance();
-               $this->assertTrue($instance instanceof PPConnectionManager);
-    }
-
-    /**
-     * @test
-     */
-    public function testGetConnection()
-    {
-        $conn = $this->object->getConnection(new PPHttpConfig("http://domain.com"), $this->config);
-        $this->assertNotNull($conn);
-        $this->assertTrue($conn instanceof PPHttpConnection);
-        $this->assertEquals(get_class($conn), "PayPal\Core\PPHttpConnection");
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPCredentialManagerTest.php
deleted file mode 100644 (file)
index 81cf5c8..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-use PayPal\Core\PPCredentialManager;
-/**
- * Test class for PPCredentialManager.
- *
- */
-class PPCredentialManagerTest extends \PHPUnit_Framework_TestCase
-{
-       /**
-        * @var PPCredentialManager
-        */
-       protected $object;
-
-       private $config = array(
-                       'acct1.UserName' => 'jb-us-seller_api1.paypal.com'      ,
-                       'acct1.Password' => 'WX4WTU3S8MY44S7F'  ,
-                       'acct1.Signature' =>    'AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy'      ,
-                       'acct1.AppId' =>        'APP-80W284485P519543T' ,
-                       'acct2.UserName' =>     'certuser_biz_api1.paypal.com'  ,
-                       'acct2.Password' =>     'D6JNKKULHN3G5B8A'      ,
-                       'acct2.CertPath' =>     'cert_key.pem'  ,
-                       'acct2.AppId' =>        'APP-80W284485P519543T' ,
-                       'http.ConnectionTimeOut' =>     '30'    ,
-                       'http.Retry' =>         '5'     ,
-                       'service.RedirectURL' =>        'https://www.sandbox.paypal.com/webscr&cmd='    ,
-                       'service.DevCentralURL' => 'https://developer.paypal.com'       ,
-                       'service.EndPoint.IPN' => 'https://www.sandbox.paypal.com/cgi-bin/webscr'       ,
-                       'service.EndPoint.AdaptivePayments' => 'https://svcs.sandbox.paypal.com/'       ,
-                       'service.SandboxEmailAddress' => 'platform_sdk_seller@gmail.com',
-                       'log.FileName' => 'PayPal1.log' ,
-                       'log.LogLevel' =>       'INFO'  ,
-                       'log.LogEnabled' =>     '1'     ,
-       
-       
-       );
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-               $this->object = PPCredentialManager::getInstance($this->config);
-       }
-
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-
-       /**
-        * @test
-        */
-       public function testGetInstance()
-       {
-               $instance = $this->object->getInstance($this->config);
-               $this->assertTrue($instance instanceof PPCredentialManager);
-       }
-
-       /**
-        * @test
-        */
-       public function testGetSpecificCredentialObject()
-       {
-               $cred = $this->object->getCredentialObject('jb-us-seller_api1.paypal.com');
-               $this->assertNotNull($cred);
-               $this->assertEquals('jb-us-seller_api1.paypal.com', $cred->getUsername());
-               
-               $cred = $this->object->getCredentialObject('certuser_biz_api1.paypal.com');
-               $this->assertNotNull($cred);
-               $this->assertEquals('certuser_biz_api1.paypal.com', $cred->getUsername());
-               $this->assertStringEndsWith('cert_key.pem', $cred->getCertificatePath());               
-       }
-       
-       /**
-        * @test
-        */
-       public function testGetInvalidCredentialObject()
-       {
-               $this->setExpectedException('PayPal\Exception\PPInvalidCredentialException');
-               $cred = $this->object->getCredentialObject('invalid_biz_api1.gmail.com');
-       }
-               
-       /**
-        * @test
-        */
-       public function testGetDefaultCredentialObject()
-       {
-               $cred = $this->object->getCredentialObject();
-               $this->assertEquals('jb-us-seller_api1.paypal.com', $cred->getUsername());
-       }       
-       
-       /**
-        * @test
-        */
-       public function testGetPlatformCredentialObject()
-       {
-               $cred = $this->object->getCredentialObject();
-               $this->assertEquals('APP-80W284485P519543T', $cred->getApplicationId());
-       }       
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPIPNMessageTest.php
deleted file mode 100644 (file)
index 9da5007..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-use PayPal\IPN\PPIPNMessage;
-/**
- * Test class for PPIPNMessage.
- *
- */
-class PPIPNMessageTest extends \PHPUnit_Framework_TestCase {
-       /**
-        * @test
-        */
-       
-       public function passGoodIPN() {
-               
-       }
-       
-       
-       /**
-        * @test
-        */
-       
-       public function failOnBadIPN() {
-               $ipn = new PPIPNMessage();
-               $this->assertEquals(false, $ipn->validate());
-       }
-       
-       
-       /**
-        * @test
-        */
-       
-       public function processIPNWithArrayElements() {
-               $ipnData = 'transaction[0].id=6WM123443434&transaction[0].status=Completed&transaction[1].id=2F12129812A1&transaction[1].status=Pending';
-               $ipn = new PPIPNMessage($ipnData);
-               
-               $rawData = $ipn->getRawData();
-               $this->assertEquals(4, count($rawData));
-               $this->assertEquals('6WM123443434', $rawData['transaction[0].id']);
-       }
-       
-       /**
-        * @test
-        */     
-       public function processIPNWithSpecialCharacters() {
-               $ipnData = "description=Jake's store";
-               
-               ini_set('get_magic_quotes_gpc', true);
-               $ipn = new PPIPNMessage($ipnData);
-               $rawData = $ipn->getRawData();          
-               $this->assertEquals($rawData['description'], "Jake's store");
-               
-               ini_set('get_magic_quotes_gpc', false);
-               $ipn = new PPIPNMessage($ipnData);
-               $rawData = $ipn->getRawData();
-               $this->assertEquals($rawData['description'], "Jake's store");
-               $this->assertEquals($rawData['description'], "Jake's store");
-       }
-       
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPInvalidCredentialExceptionTest.php
deleted file mode 100644 (file)
index 7ed7c5a..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-use PayPal\Exception\PPInvalidCredentialException;
-/**
- * Test class for PPInvalidCredentialException.
- *
- */
-class PPInvalidCredentialExceptionTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPInvalidCredentialException
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPInvalidCredentialException;
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testErrorMessage()
-    {
-      $msg = $this->object->errorMessage();
-      $this->assertContains('Error on line', $msg);
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPLoggingManagerTest.php
deleted file mode 100644 (file)
index 5285ed8..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-use PayPal\Core\PPLoggingManager;
-/**
- * Test class for PPLoggingManager.
- *
- */
-class PPLoggingManagerTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPLoggingManager
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPLoggingManager('InvoiceTest');
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testError()
-    {
-        $this->object->error('Test Error Message');
-
-    }
-
-    /**
-     * @test
-     */
-    public function testWarning()
-    {
-         $this->object->warning('Test Warning Message');
-    }
-
-    /**
-     * @test
-     */
-    public function testInfo()
-    {
-        $this->object->info('Test info Message');
-    }
-
-    /**
-     * @test
-     */
-    public function testFine()
-    {
-       $this->object->fine('Test fine Message');
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMessageTest.php
deleted file mode 100644 (file)
index 8f29a7f..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-<?php
-use PayPal\Core\PPMessage;
-use PayPal\Core\PPUtils;
-
-class SimpleTestClass extends PPMessage {
-       /**
-        *
-        * @access public
-        * @var string
-        */
-       public $field1;
-       
-       /**
-        *
-        * @access public
-        * @var string
-        */
-       public $field2;
-}
-
-class SimpleContainerTestClass extends PPMessage {
-       
-       /**
-        * @access public
-        * @var string
-        */
-       public $field1;
-       
-       /**
-        * @array
-        * @access public
-        * @var string
-        */
-       public $list1;
-       
-       /**
-        * @array
-        * @access public
-        * @var SimpleTestClass
-        */
-       public $list2;
-       
-       /**
-        * @array
-        * @access public
-        * @var AttributeTestClass
-        */
-       public $list3;
-       
-       /**
-        * @access public
-        * @var SimpleTestClass
-        */
-       public $nestedField;
-}
-
-class AttributeTestClass extends PPMessage {
-       
-       /**
-        *
-        * @access public
-        * @attribute
-        * @var string
-        */
-       public $attrib1;
-
-       /**
-        *
-        * @access public
-        * @attribute
-        * @var string
-        */
-       public $attrib2;
-       
-       /**
-        *
-        * @access public
-        * @value
-        * @var string
-        */
-       public $value;
-       
-}
-
-/**
- * @hasAttribute
- *
- */
-class AttributeContainerTestClass extends PPMessage {
-       /**
-        *
-        * @access public
-        * @var AttributeTestClass
-        */
-       public $member;
-       
-               /**
-        * 
-     * @array
-        * @access public
-        * @var AttributeTestClass
-        */ 
-       public $arrayMember;
-
-}
-
-
-/**
- * Test class for PPMessage.
- *
- */
-class PPMessageTest extends PHPUnit_Framework_TestCase
-{
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp() {
-               
-       }
-       
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown() {
-       }
-       
-       /**
-        * @test
-        */
-       public function attributeSerialization() {
-               $o = new AttributeTestClass();
-               $o->attrib1 = "abc";
-               $o->attrib2 = "random value";
-               $c = new AttributeContainerTestClass();
-               $c->member = $o;
-               
-               $this->assertEquals("attrib1=abc&attrib2=random+value", $o->toNVPString());             
-               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value", $c->toNVPString());               
-               
-               $o->value = "value";
-               $this->assertEquals("attrib1=abc&attrib2=random+value&=value", $o->toNVPString());
-               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value", $c->toNVPString());
-
-                               
-       }
-       
-       /**
-        * @test
-        */
-       public function attributeSerializationInArrays() {
-               $o = new AttributeTestClass();
-               $o->attrib1 = "abc";
-               $o->attrib2 = "random value";
-               $o->value = "value";
-               
-               $c = new AttributeContainerTestClass();
-               $c->member = $o;
-               
-               $o = new AttributeTestClass();
-               $o->attrib1 = "abc";
-               $o->attrib2 = "random value";
-               $c->arrayMember = array($o);
-               
-               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value&arrayMember(0).attrib1=abc&arrayMember(0).attrib2=random+value", 
-                               $c->toNVPString());
-               
-               $c->arrayMember[0]->value = "value";
-               $this->assertEquals("member.attrib1=abc&member.attrib2=random+value&member=value&arrayMember(0).attrib1=abc&arrayMember(0).attrib2=random+value&arrayMember(0)=value",
-                               $c->toNVPString());
-               
-       }
-       
-       /**
-        * @test
-        */
-       public function attributeDeserialization() {
-               
-               // Attributes and value present
-               $responseMap = array(
-                       "member.attrib1" => "abc",
-                       "member.attrib2" => "random+value",
-                       "member" => "value"
-               );      
-               $c = new AttributeContainerTestClass();
-               $c->init($responseMap);
-               
-               $this->assertNotNull($c->member);
-               $this->assertEquals("abc", $c->member->attrib1);
-               $this->assertEquals("random value", $c->member->attrib2);
-               $this->assertEquals("value", $c->member->value);
-
-               // Only value present           
-               $responseMap = array(
-                       "member" => "value"
-               );              
-               $c = new AttributeContainerTestClass();
-               $c->init($responseMap);
-               
-               $this->assertNotNull($c->member);
-               $this->assertEquals("value", $c->member->value);
-               
-
-               // Only attributes present              
-               $responseMap = array(
-                       "member.attrib1" => "abc",
-                       "member.attrib2" => "random+value"
-               );
-               $c = new AttributeContainerTestClass();
-               $c->init($responseMap);
-               
-               $this->assertNotNull($c->member);
-               $this->assertEquals("abc", $c->member->attrib1);
-               $this->assertEquals("random value", $c->member->attrib2);               
-       
-       }
-       
-       /**
-        * @test
-        */
-       public function attributeDeserializationInArrays() {
-       
-               // Only value present. Single item in list
-               $responseMap = array(
-                               "arrayMember(0)" => "value+1"
-               );
-               $c = new AttributeContainerTestClass();
-               $c->init($responseMap);
-               $this->assertNotNull($c->arrayMember[0]);
-               $this->assertEquals("value 1", $c->arrayMember[0]->value);
-               
-               
-               // Only attributes present. Single item in list
-               $responseMap = array(
-                       "arrayMember(0).attrib1" => "abc",
-                       "arrayMember(0).attrib2" => "random+value",                             
-               );
-               $c = new AttributeContainerTestClass();
-               $c->init($responseMap);
-               
-               $this->assertNotNull($c->arrayMember[0]);
-               $this->assertEquals("abc", $c->arrayMember[0]->attrib1);
-               $this->assertEquals("random value", $c->arrayMember[0]->attrib2);               
-               
-               
-               // Attributes and value present. Mulitple items in list
-               $responseMap = array(
-                       "arrayMember(0).attrib1" => "abc",
-                       "arrayMember(0).attrib2" => "random+value",
-                       "arrayMember(0)" => "value",
-                       "arrayMember(0).attrib1" => "xyz",
-                       "arrayMember(1).attrib1" => "attribute1"
-               );
-               $c->init($responseMap);
-
-               $this->assertEquals("value", $c->arrayMember[0]->value);
-               $this->assertEquals("xyz", $c->arrayMember[0]->attrib1);
-               $this->assertEquals("random value", $c->arrayMember[0]->attrib2);
-               
-               $this->assertEquals("attribute1", $c->arrayMember[1]->attrib1);
-               $this->assertNull($c->arrayMember[1]->value);
-               
-       }
-
-
-       /**
-        * @test
-        */
-       public function simpleSerialization() {
-               
-               $o = new SimpleTestClass();
-               $o->field1 = "fieldvalue1";
-               $o->field2 = "fieldvalue2";
-               
-               $this->assertEquals("field1=fieldvalue1&field2=fieldvalue2", $o->toNVPString(''));
-       }
-       
-       
-       /**
-        * @test
-        */
-       public function simpleDeserialization() {
-       
-               $map = array(
-                       "field1" => "fieldvalue1",
-                       "field2" => "field+value2"
-               );
-               $o = new SimpleTestClass();
-               $o->init($map);
-       
-               $this->assertEquals("fieldvalue1", $o->field1);
-               $this->assertEquals("field value2", $o->field2);
-       }
-       
-       
-       /**
-        * @test
-        */
-       public function nestedSerialization() {
-       
-               $o = new SimpleTestClass();
-               $o->field1 = "fieldvalue1";
-               $o->field2 = "fieldvalue2";
-       
-               $c = new SimpleContainerTestClass();
-               $c->nestedField = $o;
-               $c->field1 = "abc";
-       
-               $this->assertEquals("field1=abc&nestedField.field1=fieldvalue1&nestedField.field2=fieldvalue2", $c->toNVPString(''));
-       }
-
-       
-       /**
-        * @test
-        */
-       public function nestedDeserialization() {
-               
-               $map = array(
-                       "field1" => "abc",
-                       "nestedField.field1" => "fieldvalue1",
-                       "nestedField.field2" => "field+value2"
-               );
-       
-               $c = new SimpleContainerTestClass();
-               $c->init($map);
-
-               $this->assertEquals("abc", $c->field1);
-               $this->assertEquals("fieldvalue1", $c->nestedField->field1);
-               $this->assertEquals("field value2", $c->nestedField->field2);
-       }
-       
-       
-       /**
-        * @test
-        */
-       public function simpleListSerialization() {
-       
-               $c = new SimpleContainerTestClass();
-               $c->list1 = array('Array', "of", "some strings");
-               $c->field1 = "abc";
-       
-               $this->assertEquals("field1=abc&list1(0)=Array&list1(1)=of&list1(2)=some+strings", $c->toNVPString(''));
-       }
-       
-       /**
-        * @test
-        */
-       public function simpleListDeserialization() {
-       
-               $map = array(
-                       "field1" => "abc",
-                       "list1(0)" => "Array",
-                       "list1(1)" => "of",
-                       "list1(2)" => "some+strings"
-               );
-                               
-               $c = new SimpleContainerTestClass();
-               $c->init($map);
-       
-               $this->assertEquals("abc", $c->field1);
-               $this->assertEquals(3, count($c->list1));
-               $this->assertEquals("some strings", $c->list1[2]);
-       }
-       
-       /**
-        * @test
-        */
-       public function complexListSerialization() {
-       
-               $o1 = new SimpleTestClass();
-               $o1->field1 = "somevalue1";
-               $o1->field2 = "somevalue2";
-       
-               $o2 = new SimpleTestClass();
-               $o2->field1 = "another value1";
-               $o2->field2 = "anothervalue2";
-               
-               $c = new SimpleContainerTestClass();
-               $c->list2 = array($o1, $o2);
-       
-               $this->assertEquals("list2(0).field1=somevalue1&list2(0).field2=somevalue2&list2(1).field1=another+value1&list2(1).field2=anothervalue2", 
-                               $c->toNVPString(''));
-       }
-       
-       /**
-        * @test
-        */
-       public function complexListDeserialization() {
-               
-               $map = array(
-                       "list2(0).field1" => "somevalue1",
-                       "list2(0).field2" => "somevalue2",
-                       "list2(1).field1" => "another+value1",
-                       "list2(1).field2" => "anothervalue2"
-               );
-               
-               $c = new SimpleContainerTestClass();
-               $c->init($map);
-       
-               $this->assertEquals(2, count($c->list2));
-               $this->assertEquals("somevalue1", $c->list2[0]->field1);
-               $this->assertEquals("another value1", $c->list2[1]->field1);
-       }
-       
-       
-       /**
-        * @test
-        */
-       public function serializeAndDeserialize() {
-               
-               $o1 = new AttributeTestClass();
-               $o1->value = "some value";
-               $o1->attrib1 = "someattrib";
-               
-               $o2 = new AttributeTestClass();
-               $o2->value = "some value2";
-               
-               $o3 = new AttributeTestClass();
-               $o3->attrib1 = "attribute";
-               $o3->value = "some value3";
-               
-               $c = new SimpleContainerTestClass();
-               $c->list3 = array($o1, $o2, $o3);
-               
-               $newC = new SimpleContainerTestClass();
-               $newC->init(PPUtils::nvpToMap($c->toNVPString(''))); //TODO: Mock nvpToMap
-               
-               $this->assertEquals($c, $newC);
-       }
-
-       /**
-        * @test
-        */
-       public function deserializeAndSerialize() {             
-               $nvpString = "list2(0).field1=somevalue1&list2(0).field2=somevalue2&list2(1).field1=another+value1&list2(1).field2=anothervalue2&list3(0).attrib1=somevalue1&list3(0).attrib2=somevalue2&list3(0)=value+field&list3(1).attrib1=another+value1&list3(2)=anothervalue2";
-               $newC = new SimpleContainerTestClass();
-               $newC->init(PPUtils::nvpToMap($nvpString)); //TODO: Mock nvpToMap               
-               $this->assertEquals($nvpString, $newC->toNVPString());
-       }
-}
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPMissingCredentialExceptionTest.php
deleted file mode 100644 (file)
index ec8e752..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-use PayPal\Exception\PPMissingCredentialException;
-
-/**
- * Test class for PPMissingCredentialException.
- *
- */
-class PPMissingCredentialExceptionTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPMissingCredentialException
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPMissingCredentialException;
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testErrorMessage()
-    {
-               $msg = $this->object->errorMessage();
-               $this->assertContains('Error on line', $msg);
-    }
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPSignatureCredentialTest.php
deleted file mode 100644 (file)
index 2d48a9d..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-use PayPal\Auth\PPSignatureCredential;
-use PayPal\Auth\PPTokenAuthorization;
-use PayPal\Auth\PPSubjectAuthorization;
-/**
- * Test class for PPSignatureCredential.
- *
- */
-class PPSignatureCredentialTest extends PHPUnit_Framework_TestCase
-{
-       /**
-        * @var PPSignatureCredential
-        */
-       protected $merchantCredential;
-
-       protected $platformCredential;
-
-       /**
-        * Sets up the fixture, for example, opens a network connection.
-        * This method is called before a test is executed.
-        */
-       protected function setUp()
-       {
-               $this->merchantCredential = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
-
-               $this->platformCredential = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
-               $this->platformCredential->setApplicationId("APP-80W284485P519543T");
-       }
-
-       /**
-        * Tears down the fixture, for example, closes a network connection.
-        * This method is called after a test is executed.
-        */
-       protected function tearDown()
-       {
-       }
-
-       /**
-        * @test
-        */
-       public function testValidateUsername()
-       {
-               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
-               $cred = new PPSignatureCredential("", "1255077037","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
-               $cred->validate();
-       }
-
-       /**
-        * @test
-        */
-       public function testValidatepwd()
-       {
-               $this->setExpectedException('PayPal\Exception\PPMissingCredentialException');
-               $cred = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "","Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
-               $cred->validate();
-       }
-
-       /**
-        * @test
-        */
-       public function testGetSignature()
-       {
-               $this->assertEquals('Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf', $this->merchantCredential->getSignature());
-       }
-       /**
-        * @test
-        */
-       public function testGetUserName()
-       {
-               $this->assertEquals('platfo_1255077030_biz_api1.gmail.com', $this->merchantCredential->getUserName());
-       }
-       /**
-        * @test
-        */
-       public function testGetPassword()
-       {
-               $this->assertEquals('1255077037', $this->merchantCredential->getPassword());
-       }
-       /**
-        * @test
-        */
-       public function testGetAppId()
-       {
-               $this->assertEquals('APP-80W284485P519543T', $this->platformCredential->getApplicationId());
-       }
-       
-       public function testThirdPartyAuthorization() {
-               $authorizerEmail = "merchant@domain.com";
-               $thirdPartyAuth = new PPSubjectAuthorization($authorizerEmail);         
-               $cred = new PPSignatureCredential("username", "pwd", "signature");
-               $cred->setThirdPartyAuthorization($thirdPartyAuth);             
-               $this->assertEquals($cred->getThirdPartyAuthorization()->getSubject(), $authorizerEmail);
-               
-               $accessToken = "atoken";
-               $tokenSecret = "asecret";
-               $thirdPartyAuth = new PPTokenAuthorization($accessToken, $tokenSecret);
-               $cred->setThirdPartyAuthorization($thirdPartyAuth);
-               $this->assertEquals($cred->getThirdPartyAuthorization()->getAccessToken(), $accessToken);
-               $this->assertEquals($cred->getThirdPartyAuthorization()->getTokenSecret(), $tokenSecret);
-       }
-
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/PPUtilsTest.php
deleted file mode 100644 (file)
index 7ad664d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-use PayPal\Core\PPUtils;
-/**
- * Test class for PPUtils.
- *
- */
-class PPUtilsTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var PPUtils
-     */
-    protected $object;
-
-    /**
-     * Sets up the fixture, for example, opens a network connection.
-     * This method is called before a test is executed.
-     */
-    protected function setUp()
-    {
-        $this->object = new PPUtils();
-    }
-
-    /**
-     * Tears down the fixture, for example, closes a network connection.
-     * This method is called after a test is executed.
-     */
-    protected function tearDown()
-    {
-    }
-
-    /**
-     * @test
-     */
-    public function testNvpToMap()
-    {
-       $arr = $this->object->nvpToMap('requestEnvelope.detailLevel=ReturnAll&requestEnvelope.errorLanguage=en_US&invoice.merchantEmail=jb-us-seller1@paypal.com&invoice.payerEmail=jbui-us-personal1@paypal.com&invoice.items[0].name=product1&invoice.items[0].quantity=10.0&invoice.items[0].unitPrice=1.2&invoice.currencyCode=USD&invoice.paymentTerms=DueOnReceipt');
-       $this->assertArrayHasKey('requestEnvelope.detailLevel', $arr);
-       $this->assertArrayHasKey('requestEnvelope.errorLanguage', $arr);
-       $this->assertEquals(is_array($arr),true);
-    }
-
-    /**
-     * @test
-     */
-    public function testArray_match_key()
-    {
-       $arr = array('key1' => 'somevalue', 'key2' => 'someothervalue');
-               $this->assertEquals(PPUtils::array_match_key($arr, "key"), true);
-               $arr = unserialize('a:10:{s:26:"responseEnvelope.timestamp";s:35:"2011-04-19T04%3A32%3A29.469-07%3A00";s:20:"responseEnvelope.ack";s:7:"Failure";s:30:"responseEnvelope.correlationId";s:13:"c2514f258ddf1";s:22:"responseEnvelope.build";s:7:"1829457";s:16:"error(0).errorId";s:6:"580027";s:15:"error(0).domain";s:8:"PLATFORM";s:17:"error(0).severity";s:5:"Error";s:17:"error(0).category";s:11:"Application";s:16:"error(0).message";s:44:"Prohibited+request+parameter%3A+businessInfo";s:21:"error(0).parameter(0)";s:12:"businessInfo";}');
-               $this->assertEquals(PPUtils::array_match_key($arr, "error(0)."), true);
-    }
-
-    /**
-     * @test
-     */
-    public function testGetLocalIPAddress()
-    {
-        $ip = $this->object->getLocalIPAddress();
-        //$this->assertEquals('127.0.0.1',$ip);
-    }
-
-}
-?>
diff --git a/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini b/lib/paymentProcessors/PayPal/paypal-API-Not_sure_if_will_use/sdk-core-php/tests/sdk_config.ini
deleted file mode 100644 (file)
index 37e11b4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-;Account credentials
-[Account]
-
-acct1.ClientId = ProxyRP-01
-acct1.ClientSecret = A8VERY8SECRET8VALUE0   
-acct1.UserName = jb-us-seller_api1.paypal.com
-acct1.Password = WX4WTU3S8MY44S7F
-acct1.Signature = AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy
-acct1.AppId = APP-80W284485P519543T
-# Subject is optional and is required only in case of third party authorization 
-acct1.Subject = 
-
-; Certificate Credentials Test Account
-acct2.UserName = platfo_1255170694_biz_api1.gmail.com
-acct2.Password = 2DPPKUPKB7DQLXNR
-; Certificate path relative to config folder or absolute path in file system
-acct2.CertPath = cacert.pem
-
-
-;Connection Information
-[Http]
-http.ConnectionTimeOut = 30
-http.Retry = 5
-;http.Proxy
-
-;Logging Information
-[Log]
-log.FileName=../PayPal.log
-log.LogLevel=INFO
-log.LogEnabled=true
-
-mode = sandbox
\ No newline at end of file
diff --git a/lib/paymentProcessors/PayPal/test.php b/lib/paymentProcessors/PayPal/test.php
deleted file mode 100755 (executable)
index dc78ca5..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-define('PAYPAL_DEBUG', true);
-
-// Setup some info that will be provided by the cart application
-$thisScript = 'http://'.$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
-$account = array(
-               'clientID' => 'AY2IlhCAFCgTaYSgrGfBQ0h5WKKgpLwU-jd2QkKsEbDpGEWtCDZKtp2VLhu1',
-               'secret' => 'EOWLsBDrkvdOKUlfhAKJ47aXHBr5xzw-2o7JdLCcLVciGqNGXlhMayP1WKhe',
-               'returnURL' => $thisScript.'?PayPalAction=Approved',
-               'cancelURL' => $thisScript.'?PayPalAction=Canceled',
-               'test' => 3
-);
-$payment = array(
-               'name' => 'Gaslight Media',
-               'charge' =>  22.4,
-               'invoice' => '123abc',
-               'description' => 'Event Tickets Purchase',
-               'items' => array(
-                               array(
-                                               'quantity' => '2',
-                                               'name' => 'Fancy Dancy Dance',
-                                               'price' => 5.6,
-                                               'sku' => '123ABC1'
-                               ),
-                               array(
-                                               'quantity' => '1',
-                                               'name' => 'TuTu Tango',
-                                               'price' => 11.2,
-                                               'sku' => '123ABC2'
-                               )
-               )
-);
-$contact = array();
-
-// Load the PayPal class file
-require_once dirname(__FILE__).'/PayPal.php';
-
-// Start session
-session_start();
-
-
-// Check for certain actions related to sending user to PayPal site for approval
-switch ($_REQUEST['PayPalAction']) {
-
-       case 'GetApproval':
-
-               // Use browser redirect 302 to send user to PayPal.
-               // This is proper way to do so according to the API documentation.
-               $trans = $_SESSION['trans'];
-               header('Location: '.$trans->urls->approval_url->href);
-               exit;
-
-               break;
-
-       case 'Approved':
-
-               echo "Return link followed.<P>";
-
-               // Save Payer ID
-               $_SESSION['payerID'] = $_REQUEST['PayerID']; // NEED TO FILTER THIS FOR PRODUCTION
-
-               // Create PayPal object with existing access object from the session
-               $PayPal = new PaymentGateway($account, $_SESSION['access'], $_SESSION['trans']);
-
-               // Execute the PayPal payment
-               $r = $PayPal->executePayment($_SESSION['payerID']);
-
-               echo "Payment Executed Successfully<P>";
-
-               exit;
-
-               break;
-
-       case 'Canceled':
-
-               echo "Payment Cancelled<P>";
-               exit;
-
-               break;
-}
-
-// Create the PayPal object (note no previous access object)
-$PayPal = new PaymentGateway($account, false, false);
-
-// Was there an error?
-if (!$PayPal->status) {
-       echo "Received an error: ".$PayPal->error;
-       exit;
-}
-
-// Store access information
-$_SESSION['access'] = $PayPal->access;
-
-// Try to enter Payment
-$PayPal->processPayment($payment, $contact);
-
-// Was there an error?
-if (!$PayPal->status) {
-       echo "Received an error: ".$PayPal->error;
-       exit;
-}
-
-// Store Transaction data to session
-$_SESSION['trans'] = $PayPal->trans;
-
-// Show user link to PayPal for them to approve payment
-// Note that uses a target to create a new window/tab
-echo '<a href="'.$this_script.'?PayPalAction=GetApproval" target="PayPal">Proceed to PayPal</a>';
-
-?>
\ No newline at end of file
index d6849a8..9c50d9d 100644 (file)
@@ -12,7 +12,7 @@
  * TestGood
  * TestByCardNumber
  */
-$paymentProcessor = "Authorize.Net";            // Required
+$paymentProcessor = "Authorize.net";            // Required
 
 /**
  * Test settings
@@ -22,7 +22,7 @@ $paymentProcessor = "Authorize.Net";            // Required
  * 2 = Always decline
  * 3 = On-line Transaction Test (SANDBOX)
  */
-$testMode = 3;                                  // Required
+$testMode = 6;                                  // Required
 
 /**
  * Transaction Options