php - 我无法打开解密的 Amazon Selling Partner Feed 文档
问题描述
当我尝试读取文件时,我看到了这张图片。这是正常的吗?
我的代码
public function openTheFeedDocument() {
$data = json_decode($this->getFeedDocument());
$url = $data->payload->url;
$iv = base64_decode($data->payload->encryptionDetails->initializationVector);
$key = base64_decode($data->payload->encryptionDetails->key);
$decryptedData = openssl_decrypt(file_get_contents($url), 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
$raw_document = mb_convert_encoding($decryptedData, 'UTF-8', 'ASCII, JIS, UTF-8, SJIS');
echo $raw_document;
}
解决方案
推荐阅读
- java - Robolectric::LayoutInflator.inflate() 挂在 onCreateOptionsMenu
- python - ParseResults getName() 返回无
- javascript - 更改 html 元素的 onclick 事件时遇到错误
- javascript - 饼图插值无法正常工作
- python - 运行.exe时模块对象没有属性SFrame
- amazon-web-services - 你能克隆一个 AWS lambda 吗?
- git - 如何使 gitignore 排除 2 个文件夹中存在的特定 js 文件,而忽略所有其他 js 文件?
- sql - 有联接时如何从多个表中进行选择?
- angular - 可观察的异步管道不返回值
- python - 如何在 django 会话中存储多个变量