I’m trying to get the contents of of the receipt by using curl and the receipt_url. However, I am not getting the receipt from the curl response I’m getting some HTML code that returns a blank page.
Using my browser and the same receipt_url, the complete receipt is displayed.
Coding in php.
$c = curl_init();
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_URL, $receipturl);
$return = curl_exec($c);
curl_close($c);
if I output $return I get the following code:
<!DOCTYPE html><html><head><meta content="width=device-width, initial-scale=1" name="viewport" /><meta content="noindex,nofollow" name="robots" /><meta charset="utf-8" /><title></title><link rel="stylesheet" media="screen" href=["https://d3g64w74of3jgu.cloudfront.net/receipts/assets/application-d5e58bf4f1742c820fff780619a86ab3373b6b4f0f49eb8c5d8b61e7f5750f43.css"](https://d3g64w74of3jgu.cloudfront.net/receipts/assets/application-d5e58bf4f1742c820fff780619a86ab3373b6b4f0f49eb8c5d8b61e7f5750f43.css) /></head><body></body></html>