Untitled Document
Results 1 to 4 of 4

Thread: Populate payment info in Javascript SDK

  1. #1
    I am having trouble populating some information when opening the ShipRush app. Only the payment type and account number seems to be filled. It's not working on the javascript playroom either. When the carrier is set to FedEx, the company is not filled and when set to UPS, the zip and country are not filled (country stays at US). See below the code used in the playroom.

    Code:
    var shipment = {
        ShipTo : {
            Name: "John Smith",
            Company: "Acme Widgets",
            Address1: "5th ave S",
            Address2: "#101",
            City: "Seattle",
            State: "WA",
            PostalCode: "98118",
            Country: "US",
            Phone: "(206)332-2233"
        },
        PaymentType: 'ThirdParty',
        PaymentAccountNumber: '555-5555',
        PaymentCompanyName: 'company',
        PaymentCountry: 'CA',
        PaymentPostalCode: '48202',
        CarrierTypeName: "Fedex",
        ServiceTypeName: "Ground",
        Packages: [{
            Weight: "2"
        }]
    }
    
    shipRushClient.Open(
    {
        Shipment: shipment,
        OnShipmentCompleted: function (data) {
            alert(data.Shipment.TrackingNumber);
            // Return "true" to close shipping form
            return true;
        }
    });
    Edit: I said problems populating some information, but I meant to say some payment fields. I haven't had any trouble with any other fields.
    Last edited by jonesd; 08-16-2019 at 10:33 AM.
    Reply With Quote

  2. #2

    Join Date
    Apr 2004
    Posts
    16,807
    SYSOPS is offline
    I have submitted this to development for additional review. Case 75158. We will update this thread when more information is available.

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

  3. #3

    Join Date
    Apr 2004
    Posts
    16,807
    SYSOPS is offline
    Update on this....

    New code snippet example:

    {
    "ShipTo": {
    "Name": "John Smith",
    "Company": "Acme Widgets",
    "Address1": "5th ave S",
    "Address2": "#101",
    "City": "Seattle",
    "State": "WA",
    "PostalCode": "98118",
    "Country": "US",
    "Phone": "(206)332-2233"
    },
    "ThirdPartyAddress": {
    "Company": "Third Party Company Name",
    "PostalCode": "98118",
    "Country": "US",
    "CountryName": "U.S.A."
    },

    "PaymentType": "ThirdParty",
    "PaymentAccountNumber": "555-5555",
    "CarrierTypeName": "Fedex",
    "ServiceTypeName": "Ground",
    "Packages": [
    {
    "Weight": "2"
    }
    ]
    }

    I'm working with our team to get our documentation updated with this as well

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

  4. #4
    That did the trick. Thanks for the update.

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
  •