Hope someone can help me out here, please? 🙂
I've written my own code to allow one of my sites to sell young plants, collate the order and work out all the costs, postage etc.
However, whilst the formatting worked perfectly last year, this year the formatting is all to pot for the resulting message displayed to the customer in the pay portal (NoChex).
What I am trying to do, is pass a newline value within a php $value and nothing has worked so far.
I have tried \r, \n, %0A and %0D seperately and in unision, all to no avail. Sometimes the code appears, others, it's stripped out.
My code is thus:-
$nl = '+\r\n'; \\try all sorts!!
$m = 'Your+Order:'.$nl.$D_beg.'+Dobies+Begonias'.$nl.$D_liz.'+Dobies+Busy+Lizzies'.$nl.$D_pet.'+Dobies+Petunias'.$nl;
$m .= $P_beg.'+Dobies+Easiplants+Begonias'.$nl.$P_liz .'+Dobies+Easiplants+Busy+Lizzies'.$nl.$P_pet.'+Dobies+Easiplants+Petunias'.$nl;
$direct = "no" ;
$d = $_POST['direct'];
if ($d) $direct = "yes" ;
$m .= $nl.'Direct+delivery+from+Dobies:+'. $direct .$nl ;
$m .= $nl.'Thank+you+for+your+order.'.$nl.'This+will+be+confirmed+via+Email+within+24+hours.'.$nl.'IGA.';
$content = $m ;
$payurl = "https://www.nochex.com/nochex.dll/checkout?email=###########&amount=$cost&description=$m&returnurl=http://www.#########.org.uk/thank3.htm";
header( "Location: $payurl" );
exit;
The result is as below:=
Your Order: \r\n2 Dobies Begonias \r\n0 Dobies Busy Lizzies \r\n0 Dobies Petunias \r\n0 Dobies Easiplants Begonias \r\n0 Dobies Easiplants Busy Lizzies \r\n0 Dobies Easiplants Petunias \r\n \r\nDirect delivery from Dobies: no \r\n \r\nThank you for your order. \r\nThis will be confirmed via Email within 24 hours. \r\nThe IGA.
Any ideas please? I'm just going round in circles now and my head hurts from the brick wall!