<?php
namespace Srmklive\PayPal\Traits\PayPalAPI;
use Srmklive\PayPal\Traits\PayPalAPI\InvoiceSearch\Filters;
trait InvoicesSearch
{
use Filters;
/**
* Search and return existing invoices.
*
* @throws \Throwable
*
* @return array|\Psr\Http\Message\StreamInterface|string
*
* @see https://developer.paypal.com/docs/api/invoicing/v2/#invoices_list
*/
public function searchInvoices()
{
if (collect($this->invoice_search_filters)->count() < 1) {
$this->invoice_search_filters = [
'currency_code' => $this->getCurrency(),
];
}
$this->apiEndPoint = "v2/invoicing/search-invoices?page={$this->current_page}&page_size={$this->page_size}&total_required={$this->show_totals}";
$this->options['json'] = $this->invoice_search_filters;
$this->verb = 'post';
return $this->doPayPalRequest();
}
}
How To Payment
Making a payment on our website is quick and secure. Start by logging in or creating an account. Select your preferred payment method, input the required details, and review the information. Once you confirm everything is correct, click on the "Submit Payment" button. You’ll receive instant confirmation and can track your payment status through your account dashboard. It’s an easy and secure process.