Update ASECryptoStream.php#36
Open
dishcheng wants to merge 1 commit intodouble-break:masterfrom
dishcheng:patch-1
Open
Update ASECryptoStream.php#36dishcheng wants to merge 1 commit intodouble-break:masterfrom dishcheng:patch-1
dishcheng wants to merge 1 commit intodouble-break:masterfrom
dishcheng:patch-1
Conversation
After I upload xml,I will get like this result
```
array:3 [
"Header" => array:2 [
"DocumentVersion" => "1.02"
"MerchantIdentifier" => "xxxxxxxx"
]
"MessageType" => "ProcessingReport"
"Message" => array:2 [
"MessageID" => "1"
"ProcessingReport" => array:4 [
"DocumentTransactionID" => "xxxxxxxxxx"
"StatusCode" => "Complete"
"ProcessingSummary" => array:4 [
"MessagesProcessed" => "0"
"MessagesSuccessful" => "0"
"MessagesWithError" => "1"
"MessagesWithWarning" => "0"
]
"Result" => array:4 [
"MessageID" => "0"
"ResultCode" => "Error"
"ResultMessageCode" => "5001"
"ResultDescription" => "XML Parsing Fatal Error at Line 1, Column 636: Content is not allowed in trailing section. Content is not allowed in trailing section."
]
]
]
]
```
For example,myxml like this
```
<?xml version="1.0" encoding="utf-8" ?>\n
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">\n
<Header>\n
<DocumentVersion>1.01</DocumentVersion>\n
<MerchantIdentifier>XXXXXXXXX</MerchantIdentifier>\n
</Header>\n
<MessageType>Price</MessageType>\n
<Message>\n
<MessageID>1</MessageID>\n
<OperationType>Update</OperationType>\n
<Price>\n
<SKU>XX-XXXX-XXXX</SKU>\n
<StandardPrice currency="USD">14.00</StandardPrice>\n
<Sale>\n
<StartDate>2021-06-29T00:00:00Z</StartDate>\n
<EndDate>2026-03-11T00:00:00Z</EndDate>\n
<SalePrice currency="USD">15.00</SalePrice>\n
</Sale>\n
</Price>\n
</Message>\n
</AmazonEnvelope>
```
after getPaddedText will become like this
```
<?xml version="1.0" encoding="utf-8" ?>\n
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">\n
<Header>\n
<DocumentVersion>1.01</DocumentVersion>\n
<MerchantIdentifier>XXXXXXXXX</MerchantIdentifier>\n
</Header>\n
<MessageType>Price</MessageType>\n
<Message>\n
<MessageID>1</MessageID>\n
<OperationType>Update</OperationType>\n
<Price>\n
<SKU>XX-XXXX-XXXX</SKU>\n
<StandardPrice currency="USD">14.00</StandardPrice>\n
<Sale>\n
<StartDate>2021-06-29T00:00:00Z</StartDate>\n
<EndDate>2026-03-11T00:00:00Z</EndDate>\n
<SalePrice currency="USD">15.00</SalePrice>\n
</Sale>\n
</Price>\n
</Message>\n
</AmazonEnvelope>\x00\x00\x00\x00\x00\x00
```
then end will add `\x00\x00\x00\x00\x00\x00`,need trim data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After I upload xml,I will get like this result
For example,myxml like this
after getPaddedText will become like this
then end will add
\x00\x00\x00\x00\x00\x00,need trim data.