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 of the installation and administration below.

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

Requirements

  • Magento 2.3.x for optimal compatibility.

Installation and configuration

The plugin source code can be downloaded here.

1. Installation

Requirements:

  • You must have downloaded the Kushki payment module in .zip format.
  • You must have Magento installed and configured with the type of currency you will use.
  • You must have access to the administration section of Magento.

Follow these instructions to install the Kushki plugin on your Magento store:

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, clear 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, enable the Kushki payment plugin by changing to Yes in the Enabled section.

pmto01

Once you have enabled the 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 customers to pay from any country in the Payment from Applicable Countries section or 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.1.5. Finally, click Done to finish the activation.

The following GIF will show you the process to obtain the Magento credentials:

Credenciales

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 > Plugins. 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 form, in the section enter your credentials, you will need to enter the Consumer key , Consumer secret , Access token y Access token secret generated by Magento (step 2.2.2) for authentication purposes OAuth between Magento and Kushki. In the domain field, enter the domain of your store.

Formulario de pago magento

2.2.2.5. Then click the Verify tokens button to validate the credentials.
2.2.2.6. If the credentials are correct, and you have finished configuring the other payment form fields, click the Save Form button located at the bottom left of your screen next to the cancel button.

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 with predefined colors and styles. 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 through 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.

formulario_magento

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

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: It 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 Processing status, 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 satisfactorily carried out.

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 Pending status, 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 Pending status, 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.5. Request a chargeback

Follow these instructions to request a chargeback for approved transactions made with debit and credit card .

3.5.1. Log in to Magento with your merchant credentials.
3.5.2. Click on the Sales > Orders option on the left side menu.
3.5.3. Click View on the order to make the refund. The transaction must be in Processing status in order to make the refund.
3.5.4. Click on the Credit Memo section in the top menu.
3.5.5. Click the Refund Offline button to make the refund. The status of the transaction will change to Closed, indicating that the refund was requested.

Chargebacks can be of two kinds, depending on the day and time in which the original transaction and cancellation request are processed:

  • Cancellation (void): When the chargeback request is made on the same day of the transaction before the cut-off time, which varies by country, the cancellation occurs immediately.
  • Reimbursement (refund): When the chargeback request is made after the deadline. The process can take up to 45 days to be reflected as a credit note in the client’s account.

These are the deadlines provided by country to make cancellations:

ChileColombiaEcuadorMexicoPeru
Up to 3 hours after the transaction is approved.20:59 on the day of the transaction.21:00 on the day of the transaction.23:59 on the day of the transaction.20:59 on the day of the transaction.

4. Uninstallation

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

4.2. Find the module named Kushki_Payment and remove the module entry from the setup_module database table.

4.3. The Kushki_Payment module should also be removed from app > etc > config.php.

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

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

4.6. Display static content. Run the following command in the Magento2 root directory: php bin/magento setup:static-content:deploy.

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

5. Test your integration

There are test cards that you can use in test mode to make sure your integration is ready. Use them with any CVC and an expiration date greater than the current one.

  • Approved transaction: 5451951574925480
  • Declined transaction in token request (front-end): 4574441215190335
  • Declined transaction in collection request (back-end): 4349003000047015