Giter Club home page Giter Club logo

Comments (3)

sbeidas avatar sbeidas commented on June 12, 2024

Thank you for writing in!

Do you have the object_id of the particular Transaction object?

I suspect that the label_url was empty because the object_status for the Transaction was ERROR or QUEUED

from shippo-php-client.

claw68 avatar claw68 commented on June 12, 2024

@sbeidas Transaction object_id: 7bf91ee405d444339ceb0c57cde7fc2a

You are correct, object_status is QUEUED. However, in my shippo dashboard -> shipments there's a download link to a sample pdf. Is there a way to retrieve the sample label pdf?

from shippo-php-client.

sbeidas avatar sbeidas commented on June 12, 2024

@claw68

From the code snippet you shared above, the async attribute is not set, this defaults the Transaction's creation to be asynchronous. This means that the $transaction's object_status will beQUEUED and there will be no label_url since the creation of the label is still in progress. If you refresh the object after sometime you'll see that the Transaction object_status will be no longer be QUEUED

You can create the Transaction synchronously by setting the async attribute to false (See below)

$transaction = Shippo_Transaction::create( Array( 'rate' => $rate->object_id, 'label_file_type' => 'PDF', 'async' => false ));

I hope this helps, please do let me know if you have any additional questions

from shippo-php-client.

Related Issues (20)

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.