From 56718be4d9d414dd7b86e41f264aba791a4d99b8 Mon Sep 17 00:00:00 2001 From: tejas Date: Tue, 18 Jun 2019 14:32:39 +0530 Subject: [PATCH] PPL-166 , adjustment to the array for fetching invoice count. --- samples/rest/invoice/ListInvoice.php | 2 +- src/angelleye/PayPal/rest/invoice/InvoiceAPI.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/rest/invoice/ListInvoice.php b/samples/rest/invoice/ListInvoice.php index 05c0d011..8627dab6 100755 --- a/samples/rest/invoice/ListInvoice.php +++ b/samples/rest/invoice/ListInvoice.php @@ -16,7 +16,7 @@ $parameters = array( 'page' => '0', // A zero-relative index of the list of merchant invoices. 'page_size' => '4', // The number of invoices to list beginning with the specified page. - 'total_count_required ' => 'true', // Indicates whether the total count appears in the response. Default is false. + 'total_count_required' => 'true' // Indicates whether the total count appears in the response. Default is false. ); $returnArray = $PayPal->ListInvoice($parameters); diff --git a/src/angelleye/PayPal/rest/invoice/InvoiceAPI.php b/src/angelleye/PayPal/rest/invoice/InvoiceAPI.php index 63bbba9a..0072566f 100755 --- a/src/angelleye/PayPal/rest/invoice/InvoiceAPI.php +++ b/src/angelleye/PayPal/rest/invoice/InvoiceAPI.php @@ -295,7 +295,7 @@ public function ListInvoice($params,$third_party=false,$refesh_token=''){ if($third_party === true && !empty($refesh_token)){ $apiContext->getCredential()->updateAccessToken($apiContext->getConfig(), $refesh_token); } - $invoices = Invoice::getAll(array_filter($params), $this->_api_context); + $invoices = Invoice::getAll($params, $this->_api_context); $returnArray['RESULT'] = 'Success'; $returnArray['INVOICES'] = $invoices->toArray(); return $returnArray;