Preauthorize
Reservieren einer Kundenbestellung bei BillPay
Erstellen der ipl_preauthorize_request Instanz
require_once 'api/ipl_xml_api.php';
require_once 'api/php5/ipl_preauthorize_request.php';
$req = new ipl_preauthorize_request($apiUrl, IPL_CORE_PAYMENT_TYPE_INVOICE);
Setzen der Händler Zugangsdaten
$req->set_default_params(
$merchantId,
$portalId,
$securityKey
);
Hinzufügen der Kundeninformationen
$req->set_customer_details(
$id,
$type,
$salutation,
$title,
$firstName,
$lastName,
$addressStreet,
$addressStreetNo,
$addressAddition,
$zip,
$city,
$country,
$email,
$phoneNo,
$mobilePhoneNo,
$dayOfBirth,
$language,
$ip,
$customerGroup
);
Setzen des "Rechnungsadresse" == "Lieferadresse" Flags und der Session ID
$req->set_shipping_details(true);
$req->set_fraud_detection(sha(session_id()));
Hinzufügen der allgemeinen Bestelldetails
$req->set_total(
$rebate,
$rebateGross,
$shippingName,
$shippingPrice,
$shippingPriceGross,
$cartTotalPrice,
$cartTotalPriceGross,
$currency,
$reference,
$reference2
);
Hinzufügen der Warenkorb-Details (pro Artikelzeile)
$req->add_article(
$articleid,
$articlequantity,
$articlename,
$articledescription,
$article_price,
$article_price_gross
);
Hinzufügen der Bestellhistorie
$req->add_order_history(
$historyOrderId,
$historyOrderDate,
$historyOrderAmount,
$historyOrderCurrency,
$historyOrderPaymentType,
$historyOrderStatus
);
BillPay AGB und DSB wurden aktzeptiert
$req->set_terms_accepted($termsAccepted);
Senden der Anfrage an BillPay
try {
$req->send();
} catch (Exception $e) {
echo $e->getMessage();
}