Note that there are some explanatory texts on larger screens.

plurals
  1. POcard code is not validating in authorize.net
    primarykey
    data
    text
    <p>I am developing a web application. Here I have implemented the authorize.net payment gateway. But here the cave code is not validating correctly. If I give wrong card code the payment results in success But i need the result as payment declained</p> <p>Does anyone know this? see the code</p> <pre><code> "x_version" =&gt; "3.1", "x_delim_data" =&gt; "TRUE", "x_delim_char" =&gt; "|", "x_relay_response" =&gt; "FALSE", "x_type" =&gt; "AUTH_CAPTURE", "x_method" =&gt; "CC", "x_card_num" =&gt; $card_number, "x_exp_date" =&gt; $exp_date, "x_amount" =&gt; $amount, "x_description" =&gt; "Live Transaction", "x_card_code" =&gt; $ccv, "x_first_name" =&gt; $bill_name, "x_address" =&gt; $bill_address, "x_city" =&gt; $bill_city, "x_state" =&gt; $bill_state, "x_zip" =&gt; $bill_zip, "x_country" =&gt; $bill_country, "x_phone" =&gt; $bill_phone, "x_email" =&gt; $email, "x_ship_to_first_name" =&gt; $ship_name, "x_ship_to_address" =&gt; $ship_address, "x_ship_to_city" =&gt; $ship_city, "x_ship_to_state" =&gt; $ship_state, "x_ship_to_zip" =&gt; $ship_zip, "x_ship_to_country" =&gt; $ship_country, "x_ship_to_phone" =&gt; $ship_phone // Additional fields can be added here as outlined in the AIM integration // guide at: http://developer.authorize.net ); // This section takes the input fields and converts them to the proper format // for an http post. For example: "x_login=username&amp;x_tran_key=a1B2c3D4" $post_string = ""; foreach( $post_values as $key =&gt; $value ) { $post_string .= "$key=" . urlencode( $value ) . "&amp;"; } $post_string = rtrim( $post_string, "&amp; " ); // The following section provides an example of how to add line item details to // the post string. Because line items may consist of multiple values with the // same key/name, they cannot be simply added into the above array. // // This section is commented out by default. foreach( $line_items as $value ) { $post_string .= "&amp;x_line_item=" . urlencode( $value ); } // This sample code uses the CURL library for php to establish a connection, // submit the post, and record the response. // If you receive an error, you may want to ensure that you have the curl // library enabled in your php configuration $request = curl_init($post_url); // initiate curl object curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1) curl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. $post_response = curl_exec($request); // execute curl post and store results in $post_response // additional options may be required depending upon your server configuration // you can find documentation on curl options at http://www.php.net/curl_setopt curl_close ($request); // close curl object // This line takes the response and breaks it into an array using the specified delimiting character $response_array = explode($post_values["x_delim_char"],$post_response); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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