Jump to content
Larry Ullman's Book Forums

curl issue

Recommended Posts

Hi Larry,

I have managed to get all the way, error free up to the billing.php page.

When I get to the billing.php page and put in the values on page 306, and then try to process paymnet, I get an error saying:


An error occurred in script '/Applications/MAMP/htdocs/billing.php' on line 161:
Undefined offset: 3


The line it is referring to is in the billing.php page which is:


$reason = addslashes($response_array[3]);


I am not sure, but I think it may have something to do with the gateway_process.php page.


When I debugged the file, I get an empty string, "" returned when I execute:


$response = curl_exec($request);


This line is located in the gateway_process.php page.


I replaced all the https, with http, because I don't have an SSL certificate insalled yet.


Can you help me fix the problem please.





Link to comment
Share on other sites

The "undefined offset" means you're referring to an index position that doesn't exist. In this case, there is nothing at $response_array[3]. You should look at what $response_array is--what values it has indexed at what positions--and what you're actually trying to do to figure out what the right change is. 

Link to comment
Share on other sites


  • Create New...