Direct Shipment

Direct Shipment is a pseudo delivery provider, developed in Litium for testing and direct shipment handling tasks.

Direct Shipment can be used for:

  1. Simulating a delivery provider, without having to configure a real one! This could be useful, until you get your accounts configured from a real delivery provider.
  2. Allowing the placement of e-commerce orders and handle shipments manually.
  3. Testing a delivery checkout widget on the checkout page.
  4. Custom implementation, for example, to place the purchase order into your ERP system.

Version dependencies

  • Direct shipment app 1.4.0

    • Supports Connect Shipments API 1.1

    • Requires Litium 8.19 or later.

    • Requires Litium Serverless Cloud.

  • Direct shipment app 1.3.0

    • Supports Connect Shipments API 1.0

    • Requires Litium 8.18 or later.

Installation

Litium serverless cloud - Use the Cloud CLI to install the app.

Litium legacy cloud - Contact support to install the app in your test and/or production environment.

Local environment - See details below. 

Docker template for local installation

Values to replace in template:

  • ports
  • environment
    • ASPNETCORE_HTTPS_PORT
    • AppMetadata__AppUrl
    • LitiumApi__ApiUrl
version: '3'
services:
  direct-shipment:
    image: registry.litium.cloud/apps/direct-shipment:1.4.0
    dns: 
    - 192.168.65.254
    restart: unless-stopped
    ports:
    - "10020:80"
    - "10021:443"
    environment:
    # Enable HTTPS binding
    - ASPNETCORE_URLS=https://+;http://+
    - ASPNETCORE_HTTPS_PORT=10021
    # Configuration for HTTPS inside the container, exported dotnet dev-certs with corresponding password
    - ASPNETCORE_Kestrel__Certificates__Default__Password=${CERT_PWD}
    - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
    # Folder for the configuraiton, this is volume-mapped
    - CONFIG_PATH=/app_config
    # Folder where logfiles should be placed, this is volume-mapped
    - APP_LOG_PATH=/logs
    # Don't validate certificates
    - AppConfiguration__ValidateCertificate=false
    # Url to this app
    - AppMetadata__AppUrl=https://customer-app-direct-shipment.localtest.me:10021
    # Url to the litium installation
    - LitiumApi__ApiUrl=https://customer.localtest.me:5001
    volumes:
    - ./data/direct-shipment/config:/app_config
    - ./data/direct-shipment/data:/app_data
    - ./data/direct-shipment/logs:/logs
    - ./data/direct-shipment/DataProtection-Keys:/root/.aspnet/DataProtection-Keys
    - ./data/https:/https:ro
    

App configuration file

{
  "ShippingConfig": {
    "ShippingOptions": [
      {
        "Id": "integratedShipping",
        "MerchantAccountId": "",
        "DeliveryCountries": null,
        "DeliveryTimeInDays": 0,
        "ShippingMethod": "other",
        "IntegrationType": "PaymentCheckout",
        "FeeType": "Calculated"
      },
      {
        "Id": "standardPackage",
        "MerchantAccountId": "",
        "DeliveryCountries": null,
        "DeliveryTimeInDays": 0,
        "ShippingMethod": "NormalPost",
        "IntegrationType": "inline",
        "FeeType": "Calculated"
      },
      {
        "Id": "expressPackage",
        "MerchantAccountId": "",
        "DeliveryCountries": null,
        "DeliveryTimeInDays": 0,
        "ShippingMethod": "NormalPost",
        "IntegrationType": "inline",
        "FeeType": "Calculated"
      },
      {
        "Id": "deliveryOptions",
        "MerchantAccountId": "",
        "DeliveryCountries": null,
        "DeliveryTimeInDays": 0,
        "ShippingMethod": "Other",
        "IntegrationType": "deliveryOptions",
        "FeeType": "Calculated"
      }
    ]
  }
}
  • Id: The shipping option identifier.
  • MerchantAccountId: the merchant account identifier
  • DeliveryCountries:Placeholder for delivery countries config (string array) in shipment/payment apps integration. The country code is based on ISO 3166. Currently not being used in Direct Shipment.
  • DeliveryTimeInDays: Placeholder for delivery time config in shipment/payment apps integration. Currently not being used in Direct Shipment.
  • ShippingMethod: The type of the shipping method. It should be one of these values: "DeliverToDoorStep", "PickUpStore", "PickUpPoint", "AutomatedPickupStation", "DigitalDelivery", "NormalPost", "RegisteredPost", "Other".
  • IntegrationType: The type of the shipping integration. It should be "Inline", "DeliveryCheckout" or "PaymentCheckout". 
    • "Inline" : Shipping Option with be handled by Litium.
    • "DeliveryCheckout" : Shipping Option will be handled by Delivery provider. If a shipping option is configured with this IntegrationType, the Direct Shipment app will display a delivery checkout widget on the checkout page. This widget can be used for testing.
    • "PaymentCheckout" : Shipping Option will be handled by Payment provider.
    • "DeliveryOptions": Shipping options will be sent from the delivery provider and presented by the project in the UI.
  • FeeType: The type of the shipping fee. It should be "Fixed" or "Calculated".
Was this page helpful?
Thank you for your feedback!