Magento

Accept payments for your e-commerce through Magento

Magento

Magento is an open source, e-commerce platform coded in PHP. Magento’s source code is distributed under an Open Software License v3.0.

For these reasons, Kushki sought to integrate its payment methods by creating a plugin that allows making payments with a card; you will find the details on installation and administration below.

Accept ✅Reject ❌
Debit and credit card paymentsRecurring Charges
Authorization and capture
Cash payments
Transfers
Total reimbursements

Requirements

  • Magento 2.X for optimal compatibility.

Installation and configuration

The plugin source code can be downloaded here: https://github.com/Kushki/kushki-magento/releases

1. Installation

1.1. Extract the .zip file contents

1.2. In the Magento installation directory, go to app>code (in case it does not exist, you must create the code folder) and paste the folder extracted from step 1. The final path should be app > code > Kushki > Payment.

1.3. Upgrade Magento. From an SSH terminal, run the following command in the Magento 2 root directory: php bin/magento setup:upgrade.

1.4. Compile the setup by running the following command: php bin/magento setup:di:compile.

1.5. Deploy static content. Run the following command in the Magento 2 root directory: php bin/magento setup:static-content:deploy.

1.6. Finally, flush the cache by running the command: php bin/magento cache:flush.

2. Setup

2.1. Enable Kushki in your Magento store

2.1.1. Go to Store > Configuration > Sales > Payment Methods > Kushki Payment, and enable Kushki payment methods features and their settings.

pmto01

Once you have enabled Kushki payment method, the credentials and features fields will be visible.

pmto02

2.1.2 Add the payment title that will be shown to the customer in the front-end.

2.1.3. Add public and private keys. These credentials can be found in the Kushki administration console, in the Developers section, Credentials option.

2.1.4. Enable the environment for requests to be sent to Kushki’s server by using the option Enable Test Mode:

  • For the test environment, select YES
  • For the production environment, select NO

2.1.5. Allow payments from any country in the Payment from Applicable Countries section or add restrictions in the list of countries in the Payment from Specific Countries section.

2.1.6. Enter the maximum and minimum value to restrict the payment based on the total amount. (Optional)

2.1.7. In the Sort option, adjust the checkout position that will be displayed on your website. (Optional)

2.2. Set up your Magento credentials in the Kushki Console

In order for the payments you receive by transfer or cash to work correctly, it is necessary to set up the credentials that Magento provides you with in the Integrations section.

2.2.1. Get Magento credentials

Follow these instructions to get the Magento integration credentials:

2.2.1.1. From your Magento store, go to System > integrations
. 2.2.1.2. Once inside, click on the Add New Integration button to generate a new integration. A new window will open to enter the integration information.
2.2.1.3. Add a name for the new integration (e.g. Kushki) and click on the Save button to save the new integration. The system will take you back to the screen with the list of available integrations
2.2.1.4. Click on Activate and then on the Allow button. You will see on screen the credentials needed to set up inside the Kushki console.

2.2.2. Enter Magento credentials in your Kushki Console

2.2.2.1. Log in to your Kushki console.
2.2.2.2. Go to Configuration > Integrations > Kajita. The available e-commerce plugins will be displayed.
2.2.2.3. Select Magento and proceed to set up the content and style of your form.
2.2.2.4. In the Enter your credentials section, set up the credentials previously obtained in Magento and click on the Verify tokens button in order to verify that the credentials are valid.

2.3. Customize your payment form from the Console

By linking your Magento store with Kushki, our payment form will be added in default version. To customize your payment form (Kajita) in your Magento store, follow these steps:

2.3.1. Log in to your Administration Console and go to the Configuration section.
Browse the page until you find the Integrations section.
2.3.2. Click on Plugins
2.3.3. Select Magento. A notice will be displayed.
2.3.4. Click on the button Set up the content and style of your form. Your Kajita for Magento will be displayed.
2.3.5. Choose whether you wish to receive payments by one-time payment or by authorization and capture.

2.3.6. Follow the instructions given in Customize your payment form to customize the payment form for your Magento store.

formulario_magento

3. Operation of the plugin

Now that you have the plugin installed and set up, it is time to see how to operate with it.

3.1. Order statuses in Magento

In Magento, we can have different statuses for an order. The following are the possible order statuses with the plugin:

Pending: This is the status of new orders that have not yet been processed.

  • Processing: Means that the order has been invoiced or shipped, but not both.
  • Complete: Orders marked as complete have been invoiced and shipped in full.
  • Canceled: The order has not been paid.
  • Closed: Payment for the order has been refunded.

3.2. Process one-time card payments

In order to process one-time payments with credit and debit cards, it is necessary that the One-time payment option is selected at the top as well as the Credit and Debit Card option in the Payment Options>Payment Methods section within the Kushki console in the following path: Configuration > Integrations > Plugins > Magento > Set up the content and style of your form.

Once a new order is generated, you will see the transaction in the order list (Sales > Orders) with the status Processing, which indicates that the payment has already been made.

Status_magento_ES

When the shipping is completed, the status of the order will change to Complete, which indicates that both the ship and the charging have been carried out satisfactorily.

3.3. Process payments with transfer

In order to process payments with transfer, it is necessary that the One-time payment option is selected at the top as well as the Transfer option in the Payment Options>Payment Methods section within the Kushki console in the following path: Configuration > Integrations > Plugins > Magento > Set up the content and style of your form.

Once a new order is generated, you will see the transaction in the order list (Sales > Orders) with the status Pending, which indicates that the payment is waiting to be processed. Once the transfer has been successfully completed, the status of the order will change to Processing, indicating that the transaction was successfully paid.

3.4. Process cash payments

In order to process payments with cash, it is necessary that the One-time payment option is selected at the top as well as the Cash option in the Payment Options>Payment Methods section within the Kushki console in the following path: Configuration > Integrations > Plugins > Magento > Set up the content and style of your form.

Once a new order is generated, we can see the transaction in the Magento store in the order list (Sales > Orders) with the status Pending, which indicates that the payment is waiting to be processed. Once the payment has been successfully completed, the status of the order will change to Processing, indicating that the transaction was successfully paid.

3.6. Request a refund

Follow these instructions to request refunds for card payments in approved status.

No refunds are allowed for partial amounts in Magento.

These are the instructions to request the refund of approved debit and credit card transactions.

  1. Log in to Magento with your merchant credentials.
  2. Click on the Sales > Orders option on the left side menu.
  3. Click on View in the order to be refunded. The transaction must be in Processing status to be eligible for the refund.
  4. Click on the Credit Memo section in the top menu.
  5. Click on the Refund Offline button to perform the refund. The status of the transaction will change to Closed, indicating that the refund was requested. Refunds can be of two types, depending on the day and time the original transaction and cancellation request are processed:
  • Void: When the refund request is made on the same day of the transaction before the time limit, which varies from country to country, the cancellation occurs on the spot.

  • Refund: When the refund request is made after the time limit. The process can take up to 45 days to be reflected as a credit note in the customer’s account.

4. Uninstall

3.1. In the Magento installation directory, go to app > code and delete the folder containing the Kushki source code.

3.2. Search the module called Kushki_Payment and delete the module entry from the database table setup_module.

3.3. The Kushki_Payment module must also be deleted from app > etc > config.php.

3.4. Upgrade Magento. From an SSH terminal, run the following command in the Magento 2 root directory: php bin/magento setup:upgrade.

3.5. Compile the installation by running the following command: php bin/magento setup:di:compile

3.6. Deploy static content. Run the following command in the Magento 2 root directory: php bin/magento setup:static-content:deploy.

3.7. Finally, flush the cache by running the command: php bin/magento cache:flush.

4. Test your integration

You may use test cards in test mode to ensure that your integration is ready. Use them with any CVV and a future expiration date.

  • Approved transaction: 5451951574925480
  • Transaction declined on token request (front-end): 4574441215190335
  • Transaction declined at payment request (back-end): 4349003000047015