我正在尝试解密和使用通过URL传递的数据
我正在使用以下示例:https://support.clickbank.com/hc/en-us/articles/115015433468-Encrypting-Passed-Parameters
在php部分中,他们解密了数据,但它们使用的是$ order对象。
我不知道他们如何获得$ order对象
<?php
$encrypted = rawurldecode($_GET['params']);
$iv = rawurldecode($_GET['iv']);
$secretKey = "MYSECRETKEY";
$decrypted = trim(
openssl_decrypt(base64_decode($encrypted),
'AES-256-CBC',
substr(sha1($secretKey), 0, 32),
OPENSSL_RAW_DATA,
base64_decode($iv)), "\0..\32");
echo($decrypted);
//EXAMPLES OF DATA FROM DECRYPTED URL PARAMETERS
$email = $order->{'cemail'};
$receipt = $order->{'cbreceipt'};
$full_name = $order->{'cname'};
$item = $order->{'item'};
$cbpop = $order->{'cbpop'};
$phone = $order->{'cphone'};
$country = $order->{'ccountry'};
$affid = $order->{'cbaffi'};
$zip = $order->{'czip'};
$time = $order->{'time'};
http_response_code(200);
?>