Coder Social home page Coder Social logo

shipcloud-php's People

Contributors

dennisoderwald avatar laf0rge avatar mannikj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

shipcloud-php's Issues

Library sends booleans not in the expected way

When using for example "create_shipping_label" and setting a boolean the api sends it as int (0|1). It does only work if sending the boolean as string. Sample request:

array:7 [ "to" => array:8 [ "company" => "Schreiber & Freunde GmbH & Co. KG" "first_name" => "Philipp" "last_name" => "Schreiber" "street" => "Heilbronner Straße" "street_no" => "12" "city" => "Neckarsulm" "zip_code" => "74172" "country" => "DE" ] "package" => array:4 [ "width" => 40 "length" => 40 "height" => 40 "weight" => 12 ] "carrier" => "dhl" "service" => "standard" "reference_number" => "abcde" "notification_email" => "[email protected]" "create_shipping_label" => true ]

This does not work. What works is the following (the difference is the "create_shipping_label" parameter):

array:7 [ "to" => array:8 [ "company" => "Schreiber & Freunde GmbH & Co. KG" "first_name" => "Philipp" "last_name" => "Schreiber" "street" => "Heilbronner Straße" "street_no" => "12" "city" => "Neckarsulm" "zip_code" => "74172" "country" => "DE" ] "package" => array:4 [ "width" => 40 "length" => 40 "height" => 40 "weight" => 12 ] "carrier" => "dhl" "service" => "standard" "reference_number" => "abcde" "notification_email" => "[email protected]" "create_shipping_label" => "true" ]

Shipcloud support says the following:

dass true als String angenommen wird ist derzeit noch ein Fallback der in Zukunft ausgebaut wird. Bitte überprüfe einmal, was genau ihr am Ende an Daten an uns sendet, denn bei uns kommt "create_shipping_label=1" an und das ist halt nicht korrekt.

Perhaps that will be fixed as side effect when fixing #1

Problem with the delete method in Api/Shipments

Declaration of ComyoMedia\Shipcloud\Api\Shipments::delete($id) should be compatible with ComyoMedia\Shipcloud\Api\Api::delete($uri = NULL, $parameters = Array, $body = Array).

Renaming it to something different like destroy() should help!


    public function destroy($id)
    {
        return $this->delete("shipments/{$id}");
    }

Label not created

Hi,

I created a PHP script for creating shipment via Shipcloud API

Though it has been created successfully, but I am getting only Id and the tracking_url,
and not carrier_tracking_no,label_url, and price as response parameters

I am using my sandbox API key

here is how the posted parameters in my request code look like.

$post_data = array(
'to' => array(
'company' => 'Receiver Inc.',
'first_name' => 'Max',
'last_name' => 'Mustermann',
'street' => 'Beispielstrasse',
'street_no' => '42',
'city' => 'Hamburg',
'zip_code' => '22100',
'country' => 'DE'
),
'package' => array(
'weight' => 15,
'length' => 20,
'width' => 20,
'height' => 20,
'type' => 'parcel'
),
'carrier' => 'dhl',
'service' => 'standard',
'reference_number' => 'ref123456',
'notification_email' => '[email protected]',
'create_shipping_label' => true
);

Please help me out.

Thank You.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.