eg252
asked on
send xml to amazon using vba
Does anyone know how to use this xml? I want to use vba to update amazon with a tracking number.. I found this - and I registered with amazon - but i'm pretty clueless as to how to proceed...
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocat ion="amzne nvelope.
xsd">
<Header>
<DocumentVersion>1.01</Doc umentVersi on>
<MerchantIdentifier>My Store</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillm ent</Messa geType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>1234567</ MerchantOr derID>
<MerchantFulfillmentID>123 4567</Merc hantFulfil lmentID>
<FulfillmentDate>2002-05-0 1T15:36:33 -08:00</Fu lfillmentD ate>
<FulfillmentData>
<CarrierCode>UPS</CarrierC ode>
<ShippingMethod>Second Day</ShippingMethod>
<ShipperTrackingNumber>123 4567890</S hipperTrac kingNumber >
</FulfillmentData>
<Item>
<MerchantOrderItemID>12345 67</Mercha ntOrderIte mID>
<MerchantFulfillmentItemID >1234567</ MerchantFu lfillmentI temID>
<Quantity>2</Quantity>
</Item>
</OrderFulfillment>
<?xml version="1.0" encoding="UTF-8"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocat
xsd">
<Header>
<DocumentVersion>1.01</Doc
<MerchantIdentifier>My Store</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillm
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<MerchantOrderID>1234567</
<MerchantFulfillmentID>123
<FulfillmentDate>2002-05-0
<FulfillmentData>
<CarrierCode>UPS</CarrierC
<ShippingMethod>Second Day</ShippingMethod>
<ShipperTrackingNumber>123
</FulfillmentData>
<Item>
<MerchantOrderItemID>12345
<MerchantFulfillmentItemID
<Quantity>2</Quantity>
</Item>
</OrderFulfillment>
ASKER
Thank you for responding.
i need very specifically AMAZON xml help..
I need to know if anyone did Amazon XML in vba.. I need the url of where to post and a small sample so I can get started..
i need very specifically AMAZON xml help..
I need to know if anyone did Amazon XML in vba.. I need the url of where to post and a small sample so I can get started..
Have you looked at Amazon's documentation here:
Amazon Marketplace Web Service (Amazon MWS) Documentation
https://developer.amazonservices.com/gp/mws/docs.html/189-7490411-2657469
and also:
Amazon MWS Scratchpad
https://mws.amazonservices.com/scratchpad/index.html
Amazon Marketplace Web Service (Amazon MWS) Documentation
https://developer.amazonservices.com/gp/mws/docs.html/189-7490411-2657469
and also:
Amazon MWS Scratchpad
https://mws.amazonservices.com/scratchpad/index.html
Are you using the Marketplace Web Service or doing something else with Amazon?
XML is just the data that get's sent received, not how. You could for example be working with EDI and XML.
That's why I asked exactly what it was you were doing.
So far, we don't have enough info to help you.
Jim.
XML is just the data that get's sent received, not how. You could for example be working with EDI and XML.
That's why I asked exactly what it was you were doing.
So far, we don't have enough info to help you.
Jim.
ASKER
All I'm tryring to do is to update Amazon with a tracking number for an order.. I'm working on this for hours and hours.. I finally got to the point where I figured out signatures and I got the xml and url.. Now I'm stuck because the md5 doesnt match.. and I'm trying to figure out the md5. I will post the code when I'm done - but right now I want to STILL know if anyone has successfully updated amazon with a tracking number from access...
<<but right now I want to STILL know if anyone has successfully updated amazon with a tracking number from access... >>
There's no reason you can't and it seems what HiTechCoach pointed you to is what your working with. I saw a section in there on MD5 and what to do.
I also have MD5 code here somewhere...
Jim.
There's no reason you can't and it seems what HiTechCoach pointed you to is what your working with. I saw a section in there on MD5 and what to do.
I also have MD5 code here somewhere...
Jim.
ASKER
thank you. i saw the scratchpad AND the documentation page. I tried 5 or 6 md5 modules and still cannot match..
I'm attaching my xml - this is the md5 that Amazon wants..
XadsJ9m+KfWBFE5TygQGdg==
All the modules I tried did NOT get that answer....
Thank you all for trying!
testing.txt
I'm attaching my xml - this is the md5 that Amazon wants..
XadsJ9m+KfWBFE5TygQGdg==
All the modules I tried did NOT get that answer....
Thank you all for trying!
testing.txt
For the XML that you posted, does that match the entire string that Scratch pad returned as the "String to sign" value?
Jim.
Jim.
The digest I get on your XML is:
8c12b32fe838087cec69473332 7546c8
so I'm thinking what Amazon is calculating on is not what you posted. So far, I haven't known this MD5 code to have a problem (haven't used it a ton though).
Jim.
8c12b32fe838087cec69473332
so I'm thinking what Amazon is calculating on is not what you posted. So far, I haven't known this MD5 code to have a problem (haven't used it a ton though).
Jim.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Very nice...glad to here you've got it working.
Thanks for coming back and posting that.
Jim.
Thanks for coming back and posting that.
Jim.
Thanks for sharing your solution!
ASKER
this works
What is it exactly your trying to do? I should be able to get you going in the right direction at least.
Jim.
' Set the correct URL
'strPostURL = "https://test.authorize.net/gateway/transact.dll"
110 strPostURL = "https://secure.authorize.net/gateway/transact.dll"
'strPostURL = "https://developer.authorize.net/tools/paramdump/index.php"
120 strPostSting = ""
125 strPostSting = strPostSting & "x_login=" & URLEncode(strAPILogin) & "&"
126 strPostSting = strPostSting & "x_tran_key=" & URLEncode(strTransactionKe
'For debugging.
'strPostSting = strPostSting & "x_test_request=" & URLEncode("TRUE") & "&"
130 strPostSting = strPostSting & "x_version=" & URLEncode("3.1") & "&"
140 strPostSting = strPostSting & "x_delim_data=" & URLEncode("TRUE") & "&"
150 strPostSting = strPostSting & "x_delim_char=" & URLEncode("|") & "&"
160 strPostSting = strPostSting & "x_relay_response=" & URLEncode("FALSE") & "&"
170 strPostSting = strPostSting & "x_email_customer=" & URLEncode("FALSE") & "&"
180 strPostSting = strPostSting & "x_type=" & URLEncode("PRIOR_AUTH_CAPT
190 strPostSting = strPostSting & "x_trans_id=" & URLEncode(rs!CCTransaction
' Additional fields can be added here as outlined in the AIM integration
' guide at: http://developer.authorize.net
200 strPostSting = left(strPostSting, Len(strPostSting) - 1)
' We use xmlHTTP to submit the input values and record the response
Dim objRequest As New MSXML2.XMLHTTP
210 objRequest.Open "POST", strPostURL, False
220 objRequest.Send strPostSting
230 strPostResponse = objRequest.responseText
'Debug.Print strPostResponse
240 Set objRequest = Nothing