Opencart API调用运输集成 [英] Opencart API Call for Shipping Integration

查看:147
本文介绍了Opencart API调用运输集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我使用Opencart开发了一个电子商务网站,并希望集成运输API以获取其唯一ID(运单)但我不是整合它。

以下是我提取运单号码的URL:



https://test.delhivery.com/waybill/api / fetch / json /?token = LICENSEKEY& count = 1



URL获取运单号但是如何调用URL并获取响应并将其存储在变量。

Hello,

I have developed an E-commerce site using Opencart and want to integrate shipping API to fetch their unique ID(waybill) but I am not to integrate it.
Below is the URL given to me for fetching the waybill number:

https://test.delhivery.com/waybill/api/fetch/json/?token=LICENSEKEY&count=1

the URL fetches the waybill number but how can I call the URL and get the response and store it in a variable.

推荐答案

您可以尝试使用以下代码:


You can try using below code:


details = json_decode(file_get_contents(https://test.delhivery.com/waybill/api/fetch/json/?token=LICENSEKEY&count=1));



dd(
details = json_decode(file_get_contents("https://test.delhivery.com/waybill/api/fetch/json/?token=LICENSEKEY&count=1"));

dd(


详情); //你会在这里看到回复
details); // you will see response here


这篇关于Opencart API调用运输集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆