PGP encryption -- What do I do now that it is working?

### Index Up << >>

## PGP encryption -- What do I do now that it is working?

This depends on what you do with orders once you receive them by email.

Some PC mail agents (notably Eudora) will decrypt the PGP message embedded within the message text. In that case, you can simply embed the `[value mv_credit_card_info]` call right in the message and be done with it.

If your mailer will not decrypt on the fly, the best way to read the credit card number is to set up MIME encoding of the order email. To do this, find the order report you are using. In the standard demos it is `pages/ord/report.html` or `etc/report`.

Set up two MIME regions in that file. First, at the top of the file:

        [tag mime type TEXT/PLAIN; CHARSET=US-ASCII][/tag]
        [tag mime Order Text]

        ORDER DATE: [calc]localtime[/calc]
        ORDER NUMBER: [value mv_order_number]

        Name: [value name]
        Company: [value company]

        (Rest of order text, including item list)
        [/tag]

Then, at the bottom of the report.html file, put the credit card info:

        [if value mv_credit_card_info]
        [tag mime type application/pgp-encrypted][/tag]
        [tag mime Credit Card Information]

        [value mv_credit_card_info]

        [/tag]
        [/if]

Once this is done, you can then read mail, using your PGP client as a helper application to decode the MIME attachment. This does not require a fancy setup -- you can use the standard MIT PGP 2.6.2 if desired. If you are using UNIX, set up as the helper for the MIME type application/pgp-encrypted:

        xterm -e pgp -m %s

On windows, it might be:

        c:\mycommands\pgp -m %s

More automated or user-friendly setups are left as an exercise for the user.

### Index Up << >>