activate_part
Purpose: The activate_part function is used to partially activate a passive invoice. Explanation: When partially activating an invoice only the articles and quantities specified by you will be activated. A passive invoice is created containing the articles on the original invoice not activated. (See shop_activate_part.php and shop_activate.html in the API for examples of usage).
Example PHP code
activate_part($eid, $invno, $artnos, $secret, &$result)
Input Data:
| Required | Variable | Type | Description |
|---|---|---|---|
| eid | integer | A store ID which refers to your store in Klarna's database. | |
| invno | string | The passive invoice number | |
| artnos | array | A list of pairs containing quantity and article number. Each element in the list is created using a call to the mk_artno function. | |
| secret | string | A shared secret used to secure all traffic exchanged by Klarna and your store |
Return Value:
An array(”url”, ”invo”)
The value of ”url” is a URL pointing to a temporary PDF-version of the activated invoice.
The value of ”invno” is either 0 if the entire invoice was activated or the number on the new passive invoice.
Errors
| Error | Description |
| invoice not passive or frozen | The invoice you are trying to activate is already activated. |
| unknown_invoice | The invoice number does not exist. |
| bad_artnolist | There is a fault in the article list. It can depend on the quantity or article number variable. |
| invalid_estore_secret | The shared secret does not match the estore id. |


Subscribe to our RSS feed for technical updates