848RCXR3 // [order_item_id] => 15718726 // [order_language] => en // [buyer_email] => Michael.TEST@digitest24.de // [payplan_id] => 45399 // [product_id] => 20 // [product_name] => Instant Happyness // [quantity] => 1 // [country] => DE // [buyer_language] => en // [buyer_id] => 9420230 // [buyer_first_name] => Michael // [buyer_last_name] => TEST // [billing_status] => // [amount] => 297.50 // [vat_amount] => 47.50 // [other_amounts] => 595.00 // [other_vat_amounts] => 95.00 // [sha_sign] => 842486B8C793B57A237158836DEEC03B34BCC436C13BED1C8412E03317B3ABE314E8D4F8F19FB89FFD3C811DA4E1CD20BF15C43A897375B46C836CD2DBBC528A // ) // *************************************************************************************************************************************************************************************************/ /////////////////////////////////////////////////////////////////////////// // Do not change: define( 'DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX', 'ds24' ); define( 'DS24_ARRAY_ENCRYPTPTION_VALIDATION_CHAR_COUNT', 5 ); function digistore_string_starts_with( $string, $substring ) { if ($substring==='') { return true; } if (strlen($string) 33 && $encrypted_string[32] === '-'; if ($is_iv_appended) { $iv = @hex2bin( substr( $encrypted_string, 0, 32 ) ); $encrypted_string = substr( $encrypted_string, 33 ); if (empty($iv)) { return $encrypted_string; } } else { $iv = substr(hash('sha256', $secret_iv), 0, 16); } $plain_text = openssl_decrypt(base64_decode($encrypted_string), $encrypt_method, $key, 0, $iv); return $plain_text; } function digistore_encrypt_url_one_arg( $secret_key, $plaintext ) { if (empty($secret_key)) { $secret_key = DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX; } $len = DS24_ARRAY_ENCRYPTPTION_VALIDATION_CHAR_COUNT; $validation_prefix = $secret_key ? mb_substr($secret_key,0,$len) : ''; return DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX.digistore_encrypt( $secret_key, $validation_prefix.$plaintext ); } function digistore_decrypt_url_one_arg( $secret_key, $enrypted_string ) { if (!$enrypted_string) { return $enrypted_string; } $is_maybe_encrypted = digistore_string_starts_with( $enrypted_string, DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX ); if (!$is_maybe_encrypted) { return $enrypted_string; } if (empty($secret_key)) { $secret_key = DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX; } $encrypted = mb_substr( $enrypted_string, strlen(DS24_ARRAY_ENCRYPTPTION_VALIDATION_PREFIX)); $decrypted = digistore_decrypt( $secret_key, $encrypted ); if (!$decrypted) { return false; } $len = DS24_ARRAY_ENCRYPTPTION_VALIDATION_CHAR_COUNT; $validation_prefix = $secret_key ? mb_substr($secret_key,0,$len) : ''; $is_valid = $secret_key ? digistore_string_starts_with( $decrypted, $validation_prefix ) : true; return $is_valid ? mb_substr( $decrypted, mb_strlen($validation_prefix) ) : false; } function digistore_encrypt_url_args( $secret_key, $array, $keys_to_encrypt='all', $keys_to_not_encrypt=[], $encrypt_keys=false ) { foreach ($array as $key => &$value) { if (in_array($key,$keys_to_not_encrypt)) { continue; } $must_encrypt = $keys_to_encrypt === 'all' || in_array( $key, $keys_to_encrypt ); if ($must_encrypt) { $value = digistore_encrypt_url_one_arg( $secret_key, $value ); } } $result = []; foreach ($array as $k => $v) { $result[ '_DS_' . str_rot13( $k ) ] = $v; } return $result; } function digistore_decrypt_url_args( $secret_key, $array ) { $result = []; foreach ($array as $key => $value) { $is_encrypted = substr( $key, 0, 4) == '_DS_'; if ($is_encrypted) { $key = str_rot13( substr( $key, 4 ) ); } $result[ $key ] = digistore_decrypt_url_one_arg($secret_key, $value ); } return $result; } function digistore_signature( $sha_passphrase, $parameters, $convert_keys_to_uppercase = false ) { $algorythm = 'sha512'; $sort_case_sensitive = true; if (!$sha_passphrase) { return 'no_signature_passphrase_provided'; } unset( $parameters[ 'sha_sign' ] ); unset( $parameters[ 'SHASIGN' ] ); if ($convert_keys_to_uppercase) { $sort_case_sensitive = false; } $keys = array_keys($parameters); $keys_to_sort = array(); foreach ($keys as $key) { $keys_to_sort[] = $sort_case_sensitive ? $key : strtoupper( $key ); } array_multisort( $keys_to_sort, SORT_STRING, $keys ); $sha_string = ""; foreach ($keys as $key) { $value = $parameters[$key]; $is_empty = !isset($value) || $value === "" || $value === false; if ($is_empty) { continue; } $upperkey = $convert_keys_to_uppercase ? strtoupper( $key ) : $key; $sha_string .= "$upperkey=$value$sha_passphrase"; } $sha_sign = strtoupper( hash( $algorythm, $sha_string) ); return $sha_sign; } /////////////////////////////////////////////////////////////////////////// if (!$_GET) { die( "ERROR: No (order) data was passed via GET parameter." ); } $received_signature = isset( $_GET['sha_sign'] ) ? $_GET['sha_sign'] : false; $expected_signature = digistore_signature( THANKYOU_PAGE_KEY, $_GET ); $sha_sign_valid = $received_signature == $expected_signature; if ( !$sha_sign_valid ) { die( "ERROR: The digital signature doesn't match the submitted data. Possible errors: (1) Wrong thank you page key (2) You are using different signature data than the one authenticated by Digistore24." ); } $DECRYPTED_GET_PARAMS = digistore_decrypt_url_args( THANKYOU_PAGE_KEY, $_GET ); // If necessary, retrieve personal data from the thank you page URL $order_id = isset( $DECRYPTED_GET_PARAMS[ 'order_id' ] ) ? $DECRYPTED_GET_PARAMS[ 'order_id' ] : ''; $email = isset( $DECRYPTED_GET_PARAMS[ 'buyer_email' ] ) ? $DECRYPTED_GET_PARAMS[ 'buyer_email' ] : ''; $first_name = isset( $DECRYPTED_GET_PARAMS[ 'buyer_first_name' ] ) ? $DECRYPTED_GET_PARAMS[ 'buyer_first_name' ] : ''; // Deliver your content here ?>

Your products

You have purchased these products:

- Ebook 1 - click here to download

- Ebook 2 - click here to download

- Audiobook 1 - click here to download

Order ID:
Email:
First name: