Read Parcel2Go label hash from order links when Hash is empty
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 26s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 26s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
504a867351
commit
51c6748894
@@ -225,8 +225,9 @@ class ShippingController extends Controller
|
||||
abort_unless(ctype_digit($orderLineId), 404);
|
||||
$orders = $parcel2Go->fetch('me/orders/detail')['Orders'] ?? [];
|
||||
$order = collect($orders)->first(fn ($order) => (string) ($order['OrderLineId'] ?? '') === $orderLineId);
|
||||
abort_unless($order && ! empty($order['Hash']), 404);
|
||||
$pdf = $parcel2Go->labelPdf($orderLineId, $order['Hash']);
|
||||
$hash = $order ? $parcel2Go->labelHash($order) : null;
|
||||
abort_unless($hash, 404);
|
||||
$pdf = $parcel2Go->labelPdf($orderLineId, $hash);
|
||||
|
||||
return response($pdf, 200, [
|
||||
'Content-Type' => 'application/pdf',
|
||||
|
||||
Reference in New Issue
Block a user