Guys I'm brand new to laravel and easypost. I'm putting together an ecommerce store but I need to show the customer shipping rates that must be passed on to the total price. So far, the test payments work in the bummen99 cart, but I'm really struggling to show the rates.
What is the procedure to do this? I imagine you build a controller for the Easypost rates, but how do you implement it on the checkout page with the products in question. Any help is much appreciated.
Dane
I have an example of an EasyPost UI built on Laravel. You can see an example of how to pull out the rates from a shipment here which is inside a controller (your assumption is correct), then you assign the
ratesto a variable and return that to your view which in your example would be your "checkout page". On my project, you can see the rates on the view as an example of how to do that there. Feel free to checkout the rest of the project for more inspiration on how to use Laravel and EasyPost hand-in-hand!TLDR:
You'll want to create a shipment following the EasyPost docs and the rates will be returned in the response under the
rateskey.rateskey with all the rates