Edit Cart
Modifying an existing order. Here it is possible to register partial returns or other changes to the order relating to the contents or related fees.
Create the ipl_edit_cart_content_request instance
require_once 'api/ipl_xml_api.php';
require_once 'api/php5/ipl_edit_cart_content_request.php';
$req = new ipl_edit_cart_content_request($apiUrl);
Set the merchant access credentials
$req->set_default_params(
$merchantId,
$portalId,
$securityKey
);
Set the order details
Shipping costs net/gross: 5,00 EUR/5,95 EUR
Shipping type: "Express-Versand"
Rebate net/gross: 5,00 EUR/ 5,95 EUR
Total price net/gross: 53,00 EUR / 79,05 EUR
Currency: EUR
Order number: $ref
$req->set_total(500, 595, "Express-Versand", 500, 595, 4917, 5850, "EUR", $ref);
Set the new order contents
Article ID: "article003"
Article quantity: 3
Article name: "Kaffeetasse 07/11"
Article description: "Die tolle Kaffeetasse"
$req->add_article("article003", 3, "Kaffetasse 07/11", "Die tolle Kaffeetasse", 1639, 1950);
Send the request to BillPay
try {
$req->send();
if ($req->has_error()) {
$errorCode = $req->get_error_code();
$merchantMessage = utf8_decode($req->get_merchant_error_message());
$customerMessage = utf8_decode($req->get_customer_error_message());
} else {
// SUCCESS
}
}
catch(Exception $e) {
echo $e->getMessage();
}