From 9b4923da2def790f37584e657ee9a38d744457ae Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Mon, 17 Aug 2015 14:29:29 -0500 Subject: [PATCH 1/2] Fixed Failing Unit Tests --- .../Functional/Api/InvoiceFunctionalTest.php | 25 ++++++++++--------- .../InvoiceFunctionalTest/testSend.json | 2 +- .../InvoiceFunctionalTest/testUpdate.json | 4 +-- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php index 01e889cd..3a83a6f5 100644 --- a/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php +++ b/tests/PayPal/Test/Functional/Api/InvoiceFunctionalTest.php @@ -91,18 +91,6 @@ public function testSend($invoice) return $invoice; } - /** - * @depends testSend - * @param $invoice Invoice - * @return Invoice - */ - public function testUpdate($invoice) - { - $result = $invoice->update($this->apiContext, $this->mockPayPalRestCall); - $this->assertNotNull($result); - $this->assertEquals($invoice->getId(), $result->getId()); - } - /** * @depends testSend * @param $invoice Invoice @@ -133,6 +121,19 @@ public function testGetAll($invoice) $this->assertEquals($invoice->getId(), $foundObject->getId()); } + + /** + * @depends testSend + * @param $invoice Invoice + * @return Invoice + */ + public function testUpdate($invoice) + { + $result = $invoice->update($this->apiContext, $this->mockPayPalRestCall); + $this->assertNotNull($result); + $this->assertEquals($invoice->getId(), $result->getId()); + } + /** * @depends testSend * @param $invoice Invoice diff --git a/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json b/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json index c3215178..08b79816 100644 --- a/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json +++ b/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testSend.json @@ -16,7 +16,7 @@ "openIdConnect": {} }, "request": { - "path": "v1/invoicing/invoices/INV2-EHNV-LJ5S-A7DZ-V6NJ/send", + "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7/send", "method": "POST", "headers": { "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" diff --git a/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json b/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json index 1c45eb49..77fa2d05 100644 --- a/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json +++ b/tests/PayPal/Test/Functional/resources/InvoiceFunctionalTest/testUpdate.json @@ -16,7 +16,7 @@ "openIdConnect": {} }, "request": { - "path": "v1/invoicing/invoices/INV2-8UZ6-Q3DK-VZXV-SXQB", + "path": "v1/invoicing/invoices/INV2-RF6D-L66T-D7H2-CRU7", "method": "PUT", "headers": { "X-PAYPAL-SECURITY-CONTEXT": "{\"actor\":{\"auth_claims\":[\"CLIENT_ID_SECRET\"],\"auth_state\":\"LOGGEDIN\",\"account_number\":\"1942617323817135416\",\"encrypted_account_number\":\"6QNCBKP95EWWN\",\"party_id\":\"1942617323817135416\"},\"auth_token\":\"A015vRRfXmgj2UscSiBbwz1Elw8RW.ypMlPJsMH77snr6fc\",\"auth_token_type\":\"ACCESS_TOKEN\",\"last_validated\":1405632568,\"scopes\":[\"openid\",\"https://uri.paypal.com/services/invoicing\",\"https://uri.paypal.com/services/subscriptions\",\"https://api.paypal.com/v1/payments/.*\",\"https://api.paypal.com/v1/vault/credit-card/.*\",\"https://api.paypal.com/v1/vault/credit-card\"],\"client_id\":\"AewC1RCK3i4Z7WTbE0cz5buvd_NW17sYbYI4kc29c5qGxeh-0P7sMuXh2chc\",\"claims\":{\"actor_payer_id\":\"6QNCBKP95EWWN\"},\"subjects\":[]}" @@ -80,7 +80,7 @@ "status": "", "headers": {}, "body": { - "id": "INV2-8UZ6-Q3DK-VZXV-SXQB", + "id": "INV2-RF6D-L66T-D7H2-CRU7", "number": "0014", "status": "DRAFT", "merchant_info": { From fd6801cda18fc1ae29ef913370c1902679410dab Mon Sep 17 00:00:00 2001 From: Jay Patel Date: Mon, 17 Aug 2015 14:32:36 -0500 Subject: [PATCH 2/2] Preparing for 1.5.1 release --- README.md | 2 -- lib/PayPal/Core/PayPalConstants.php | 2 +- release_notes.md | 6 ++++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0fc253f..c1814fcb 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,8 @@ __Welcome to PayPal PHP SDK__. This repository contains PayPal's PHP SDK and sam ## Latest Updates -- Vault APIs now have List Credit Card with Filters, new Fields to help you find the object easily. Checkout the latest release. - Checkout the latest 1.0.0 release. Here are all the [ breaking Changes in v1.0.0 ](https://github.com/paypal/PayPal-PHP-SDK/wiki/Breaking-Changes---1.0.0) if you are migrating from older versions. - Now we have a [Github Page](http://paypal.github.io/PayPal-PHP-SDK/), that helps you find all helpful resources building applications using PayPal-PHP-SDK. -- Introduced `DEBUG` level to logging. Deprecated `FINE`. Ability to restrict `DEBUG` level on `live` mode. [Read More](https://github.com/paypal/PayPal-PHP-SDK/wiki/Logging). ## Prerequisites diff --git a/lib/PayPal/Core/PayPalConstants.php b/lib/PayPal/Core/PayPalConstants.php index 077120ed..eb63ed41 100644 --- a/lib/PayPal/Core/PayPalConstants.php +++ b/lib/PayPal/Core/PayPalConstants.php @@ -12,7 +12,7 @@ class PayPalConstants { const SDK_NAME = 'PayPal-PHP-SDK'; - const SDK_VERSION = '1.5.0'; + const SDK_VERSION = '1.5.1'; /** * Approval URL for Payment diff --git a/release_notes.md b/release_notes.md index c44ce5df..fdc42bd6 100644 --- a/release_notes.md +++ b/release_notes.md @@ -1,5 +1,11 @@ PayPal PHP SDK release notes ============================ +v1.5.1 +---- +* Fixed a bug #343 in Future Payment +* Minor Improvements +* Updates to Sample Docs + v1.5.0 ---- * Enabled Vault List API