Untitled Document
Results 1 to 7 of 7

Thread: ShipRush Custom Post-In Integration with Ruby On Rails

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Trying to integrate ShipRush Custom Post-In with a Ruby On Rails project using Net::HTTP and URI. I am currently in ShipRush sandbox. Below is what i have:

    uri = URI.parse( url_string )

    request = Net::HTTP::Post.new( uri )
    request.body = xml_string
    request.content_type = 'application/xml'
    http = Net::HTTP.new( uri.host, uri.port )
    http.use_ssl = true
    response = http.request( request )

    After posting the request i get response code of 200, means the request was successful, also the response body below:
    <?xml version="1.0" encoding="utf-8"?><AddOrderResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>


    But when i check the sandbox to see if the order was posted nothing there at all, i also cant see any logs since ShipRush Sandbox does not have that option. But when i try with https://my.shiprush.com/static.shipr...uest-demo.html just to make sure the xml i generate is correct, it works and i see the Orders in ShipRush Sandbox.

    Does anyone have integrated ShipRush with Rudy and knows whats going here?

    Thanks

  2. #2

    Join Date
    Apr 2004
    Posts
    16,863
    SYSOPS is offline
    It appears your account in sandbox was flagged. I've cleared that issue

    I impersonated your account, and I see an order posted, ZF-0004. It isn't mark as paid, so it's in the Waiting on Payment folder. If you aren't seeing the proper data, more details needed. Also be sure to test the Post-in with a simple tool like Fiddler to baseline that it does work, and then progress to your Ruby project.

    Thank you,
    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  3. #3
    Does ShipRush expects the xml payload to be passed as a parameter or just the request body? Because looking at the WebShipping Javascript Demo: TRequest/TShipment XML API, the xml is passed as ShipTransactionRequest.

    shipRushClient.Open(
    { ShipTransactionRequest: shipTransactionXML
    })

    I have been using Postman to test posting to sandbox still getting the same results. It responds with code 200 but new orders not showing at all.

  4. #4

    Join Date
    Apr 2004
    Posts
    16,863
    SYSOPS is offline
    shipRushClient.Open(
    { ShipTransactionRequest: shipTransactionXML
    })

    The above is for our javascript interactive shipping "button" solution. That does not post any data into ShipRush. It is an overlay of our shipping UI directly in your own website\page.

    If you are doing Custom Post-In, you would pass the XML to the URL that is setup in the webstore in ShipRush. For example, your webstore with the name that ends in test, has a URL that looks like this: https://sandbox.xxxxxxxx/Integraxxxx...fihw/order/add

    So, from your application, you would "push" your XML to that endpoint, to generate an order in ShipRush itself

    HTH,
    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  5. #5
    Using Javascript interactive button works, but when i post to the webstore custom URL for sandbox, it still returns response code 200 and the following response body, but the order is not showing in the sandbox.
    <?xml version="1.0" encoding="utf-8"?>
    <AddOrderResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OrderId>28da5c42-04e4-4d1c-a6ce-aadc013f57df</OrderId>
    </AddOrderResponse>

    I am using Postman a similar tool to Fiddler. Just to test everything to see the URL for custom webstore is getting hit.Name:  postman-2019-10-04 at 2.29.09 PM.jpg
Views: 11
Size:  355.1 KB

  6. #6

    Join Date
    Apr 2004
    Posts
    16,863
    SYSOPS is offline
    They are there. Looking at your example above, the order Date is 9/16/2019. Set the date range to show the last 30 days, instead of today or last 7 days (as everything is based on the order date you submit)

    Name:  2019-10-04_15-16-59.png
Views: 14
Size:  129.8 KB

    SYSOPS
    Have Questions? Ask the ShipRush Knowledge Base: https://shiprush.com/kbase
    Reply With Quote

  7. #7
    Oh got it, good ole filters. Thanks you very much.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •