Forum Moderators: coopster
Here is part of my array:
$grid_array = array("A1" => "V", "A2" => "2", "A3" => "1", "A4" => "N", "A5" => "7", "B1" => "H", "B2" => "9", "B3" => "3", "B4" => "T", "B5" => "J", "C1" => "9", "C2" => "2", "C3" => "2", "C4" => "6", "C5" => "Y", "D1" => "N", "D2" => "1", "D3" => "R", "D4" => "8", "D5" => "K");
I can get the coordinates from the first hit which comes in XML as fields "response1", "response2", and "response3", but how do I code it so it grabs the appropriate value for me to send on the second hit through "challenge1", "challenge2", and "challenge3"?
Here is my post area:
curl_setopt($ch_pay, CURLOPT_POSTFIELDS, array
('login'=>$_POST['login'],
'pass'=>$_POST['pass'],
'paymentmethod'=>$_POST['paymentmethod'],
'billing_name'=>$_POST['billing_name'],
'billing_address'=>$_POST['billing_address'],
'billing_city'=>$_POST['billing_city'],
'billing_state'=>$_POST['billing_state'],
'billing_zipcode'=>$_POST['billing_zipcode'],
'billing_email'=>$_POST['billing_email'],
'frequency'=>$_POST['frequency'],
'SEC'=>$_POST['SEC'],
'startdate'=>$_POST['startdate'],
'amount'=>$_POST['amount'],
'cardholder_name'=>$_POST['cardholder_name'],
'cardnumber'=>$_POST['cardnumber'],
'cvv_code'=>$_POST['cvv_code'],
'expmon'=>$_POST['expmon'],
'expyear'=>$_POST['expyear'],
'response1'=>$grid_array[$xdoc1->challenge1],
'response2'=>$grid_array[$xdoc1->challenge2],
'response3'=>$grid_array[$xdoc1->challenge3]));
I know the formatting of the "response" fields are incorrect, so if there is any suggestions on how to pass that, I would appreciate it, because currently I get "Illegal Offset Type". And I've been trying to change it so much to make it work I don't even know what I had before or where to go with it.
Well my official answer at this time is:
I don't use cURL. I don't want to use cURL. I'm not really sure what you are doing or how you are trying to send information anywhere from where you are now, because all I see is you setting an array of posted values and I'm really not sure where it's breaking, except on the last 3 array pieces being set...
But I can say Welcome to WebmasterWorld! and see if someone else has a better response than I do if you are still needing help with it.
Have a good week!