Ok,
It looks like PayPal has changed the API Endpoints.
The latest sandbox endpoint appears to be (according to Jan 2008
docs):
https://api.sandbox.paypal.com/nvp/
So the car $API_ENDPOINT needs to read
var $API_ENDPOINT = '
https://api.sandbox.paypal.com/nvp/';
But that isn't fixing it for me when I run your code. You will
probably need to contact PayPal about this, or use the developer
forums where other people working with the sandbox right now can help
you. I tried different version numbers, different end points, etc.
At this point it's not the phpPayPal class (that I can tell), and
that's really where my support (if any) stops. Sorry I can't help you
any further on that.
Also, in your programming, you probably need to swap these two lines:
$expire_date=$edate;
$edate=$_POST['month'].$_POST['year'];
so that they read:
$edate=$_POST['month'].$_POST['year'];
$expire_date=$edate;
Cause later down in your programming you use $expire_date, but that is
set to nothing because you set it before you set $edate.
Good luck
-Drew