Syntax

validateLicenseKey( purchase_id, license_key )

Checks if the order for a license key is valid.

Access rights

Read access, full access or development key required. If you want to use this function in your software, then make sure you use the development key since it can be published.

Arguments

purchase_id – the purchase ID. The purchase must belong to the Digistore account, to which the development key also belongs.

license_key – The license key that Digistore supplied with the purchase.

Return data

If is_license_valid == ‘Y’, then the order is paid (or the payments are in progress) and the product may be used.

Array
(
    [api_version] => 1.020
    [current_time] => 2017-02-29 15:52:17
    [result] => success [data] => Array
        (
            [is_license_valid] => Y
            [is_license_key_found] => Y
            [purchase_id] => 7WY9L42P
            [license_key] => TBYYK-YDFNX-45B4C-EEAKH-DSTHL-S8HR4-DAZU4-PLQD3
            [product_id] => 12345
            [product_name] => Name des gekauften Produkts
            [billing_tatus] => paying
            [billing_tatus_msg] => Zahlungen aktiv
            [last_payment_at] => 2017-02-29
            [last_payment_at_msg] => 29.02.2017
            [next_payment_at] => 2017-03-03
            [next_payment_at_msg] => 03.03.2017
            [last_transaction_type] => payment
            [last_transaction_type_msg] => Zahlung
            [are_returned_data_public] => N
        )
)