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:
Merchant ID
Access Token & API Secret (See how to generate)
Magento 1.x Extension
Note: Please backup your running source code and database first.
Download the zip from here.
Install via Magento Connect
Go to Magento Connect Manager.
Go to Direct package file upload.
Click on Choose File and select the tgz file from Step 1.
Click on upload.
Install without Magento Connect
Unzip and open the downloaded folder.
Copy the app folder.
Paste and merge it into the Magento root folder.
Once Copy is done then clear the cache.
Copy the folders js.
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
Now login to the Magento Admin
Go to the Admin > System
Go to Configuration > Sales
In the menu panel click on Payment Methods > Paykun Checkout
Save the below configuration.
Enabled - Yes
Payment Action - Default
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
Debug - For troubleshooting, also enable magento log from the Configuration > Advanced > Log Settings > Set Enabled to Yes
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.
Download the code.zip file from the here.
Extract it to some temporary location.
Copy the code folder from the first step in your app folder. If you're performing an update, replace/overwrite the existing code folder.
Enable and deploy the PayKun module using commands: php bin/magento setup:upgrade.
Configuration
Log in Magento 2 admin
Go to the Stores tab on the control panel to the left
Click Configuration under Settings
Click on Sales Tab on the left
Click on Payment Methods
Find PayKun
Enter required credentials provided by Paykun.
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
Last updated