Changeset 675

Show
Ignore:
Timestamp:
04/28/08 11:09:00 (7 months ago)
Author:
areski
Message:

improve on transaction ID for epayment

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.3/A2BCustomer_UI/checkout_confirmation.php

    r1 r675  
    1313include ("./lib/smarty.php"); 
    1414 
    15 //include ("./form_data/FG_var_callerid.inc"); 
    1615 
    1716if (! has_rights (ACX_ACCESS)){ 
     
    3433$paymentTable = new Table(); 
    3534$time_stamp = date("Y-m-d h:i:s");  
    36 $QUERY = "INSERT INTO cc_epayment_log (cardid,amount,vat,paymentmethod,cc_owner,cc_number,cc_expires,creationdate) VALUES ('".$_SESSION["card_id"]."','$amount', 0, '$payment','$authorizenet_cc_owner','$authorizenet_cc_number','".$authorizenet_cc_expires_month."-".$authorizenet_cc_expires_year."','$time_stamp')"; 
    37 $paymentTable->SQLExec($HD_Form -> DBHandle, $QUERY); 
    3835 
    39 $QUERY = "SELECT max(id) from cc_epayment_log"; 
    40 $transaction_no = $paymentTable->SQLExec ($DBHandle, $QUERY); 
     36$QUERY_FIELDS = "cardid,amount,vat,paymentmethod,cc_owner,cc_number,cc_expires,creationdate"; 
     37$QUERY_VALUES = "'".$_SESSION["card_id"]."','$amount', 0, '$payment','$authorizenet_cc_owner','$authorizenet_cc_number','".$authorizenet_cc_expires_month."-".$authorizenet_cc_expires_year."','$time_stamp'"; 
     38$transaction_no = $paymentTable->Add_table ($HD_Form -> DBHandle, $QUERY_VALUES, $QUERY_FIELDS, 'cc_epayment_log', 'id'); 
    4139 
    42 $key = securitykey(EPAYMENT_TRANSACTION_KEY, $time_stamp."^".$transaction_no[0][0]."^".$amount."^".$_SESSION["card_id"]); 
     40$key = securitykey(EPAYMENT_TRANSACTION_KEY, $time_stamp."^".$transaction_no."^".$amount."^".$_SESSION["card_id"]); 
    4341 
    44 if($transaction_no[0][0] == null) 
    45 
     42if(empty($transaction_no)) { 
    4643        exit(gettext("No Transaction ID found")); 
    4744} 
     
    5350 
    5451if (is_array($payment_modules->modules)) { 
    55     $payment_modules->pre_confirmation_check(); 
    56   } 
     52        $payment_modules->pre_confirmation_check(); 
     53
     54 
    5755// #### HEADER SECTION 
    58  
    5956 
    6057$smarty->display( 'main.tpl'); 
     
    7269<?php 
    7370  if (is_array($payment_modules->modules)) { 
    74     echo $payment_modules->process_button($transaction_no[0][0], $key);     
     71    echo $payment_modules->process_button($transaction_no, $key);     
    7572  } 
    7673?> 


Google