InvoiceCreated

Shipping notification to set the payment due date for the order

Create the ipl_invoice_created_request instance

require_once 'api/ipl_xml_api.php';
require_once 'api/php5/ipl_invoice_created_request.php';

$req = new ipl_invoice_created_request($apiUrl);

Set the merchant access credentials

$req->set_default_params(
    $merchantId,
    $portalId,
    $securityKey
);

Set the order details

Total price: 274,55 EUR

Currency: EUR

Order number: $ref

Delay the payment due date (in days): 0

$req->set_invoice_params(27455, "EUR", $ref, 0);

Send the request to BillPay

try {
        $req->send();

        if (!$req->has_error()) {
            // Abfangen der Zahlungsinformationen
            $accountHolder = $req->get_account_holder();
            $accountNumber = $req->get_account_number();
            $bankCode = $req->get_bank_code();
            $bankName = $req->get_bank_name();
            $invoiceReference = $req->get_invoice_reference();
            $dueDate = $req->get_invoice_duedate();
            $activationPerformed = $req->get_activation_performed();

            if (count($req->get_dues()) > 0) {
            }

        } else {
            $errorCode = $req->get_error_code();
            $merchantMessage = utf8_decode($req->get_merchant_error_message());
            $customerMessage = utf8_decode($req->get_customer_error_message());
        }
}
catch(Exception $e) {
        echo $e->getMessage();
}