src/Web/Service.php
public function setPaymentStatus($token, $paymentStatus, $paymentDate = '')
    {
        if (empty($paymentDate)) {
            $paymentDate = date(API::DateFormat_Iso);
        }
        $message = array(
            'token' => (string) $token,
            'paymentstatus' => (int) $paymentStatus,
            'paymentdate' => (string) $paymentDate,
        );
        return $this->communicator->callApiFunction('invoices/invoice_paymentstatus_set', $message)->setMainResponseKey('invoice');
    }
public function setPaymentStatus($token, $paymentStatus, $paymentDate = '')
    {
        if (empty($paymentDate)) {
            $paymentDate = date(API::DateFormat_Iso);
        }
        $message = array(
            'token' => (string) $token,
            'paymentstatus' => (int) $paymentStatus,
            'paymentdate' => (string) $paymentDate,
        );
        return $this->communicator->callApiFunction('invoices/invoice_paymentstatus_set', $message)->setMainResponseKey('invoice');
    }
public function setPaymentStatus ( $ token , $ paymentStatus , $ paymentDate = '' ) { if ( empty ( $ paymentDate ) ) { $ paymentDate = date ( API :: DateFormat_Iso ) ; } $ message = array ( 'token' => ( string ) $ token , 'paymentstatus' => ( int ) $ paymentStatus , 'paymentdate' => ( string ) $ paymentDate , ) ; return $ this -> communicator -> callApiFunction ( 'invoices/invoice_paymentstatus_set' , $ message ) -> setMainResponseKey ( 'invoice' ) ; }
Sets the payment status for an invoice.

@param string $token
The token for the invoice.
@param int $paymentStatus
The new payment status, 1 of the API::PaymentStatus_Paid or
API::PaymentStatus_Due constants.
@param string $paymentDate
ISO date string (yyyy-mm-dd) for the date to set as payment date, may
be empty for today or if the payment sattus is API::PaymentStatus_Due.

@return \Siel\Acumulus\Web\Result
The result of the webservice call. The structured response will contain
1 "invoice" array, being a keyed array with keys:
- entryid
- token
- paymentstatus
- paymentdate
Possible errors:
- "DATE590ZW: Missing mandatory paymentdate field. Unable to proceed."
- "DATE590ZW: Incorrect date range (2000-01-01 to 2099-12-31) or
invalid date format (YYYY-MM-DD) used in paymentdate field. We
received: $paymentDate. Unable to proceed."

@see https://www.siel.nl/acumulus/API/Invoicing/Payment_Set_Status/
Sets the payment status for an invoice .