【发布时间】:2016-11-01 20:27:51
【问题描述】:
<?php
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope>
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>**SELLER ID**</MerchantIdentifier>
</Header>
<MessageType>Price</MessageType>
<Message>
<MessageID>1</MessageID>
<Price>
<SKU>2500le</SKU>
<StandardPrice currency="GBP">110.58</StandardPrice>
</Price>
</Message>
</AmazonEnvelope>';
echo "<strong>Just MD5 </strong>".md5($xml)."</br>";
echo "<strong>Just MD5 BE64 </strong>".base64_encode(($xml))."</br>";
echo "<strong>Trimmed MD5 </strong>".md5(trim($xml))."</br>";
echo "<strong>Trimmed MD5 BE64 </strong>".base64_encode(md5(trim($xml)))."</br>";
echo "<strong>Just MD5 True </strong>".md5($xml, true)."</br>";
echo "<strong>Just MD5 True BE64 </strong>".base64_encode(md5($xml, true))."</br>";
echo "<strong>Just MD5 True Trimmed </strong>".md5(trim($xml), true)."</br>";
echo "<strong>Just MD5 True Trimmed BE64 </strong>".base64_encode(md5(trim($xml), true))."</br>";
?>
我正在尝试让我的内容 MD5 与亚马逊暂存器上的内容 MD5 匹配。
草稿本上完全相同的 XML 的 MD5 是:514f53797911925b337c4461c30ca003 基数为 64 的 MD5 为:UU9TeXkRklszfERhwwygAw==
我似乎根本无法匹配。
首先,任何人都可以看到我哪里出错了,有没有人有一些工作代码来做一个 CURL 帖子,以 _POST_PRODUCT_PRICING_DATA_ 的提要类型向亚马逊 MWS 提交提要?
我什么都试过了..
【问题讨论】: