无权使用 Datastream 错误消息(Royal Mail Shipping API)
No permission to use Datastream error mesage (Royal Mail Shipping API)
我正在使用皇家邮政运送 API 到 'Create a Shipment Request' 并创建 'Printed Labels'。
打印标签请求可以通过多种方式完成,我想以 PNG 格式获取此打印标签,使用 API 通过将 'PNG' 作为参数传递即可轻松完成。但是由于某种原因,当我 var_dump 响应错误时出现以下错误:
[errorCode] => E1184
[errorDescription] => No permission to use Datastream
我的代码如下:-
public function PrintLabel($shipmentNumber, $order_tracking_id, $outputFormat = 'PDF')
{
$time = gmdate('Y-m-d\TH:i:s');
$request = array(
'integrationHeader' => array(
'dateTime' => $time,
'version' => '2',
'identification' => array(
'applicationId' => $this->api_application_id,
'transactionId' => $order_tracking_id
)
),
'shipmentNumber' => $shipmentNumber,
'outputFormat' => $outputFormat, // PDF, DS, DSPDF, PNG, DSPNG
);
$type = 'printLabel';
$response = $this->makeRequest($type, $request);
return $response->label;
} // ef
$rm = new RoyalMailLabelRequest();
$response = $rm->PrintLabel('TTT000358756GB', '276831601444829801', 'PNG');
echo $response;
谁能告诉我为什么会收到这个 'no permission to use datastream error'?
皇家邮政默认禁用 PNG 标签生成,我不得不请求将其打开。
我正在使用皇家邮政运送 API 到 'Create a Shipment Request' 并创建 'Printed Labels'。
打印标签请求可以通过多种方式完成,我想以 PNG 格式获取此打印标签,使用 API 通过将 'PNG' 作为参数传递即可轻松完成。但是由于某种原因,当我 var_dump 响应错误时出现以下错误:
[errorCode] => E1184
[errorDescription] => No permission to use Datastream
我的代码如下:-
public function PrintLabel($shipmentNumber, $order_tracking_id, $outputFormat = 'PDF')
{
$time = gmdate('Y-m-d\TH:i:s');
$request = array(
'integrationHeader' => array(
'dateTime' => $time,
'version' => '2',
'identification' => array(
'applicationId' => $this->api_application_id,
'transactionId' => $order_tracking_id
)
),
'shipmentNumber' => $shipmentNumber,
'outputFormat' => $outputFormat, // PDF, DS, DSPDF, PNG, DSPNG
);
$type = 'printLabel';
$response = $this->makeRequest($type, $request);
return $response->label;
} // ef
$rm = new RoyalMailLabelRequest();
$response = $rm->PrintLabel('TTT000358756GB', '276831601444829801', 'PNG');
echo $response;
谁能告诉我为什么会收到这个 'no permission to use datastream error'?
皇家邮政默认禁用 PNG 标签生成,我不得不请求将其打开。