Download & Install the Plugin
There are three ways to install the Magento Connect Plugin. After the Plugin is installed through any of the options below, please re-index your store and flush your Magento cache to reflect the changes:
- Option 1: Download and install via the Magento Marketplace - Install the Magento Connect Plugin via the Magento Marketplace. The plugin can be found here.
- Option 2: Install via GitHub - Installation by cloning a branch to the vendor directory using the below code:
git clone email@example.com:razoyo/mage2-module-nofraud.git
cp -r mage2-module-nofraud/app/ ~/current
php ~/current/bin/magento setup:upgrade
- Option 3: Install with composer - Installation through composer using the below steps:
A. Update composer to require the "nofraud/connect" package $ composer require nofraud/connect dev-master
B. To enable the module, run $ bin/magento module:enable NoFraud_Connect
C. Then run setup: upgrade to install the necessary updates $ bin/magento setup:upgrade
D. If a production environment - redeploy the static content and run the di compiler
Configure Your NoFraud Settings in Magento
Once installed through any of the three methods, you will now be able to configure the NoFraud settings on your store to complete the set-up. The settings for the module can be found by navigating to Stores > Configuration > NoFraud > Connect:
Within this tab, there are two sections - General and Order Statuses. The settings and options for both sections are included below:
- Enabled — The setting is used to enable/disable the NoFraud Plugin.
- Direct API Token — The API Token used here will be the key from your NoFraud Account > Integration tab. If you have not done so already, please follow the information at the bottom of this guide to obtain your NoFraud API key for this component.
- Sandbox Mode — This setting is used to enable/disable sandbox mode. When set to “Yes,” all transactions will go to our sandbox as a test.
- Screened Order Status — This option allows choosing a specific order status that will be screened by NoFraud. This field is not required. An order status selected here will cause NoFraud to only screen orders matching this status.
- Screened Payment Methods — This field allows you to select which payment methods should be screened by NoFraud. If none are selected, all payment methods will be screened.
- Auto-cancel — This setting, when enabled, causes all failed orders to be automatically cancelled. Cron jobs must be enabled in order to update the order status.
The following statuses ("pass", "review", or "fail") will be applied to orders after checkout, depending on the decision returned from NoFraud. This section of the settings allows you to choose what status you would like the order to reflect once a decision is made. If no status is selected on this screen, NoFraud will still return a decision, but the order's status will not be changed.
- Pass — This field is used to select what status the order should be placed in if the decision returned is Pass.
- Review — This field is used to control which status an order in a Review state is placed in while the final decision (Pass or Fail) is being determined.
- Fail — This field is used to select what status the order should be placed in if the decision returned is Fail, indicating fraud is detected.
- Error — This field is used to select what status the order should be placed in if an error message is returned instead of Pass, Review, or Fail.
Obtaining Your NoFraud API Key
Please note that you need a NoFraud account and API key to complete this step.
- Create an account with NoFraud at https://portal.nofraud.com/users/sign_up
- Click on the "Integrations" tab on the left-hand side of the screen.
- Click the "Create New Integration" button, which will open a window to enter your integration information.
- Input your Integration Name and select "Plugin" for the integration type.
- Select "Magento M2 Connect"
- Click "Create Integration"
- Once created, click the "View / Edit" button to the right of your newly created integration:
- Your NoFraud API will be displayed on the page. This API key will need to be entered in the “Direct API Token” field within Magento by navigating to Stores > Configuration > NoFraud > Connect > General.