Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Getting Secure Trading Auth code into the admin order email output

    Hi, I use secure trading as a payment processor, and Id like to find out how I can get a copy of the auth code into the admin order email.

    The Secure trading module code goes as below.., id like to get the fields in bold to go into the email, as this shows any security flags on the transaction, and the auth code.

    <?php
    // strip slashes in case they were added to handle apostrophes:
    foreach ($stresult->fields as $key=>$value){
    $stresult->fields[$key] = stripslashes($value);
    }

    // display all status fields (in admin Orders page):
    $output = '<td><table>';
    $output .= '<tr style="background-color : #cccccc; border-style : dotted;">';
    $output .= '<td valign="top">SecureTrading Transaction Details</td></tr>';
    $output .= '<tr><td>';
    $output .= '<table>';

    $output .= '<tr><td class="main">Auth Code:</td>';
    $output .= '<td class="main">'.$stresult->fields['authcode'].'</td></tr>';
    $output .= '<tr><td class="main">Transaction Reference:</td>';
    $output .= '<td class="main">'.$stresult->fields['transaction_id'].'</td></tr>';
    $output .= '<tr><td class="main">Transaction Time:</td>';
    $output .= '<td class="main">'.$stresult->fields['time'].'</td></tr>';
    $output .= '<tr><td class="main">Security Response:</td>';
    $output .= '<td class="main">'.$stresult->fields['securityresponse'].'</td></tr>';
    $output .= '<tr><td class="main">Response/Error Message:</td>';
    $output .= '<td class="main">'.$stresult->fields['responsemessage'].'</td></tr>';

    $output .= '<tr><td class="main">View on SecureTrading:</td>';
    $output .= '<td class="main"><a target=blank href=https://securetrading.net/merchantServices/singletransactionview.cgi?transactionreferencelist='.$stresult->fields['transaction_id'].'>Login & View</a></td></tr>';

    $output .= '</table>';
    $output .= '</td></tr>';
    $output .= '<tr><td>';
    $output .= '</td></tr>';
    $output .= '</table></td>';
    ?>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Getting Secure Trading Auth code into the admin order email output

    That has to be done inside the payment module itself.

    In most modules it would be done near the end of the before_process() method, after the payment has been verified as valid. Simply set $this->transaction_id and $this->auth_code to whatever corresponding value was received from the gateway.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Add field into order success email - code not working
    By lightup in forum Managing Customers and Orders
    Replies: 4
    Last Post: 22 Jan 2013, 09:24 PM
  2. Secure Trading customising
    By JaminT in forum Addon Payment Modules
    Replies: 6
    Last Post: 11 Jul 2011, 06:25 PM
  3. hard code url into order confirmation email
    By gsdcypher in forum General Questions
    Replies: 0
    Last Post: 10 Dec 2010, 09:06 PM
  4. Secure Trading Module
    By pickledshark in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Aug 2006, 07:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR