Proof of Delivery¶
FedEx¶
Example:
<?php
$track = new \RocketShipIt\Track('fedex');
$track->setParameter('trackingNumber','123456789012');
$response = $track->getProofOfDelivery();
$letter = $response['SignatureProofOfDeliveryLetterReply']['Letter'];
file_put_contents('proof-letter.pdf', base64_decode($letter));
UPS¶
UPS Proof of Delivery letters are returned in the tracking response.
Example:
<?php
$track = new \RocketShipIt\Track('ups');
$r = $track->track('1ZVF10370348447000');
$letter = $r['Data']['Packages'][0]['Activity'][0]['ProofOfDelivery'];
file_put_contents('/tmp/proof-letter-ups.html', base64_decode($letter));