Magento

Magento gives you the power to create unique and engaging shopping experiences. Enjoy rich, out-of-the-box features, an unrivaled ability to customize, and seamless third-party integrations. With the eCommerce platforms, a global ecosystem of implementation partners, and a vast marketplace of extensions, it’s time to bring your commerce vision to life.

Integrating your PayKun allows you to accept payments on your Magento website via the PayKun Payment Gateway. Collecting online payments can be very easy with PayKun.

You can provide multiple payment options to your customer and a great checkout experience. Also, they will get all sorts of payment option that will make them buy on the spot.

Following two versions of the extension are supported of Magento:

  • Magento 1.x extension

  • Magento 2.x extension

Prerequisite

Following things will be required before you can begin integration:

Magento 1.x Extension

Note: Please backup your running source code and database first.

Download the zip from here.

Install via Magento Connect

  1. Go to Magento Connect Manager.

  2. Go to Direct package file upload.

  3. Click on Choose File and select the tgz file from Step 1.

  4. Click on upload.

Install without Magento Connect

  1. Unzip and open the downloaded folder.

  2. Copy the app folder.

  3. Paste and merge it into the Magento root folder.

  4. Once Copy is done then clear the cache.

  5. Copy the folders js.

  6. Paste and merge it into the Magento root folder.

Once installed, navigate to Configuration and then to Payment Gateways and configure the extension to suit your needs.

Configuration

  1. Now login to the Magento Admin

  2. Go to the Admin > System

  3. Go to Configuration > Sales

  4. In the menu panel click on Payment Methods > Paykun Checkout

  5. Save the below configuration.

    1. Enabled - Yes

    2. Payment Action - Default

    3. Merchant Id - Staging/Production Merchant Id provided by Paykun

    4. Access Token - Staging/Production Access Token provided by Paykun

    5. Encryption Key - Staging/Production Encryption Key provided by Paykun

    6. Debug - For troubleshooting, also enable magento log from the Configuration > Advanced > Log Settings > Set Enabled to Yes

  6. Now you will be able to see paykun payment method in the checkout page.

API ENCRYPTION KEY GUIDE

  • Copy your Merchant ID which you will get by clicking on your profile picture

  • Then go to the Settings Tab.

  • Go to the Security Option.

  • Click on Generate API Key and download your Access Token and Encryption Key(API Secret Key).

  • You need to set: isLive=false in your integration kit.

  • If you have generated API Key before then you will see the date of the API Key generated, since you will not be able to retrieve the old API Key (For security reasons) we have provided the re-generate option, so you can re-generate API Key in case you have lost the old one.

  • Note : Once you re-generate API Key your old API Key will stop working immediately. So be cautious while using this option.

Troubleshooting

There are possible errors, causes and fixes for the same:

Error

Cause

Fix

INVALID_REQUEST

Wrong settings provided, max transaction amount limit

Please verify all the settings you have used, like merchant id, access token, enc key, amount, order_id

UNAUTHORIZED

Please check the registered domain at PayKun

localhost only allowed in testing mode, for live you must have to use registered domain.

cURL error

PHP-curl not installed on your server.

Install PHP-curl on your server.

cURL error

Port 443 - blocked.

Contact your hosting service to unblock the port.

For any Assistance

In case of any query, please contact to tech@paykun.com

Magento 2.x Extension

Installation

Note: Please backup your running source code and database first.

  1. Download the code.zip file from the here.

  2. Extract it to some temporary location.

  3. Copy the code folder from the first step in your app folder. If you're performing an update, replace/overwrite the existing code folder.

  4. Enable and deploy the PayKun module using commands: php bin/magento setup:upgrade.

Configuration

  1. Log in Magento 2 admin

  2. Go to the Stores tab on the control panel to the left

  3. Click Configuration under Settings

  4. Click on Sales Tab on the left

  5. Click on Payment Methods

  6. Find PayKun

  7. Enter required credentials provided by Paykun.

  8. Save the below configuration.

    • Enable - Yes

    • Title - Paykun

    • Merchant Id - Staging/Production Merchant Id provided by Paykun

    • Access Token - Staging/Production Access Token provided by Paykun

    • Encryption Key - Staging/Production Encryption Key provided by Paykun

    • Payment Action - Authorize

    • Debug - For troubleshooting, also enable magento log from: Configuration > Advanced > Log Settings > Set Enabled to Yes

API ENCRYPTION KEY GUIDE

  • Copy your Merchant ID which you will get by clicking on your profile picture

  • Then go to the Settings Tab.

  • Go to the Security Option.

  • Click on Generate API Key and download your Access Token and Encryption Key(API Secret Key).

  • You need to set: isLive=false in your integration kit.

  • If you have generated API Key before then you will see the date of the API Key generated, since you will not be able to retrieve the old API Key (For security reasons) we have provided the re-generate option, so you can re-generate API Key in case you have lost the old one.

  • Note : Once you re-generate API Key your old API Key will stop working immediately. So be cautious while using this option.

Troubleshooting

There are possible errors, causes and fixes for the same:

Error

Cause

Fix

INVALID_REQUEST

Wrong settings provided, max transaction amount limit

Please verify all the settings you have used, like merchant id, access token, enc key, amount, order_id

UNAUTHORIZED

Please check the registered domain at PayKun

localhost only allowed for testing mode, for live you must have to use registered domain.

cURL error

PHP-curl not installed on your server.

Install PHP-curl on your server.

cURL error

Port 443 - blocked.

Contact your hosting service to unblock the port.

For any Assistance

In case of any query, please contact to tech@paykun.com