Tuesday, September 3, 2013

authrize.net payment gateway standard from



<?php
    
require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2
$api_login_id = '####';
$transaction_key = '######';
$amount ='299.00';
$product_name ='Sat Act';// $_REQUEST['pro_name'];
$quantity = '1';//$_REQUEST['quan'];
$email = 'shamim@techwave.com';//$_REQUEST['email'];
$fp_timestamp = time();
$fp_sequence = "123" . time(); // Enter an invoice or other unique number.
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,
$transaction_key, $amount, $fp_sequence, $fp_timestamp)
?>


<input type='hidden' name="x_login" value="<?php echo $api_login_id?>" />
<input type='hidden' name="x_fp_hash" value="<?php echo $fingerprint?>" />
<input type='hidden' name="x_amount" value="<?php echo $amount?>" />
<input type='hidden' name="x_fp_timestamp" value="<?php echo $fp_timestamp?>" />
<input type='hidden' name="x_fp_sequence" value="<?php echo $fp_sequence?>" />
<input type='hidden' name="x_version" value="3.1" />
<input type='hidden' name="x_show_form" value="payment_form" />
<input type='hidden' name="x_Customer_IP" value="192.168.1.80" />
<input type='hidden' name="x_test_request" value="false" />
<input type='hidden' name="x_method" value="cc" />
<input type='hidden' name="x_receipt_link_method" value="LINK" />
<input type="hidden" name="x_receipt_link_text" value="Back to Merchant Page" /> 
<input type="hidden" name="x_show_form" value="payment_form" >
<input type="hidden" name="x_color_background" value="#EBE2DA" />
<input type="hidden" name="x_header_email_receipt" value="Thanks for using our services, your purchase receipt as follows :" />
<input type="hidden" name="x_footer_email_receipt" value="Regards, Team Apollo" />
<input type="hidden" name="x_description" value="Payment for the purchase of <?php echo $quantity ?> <?php echo $product_name ?>." />
<input type="hidden" name="x_relay_response" value="true" />

<input type='submit' value="Pay Now!" />

</form>

response from authorize.net


[x_response_code] => 1
    [x_response_reason_code] => 1
    [x_response_reason_text] => This transaction has been approved.
    [x_avs_code] => Y
    [x_auth_code] => US1XSP
    [x_trans_id] => 2197889179
    [x_method] => CC
    [x_card_type] => Visa
    [x_account_number] => XXXX1111
    [x_first_name] => shamim
    [x_last_name] => khan
    [x_company] => htss
    [x_address] => htss
    [x_city] => new del
    [x_state] => del
    [x_zip] => 110019
    [x_country] => india
    [x_phone] => 9999999999999
    [x_fax] => 99999999999
    [x_email] => shamim@techwave.com
    [x_invoice_num] =>
    [x_description] => Payment for the purchase of 1 Sat Act.
    [x_type] => auth_capture
    [x_cust_id] =>
    [x_ship_to_first_name] => shamim
    [x_ship_to_last_name] => khan
    [x_ship_to_company] => htss
    [x_ship_to_address] => htss
    [x_ship_to_city] => new del
    [x_ship_to_state] => del
    [x_ship_to_zip] => 110019
    [x_ship_to_country] => india
    [x_amount] => 299.00
    [x_tax] => 0.00
    [x_duty] => 0.00
    [x_freight] => 0.00
    [x_tax_exempt] => FALSE
    [x_po_num] =>
    [x_MD5_Hash] => FED964A5A4FBF5E2D3B79FF49E074BDE
    [x_cvv2_resp_code] =>
    [x_cavv_response] => 2
    [x_test_request] => false
    [option] => com_checkout
 

No comments:

Post a Comment