Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
dmx1

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.

 

Thanks
               

 

 

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...