### Configuring Credit Cards Processing

The private data for credit cards saved in HSPcomplete is encrypted with public key and after this, to perform transaction, you need a secret key to decrypt it. HSPcomplete allows generating two key pairs - to use the second one if the first key pair is lost. If you already have a key pair saved somewhere, you can upload it.Thus, first of all you need to generate or upload the key pair.

Note: If you are generating the second key pair, the private data for all credit cards saved in HSPcomplete by this moment is decrypted with the first secret key and after this, encrypted once again with the new public key. This means that if you lost the first secret key, you will be unable to generate the second key pair: HSPcomplete will be unable to decrypt the credit card data. Thus, your keys should be stored in a safe place.

To configure credit cards processing:

1. Open the Business Director submenu on the Navigation tree and select the Billing Manager.
2. Open the Billing Manager submenu on the Navigation tree and select Setup. The Billing Setup dashboard appears on the screen.
3. Click on the Credit Card Processing link at the Billing Setup dashboard. The credit card processing settings appear on the screen.
4. Click the Keys Management tab. The list of keys (if any) appears on the screen.
5. To generate or upload a key pair, click the New Key button. The form for keys generation or uploading appears on the screen.

   Note: You can have two key pairs, as maximum. Thus, if two key pairs exist in HSPcomplete, then the New Key button is hidden. If keys already exist in HSPcomplete, you can see the list in which a key pair is referred to by a short name assigned during generation or uploading (Title). Green ticks in Public Key and Secure Key columns indicate that the keys are actually stored in the HSPcomplete. To change the key title or delete a key, click on its title.

6. Fill the form:
   1. Type the short name for the key pair (any alphanumeric identifier you consider convenient) into the Name field.
   2. Select what you want to do:
   - To generate a new key pair set the option button to Generate a public/secure key pair. Type the passphrase for the secure key into the relevant field.
   - To upload the existing key set the option button to Upload your public/secure keys. Either paste the public and secure keys content into the Public key and Secure key fields respectively or specify the path to the files containing the public and secure keys in the relevant fields (you can click the Browse button and locate the files). Type the passphrase for the secure key into the relevant field.
7. Click the Add button. In a few seconds the generated (or uploaded) keys appear on the screen.

   Important: Copy and save the newly generated key pair.

8. Click the General Settings tab. Here you can enable the recurring billing.
9. Click the Edit button.
10. Edit the credit card processing settings:
    - To enable the recurring billing, set the radio button to Store credit card information. After this, you can either enable automated processing of documents (set the radio button to Automated so that all renewal Orders received will be automatically processed once a day, at one time) or you can chose manual processing of documents (set the radio button to Human Supervised).

      For Automated processing of Orders, the three additional options are available:

      Always save customer credit card data during processing in store. If this checkbox marked, the data about all credit cards used in your HSPstore will be saved in HSPcomplete. To view the credit cards list (and transactions for each credit card) you can click the Credit Cards item in Billing Manager submenu.

      Save credit card validation code (CVV) for future transactions. You can mark this checkbox to save the CVV codes together with the other credit card data. The CVV code is a three- or four-digit code which provides a cryptographic check of the information embossed on the card. The CVV code is not part of the card number itself. The CVV code helps ascertain that the customer placing the order actually possesses the credit/debit card and that the card account is legitimate.

      Note: If you enable the CVV saving it will be necessary for you to enter the CVV code when saving a credit card in HSP complete (the CVV Code field will appear in the New Credit Card form).

      Use first saved card to automatically process recurring orders. If this checkbox marked, then in the case if a customer does not have credit cards saved at HSPcomplete, the first credit card used by this customer at your HSPstore will be saved and, after a successful transaction, this card will be automatically used for recurring billing in HSPcomplete.

    - To disable recurring billing, set the radio button to Do not store.
11. Click the Save button.