﻿Magento-2.x-Airpay Plugin
 About: 

This file is a technical guide for integration of merchant backend with AIRPAY. Please refer to below guidelines            for integration. 

A. Instructions:

Fill up Airpay integration formaration form 


*   Login to your Airpay Account and Go to My Account > Integration 
*   For Success Url, enter the following url http://youtstorehomeurl.com/airpay/payment/response
*   Enter other details, generate key and press save


Adding module files to your magento installation:

*  Please take a backup of your code for safety. 
*  Please make sure that app/ directory is writable.
*  Inside app folder create a folder as name code
*  Inside the code folder place the Airpay folder from extracted magento kit (path:/app/code/Airpay/Airpay/)
*  Then run below commands as root from app/ directory.
$ cd ..
$ php bin/magento cache:clean
$ php bin/magento cache:flush
$ php bin/magento setup:upgrade
$ php bin/magento module:enable Airpay_Airpay --clear-static-content
$ php bin/magento setup:di:compile

 Enabling the module and configuring it with your airpay merchant credentials
       
*   Navigate to 'https://<your_server_domain>/admin/' in your browser to configure AirpayPayment. 
*   Navigate to 'Stores > Configuration > Sales > Payment Methods'
*   Find ‘Airpay’ Payment Method 
*   Enter your Airpay Merchant details and click Save Config 

Note:If Airpay is not visible as a payment method, try clearing cache from System > Cache Management.




Testing Airpay 
   *  Make sure that sandbox mode is on and all details are entered in the airpay configuration. 
   * Go to your store and place and order.
   * If you configured airpay correctly in the previous step, it should appear as an option under payment methods during checkout
   * When you click on checkout, it should redirect you to Airpay's site and show credit card form


Checking the status of payment transaction at Airpay's end from your magento admin
   
   * Login to admin and under Sales, click on Orders. 
   * Click on the first order in the data grid. This should be the order that you just placed
   * When the order details page opens up, look for "Payment Information" block. Inside the block, you can see the latest status of the transaction on airpay's end.

