[ic] Admin UI Decrypt Credit Card - Show Order

Steve Graham icdev at mrlock.com
Fri Mar 24 14:33:05 EST 2006


Hello,

FWIW

I just modified a section of code in Admin UI IC 5.4 - thought I 
would just post this as informational.

With IC 5.4 and a few versions earlier, you can decrypt the order 
credit card information from a user terminal that has the gpg/pgp 
key. (If the order information is still available)

We also wanted to be able to view the entire order as sent via email:
This code will deliver the order information delivered as an rtf 
(wordpad) document - change for what ever application you need to 
view the order.


find these sections of code in order_view.html

[if type=file 
term="[either]__ORDER_DIRECTORY__[or]orders[/either]/[loop-code]"]
         <tr>
             <td align=right>&nbsp;</td>
             <td>[page href="process/[loop-code].pgp"
                   add_dot_html=0
                   form="
                 deliver_encrypted=1
                 mv_todo=return
                 mv_nextpage=@@MV_PAGE@@
                 order=[loop-code]
                 "][L]Decrypt Credit Card[/L]</a>
             </td>
+            <td align=left>&nbsp;</td>
+           <td>[page href="process/[loop-code].rtf"
+                  add_dot_html=0
+                  form="
+                  deliver_encrypted=0
+                 deliver_order=1
+                  mv_todo=return
+                  mv_nextpage=@@MV_PAGE@@
+                  order=[loop-code]
+                "]Show Order</a>
+            </td>
         </tr>
[/if]


and this section:

[calc]
         delete $Scratch->{ui_bounce};
         if ($CGI->{order}) {
                 if($CGI->{deliver_encrypted}) {
                         my $dir = q{__ORDER_DIRECTORY__} || 'orders';
                         my $ord = $Tag->filter('filesafe', $CGI->{order});
                         $Tag->deliver({
                                                         file => "orders/$ord",
                                                         get_encrypted => 1,
                                                         type => 
'application/pgp-encrypted',
                                                 });
                     }
+         if($CGI->{deliver_order}) {
+                        my $dir = q{__ORDER_DIRECTORY__} || 'orders';
+                        my $ord = $Tag->filter('filesafe', $CGI->{order});
+                        $Tag->deliver({
+                                                        file => "orders/$ord",
+                                                        get_encrypted => 0,
+                                                        type => 
'application/rtf',
+                                                });
+                    }
                 return;

         }

         $CGI->{order} = $CGI->{mv_arg}
                 or $Scratch->{ui_bounce} = '__UI_BASE__/order';
         return;
[/calc]

There might be an easier way, but it works.

-Steve



More information about the interchange-users mailing list