PayKrill Integration Guide

Accept Payments With PayKrill

PayKrill is an online payment gateway, and solution for pay online. Our main purpose is to digitize the money in this modern era.

This document covers the installation and use of this api and often reveals answers to common problems and issues - read this document thoroughly if you are experiencing any difficulties. If you have any questions that are beyond the scope of this document mail us here integration@paykrill.com.

Features

  • Accept Payments anywhere.
  • No Limits on payments.
  • Accpet 3rd party deposits. (no login needed)
  • VISA/Mastercard Payment Options
  • One touch payment solution.
  • Easy Approval of Merchant.
  • Pay Invoice with various methods.

PayKrill Plugins & Addons

Wordpress (WOOCOMMERCE)

Evolution Script (5.1 - 5.8)

HTML Form

Config form to get paid in your website

					

Filed Description

String Value Decription
merchant_account Eg: merchant@email.com This field is required to verify your account and to transfer payment direct to your wallet. Enter your email address with which you are registered in our website.
mcid Eg: PK-12345 Your Merchant ID (Find in Merchant Setting)
item_number Eg: 2 With this field, you can enter an order number, a product number, or any number that will be returned to your site upon successful payment to confirm the payment.
item_name Eg: iPhone 8 PLUS 64GB This will be shown in our payment page, to know customer for what pay.
item_price Eg: 1100 Enter valid order amount with numbers.
item_currency Eg: USD/EUR/RUB Enter the 3-letter abbreviation for your currency. It will be used for the payment order from your website.
site_url Eg: http://yourwebsite.com/ Enter Your Site URL address. (Same as in merchant setting)
return_success Eg: http://yourwebsite.com/success.php Enter page url addressfor IPN verification (php code is below) and successful payment message.
return_fail Eg: http://yourwebsite.com/fail.php Enter page url address with message for failed payment.
return_cancel Eg: http://yourwebsite.com/cancel.php Enter page url address with message for canceled payment.

Payment Verification (success.php)

IPN Verification to run code when payment was successful.


							$merchant_key = '...'; // Enter here your merchant API Key
                            
                            $merchant_account = $_POST['merchant_account'];
                            $item_number = $_POST['item_number'];
                            $item_name = $_POST['item_name'];
                            $item_price = $_POST['item_price'];
                            $item_currency = $_POST['item_currency'];
                            $custom = $_POST['custom'];
                            $txid = $_POST['txid']; // Transaction ID
                            $payment_time = $_POST['payment_time']; // Current time of payment
                            $payee_account = $_POST['payee_account']; // The account of payee
                            $verification_link = "https://www.paykrill.com/payment_status.php?merchant_key=$merchant_key&merchant_account=$merchant_account&txid=$txid";
                            $ch = curl_init();
                            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                            curl_setopt($ch, CURLOPT_URL,$verification_link);
                            $results=curl_exec($ch);
                            curl_close($ch);
                            $results = json_decode($results);
                            
                            if($results->status == "success") {
                                //Payment is successful
                                //Run your php code here
                                echo 'Payment is successful.';
                            } else {
                                echo 'Payment was failed.';
                            }