A couple of changes #5

Open
wants to merge 9 commits into
from

Conversation

Projects
None yet
1 participant
@amaltsev

amaltsev commented Nov 6, 2012

Thanks for the great MWS module, you should push it to CPAN!

I made a couple of fixes while integrating it into the project I'm working on. I hope you find them useful.

amaltsev added some commits Nov 6, 2012

Signature, tracing, endpoint fix
The sha1 signature did not work for me. Replaced with SHA256.

Also making sure the endpoint ends with '/' -- without it the base
string for the signature does not match the original Amazon assumes and
signature verification fails.

Replaced GET with POST. Not sure why GET does not work, but it does not
for me.

Added exception catching to the example for Exception::Class newbies
like myself.
Bug fix for ManageReportSchedule
It's an incompatible change, but without it it simply does not work.
Changed report ID to a string
Report ids are 64bit integers, they may overflow perl's integers.
There is no math on report IDs, so it's better to treat them as
strings.
Fixed obsoleted settlement report IDs
Report IDs
    _GET_FLAT_FILE_PAYMENT_SETTLEMENT_DATA_
    _GET_ALT_FLAT_FILE_PAYMENT_SETTLEMENT_DATA_
    _GET_PAYMENT_SETTLEMENT_DATA_

were obsoleted on 5/31/2015 and since mid-June do not return any documents.

The are replaced by:

    _GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_
    _GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2_
    _GET_V2_SETTLEMENT_REPORT_DATA_XML_

Also fixed syntax for Perl 5.20.2 compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment