Saving and Editing of Credit Card details

Configuration of Admin Application

The admin app now allows you to enter and/or edit credit card details for any order using the "edit order" panel, which is opened by selecting an order and clicking the edit button. This functionality is only available if the role allows it. In order to set privileges you must navigate to Customers>>Maintain Roles and select a role. Once the role has been selected you must click the Privileges button and set the check box on the Edit Order panel shown below.

In order for the new role information to be picked up, you must log out and log in again, at which point in the edit order screen you should see the following fields (see below) which can be modified and saved. The information is saved in the database in fields e1 to e6 of the orders table in an encrypted format.

Configuration of Store Front Application

A new API call has been introduced in order to set the credit card details on an order.


    /**
     * The credit card details in the CreditCard object passed in as a parameter, are saved in the
     * database for an existing order. Before being saved, this sensitive information is encrypted.
     * No update or insert is done for attributes of the CreditCard object that are set to null. The
     * credit card details are mapped as follows to attributes in the order object:
     * 
     * e1 - Credit Card owner
     * e2 - Credit Card number
     * e3 - Credit Card expiration
     * e4 - Credit Card CVV
     * e5 - Credit Card Type
     * 
     * 
     * @param sessionId
     *            The session id of the logged in user
     * @param OrderId
     *            The numeric id of the order
     * @param card
     *            CreditCard object containing the credit card details
     * @throws KKException
     */

    public void setCreditCardDetailsOnOrder(String sessionId, int orderId, CreditCardIf card)
            throws KKException;

This API call can be integrated into the application where you see fit. i.e. You could write a simplified payment gateway that just collects the credit card information and saves it rather than sending it to a payment gateway. A configuration variable has been added which can be set in the admin app under configuration>>Stock and Orders .

This config variable could be used in your code to determine whether or not to save the credit card details. Using AuthorizenetAction as an example :