Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well assumign the code you posted is accurate then this line is the issue:</p> <pre><code>$URL:https://demo.firstach.com/https/TransRequest.asp?Login_ID=someit&amp;Transaction_Key=somekey&amp;Customer_ID=23&amp;Customer_Name=Muhammad Naeem&amp;Customer_Address=Address&amp;Customer_City=city&amp;Customer_State=HI&amp;Customer_Zip=54000&amp;Customer_Phone=--&amp;Customer_Bank_ID=111111118&amp;Customer_Bank_Account=12345678901234567890&amp;Account_Type=Business Checking&amp;Transaction_Type=Debit&amp;Frequency=Once&amp;Number_of_Payments=1&amp;Effective_Date=12%2F05%2F2010&amp;Amount_per_Transaction=10.00&amp;Check_No=&amp;Memo=&amp;SECCType=WEB </code></pre> <p>here it looks liek you attemtp to define <code>$URL</code> but when you use it with cURL you are referencing <code>$url</code>. The varibales are case sensitive. Secondly you have <code>$URL:</code> which is not valid you want to use <code>$url =</code>. </p> <p>Addiitonally i would encode the params like this:</p> <pre><code>$baseurl = 'https://demo.firstach.com/https/TransRequest.asp'; $params = array( 'Login_ID' =&gt; 'someit', 'Transaction_Key' =&gt; 'somekey', 'Customer_ID'= =&gt; 23, 'Customer_Name' =&gt; 'Muhammad Naeem', 'Customer_Address' =&gt; 'Address', 'Customer_City' =&gt; 'city', 'Customer_State' =&gt; 'HI', 'Customer_Zip' =&gt; '54000', 'Customer_Phone' =&gt; '--', 'Customer_Bank_ID' =&gt; '111111118' 'Customer_Bank_Account' =&gt; '12345678901234567890' 'Account_Type' =&gt; 'Business Checking' 'Transaction_Type' =&gt; 'Debit' 'Frequency' =&gt; 'Once' 'Number_of_Payments' =&gt; 1, 'Effective_Date'=&gt; '12/05/2010', 'Amount_per_Transaction' =&gt; '10.00', 'Check_No'=&gt; '', 'Memo'=&gt; '', 'SECCType' =&gt; 'WEB' ); $url = sprintf('%s?%s', $baseurl, http_build_query($params)); </code></pre> <p>That way <code>http_build_query</code> will take care of all your url encoding and you can work with an array before hand so its easy to see whats going on and add/remove/change paramters. Alternatively if its a post request you could jsut use:</p> <p><code>curl_setopt($ch, CURLOPT_POSTFIELDS, $params);</code></p> <p>which will take care of all the parameter encoding and what not directly from the array this way they dont need to be appended manually to the <code>$url</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload