HI I have the following folder structure
/app/start.php
/php/ProcessOrder.PHP
/php/Checkout.php
Checkout.php is a test api call to paypal and when i put the full URL in the browser it works great.
my Index.html makes a post to ProcessOrder.php which saves the data to my database then should work with the api to pass the details to paypal.
both processorder and checkout are in the same folder and both have the same require statement
require ("/../app/start.php");
why does process.php return html 302, but checkout runs? I believe it's the require statement as when I rem it out the file process ok apart from the paypal also I got the database all working before starting on the paypal API.
discovered its the last line
which should take me to paypal the url https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-1PG60856DA4942405
the line code is,
header("Location: {$approvalUrl}");
this line is the same in processorder and checkout.php