Magento 2 Sage Pay Integration will allow the store owner to offer and process digital as well as physical payments to their customers. The Sage payment gateway is the most widely used payment platform in Europe.
Recently, the name of sage pay payment has changed to Opayo as the company is acquired by another top venture in payments and the US Bank subsidiary i.e, Elavon for the UK and Irish Sage Pay business.
Also, the Sage pay payment method is PCI DSS Level 1 compliant that makes it more secure and protects the store owners and the businesses from fraud and data theft. While the payment is in process, the card details of the customer are not saved at any end.
For the integration, it is a must for the store owner to generate the API credentials. The method supports 3D secure checkout that adds an extra level of security.
Further, the customer can also request online or offline refunds. The payment method supports British Pound. The customer can use any of the debit cards, credit cards, Visa, etc all are compatible.
Magento 2 Company ? Find out More
Moreover, the payment method also applies checks like AVS i.e Address Verification Service and CV2 to protect the payment from unexpected fraud.
Webkul is a proud partner with Opayo helping merchants to receive online card payments on their e-commerce stores. Apply for an Opayo merchant account to get started.
Watch the video tutorial below to understand the extension workflow:
- Enable/disable payment method from the admin panel.
- Accept all the cards including debit, credit, Visa, etc.
- The admin can enable 3D secure authentication from the backend.
- Admin can refund the invoiced amount for orders.
- PCI compliant payments system, PCI DSS level 1 certification.
- This module also provides the capture later facility for the available funds.
- The admin can restrict the customer to use some specific cards from the backend.
Sage Pay Payment Gateway for Magento 2 installation is super easy. First, you have to unzip the module and then you will get an src folder.
Click on the src folder and then you will get the app folder. You need to move the app folder in Magento 2 root directory as per the screenshot.
After the successful installation, you have to run these commands in the Magento2 root directory.
First command –
php bin/magento setup:upgrade
Second Command –
php bin/magento setup:di:compile
Third Command –
php bin/magento setup:static-content:deploy
Fourth Command –
php bin/magento indexer:reindex
After running the commands, you have to log into the admin panel and you have to clear the Cache. You can refer to the below screenshot.
For the multilingual support, the admin will navigate through Store > Configuration > General > Locale Options and select the locale as German (the language into which admin wants to translate his store content).
If you need to do the module translation, please navigate the following path in your system. app/code/Webkul/SagePay/i18n. Open the file named en_US.CSV for editing as shown in the below screenshot.
Moreover, once you have opened the file for editing. Replace the words after the comma(,) on the right with your translated words.
After editing the CSV file, save it and then upload it to the same folder. Now your Magento 2 Sage Pay module translation is complete.
Create Sage Pay Account
For the Sage Pay payment method integration, the admin requires registering an account in Sage by visiting the link.
After the submission of the form, the user will receive the mail for authentication. After the successful registration, Sage Pay will send the mail to share the information like Vendor Name, Key, and Password.
Further, the user can also use the test account credentials from this link. Credentials are provided for two kinds of profiles i.e Basic Profile and Extra check Profile. The admin can use any of them as per the requirement.
Moreover, for basic profile and extra check profile, the AVS/ CV2 checks are by default disabled and enabled respectively.
After the successful installation of the Magento 2 Sage Pay module, the admin will now configure the payment option from the backend. For this, the admin will navigate to Stores > Configuration > Sales > Payment Methods > Sage Pay.
The admin will set the following details:
Enabled: Firstly, the admin will enable the payment method.
Title: The admin will enter the title of the payment method that will be visible on the front end.
Sandbox: The admin will select Yes to choose the sandbox environment and No to work on production mode.
Vendor Name: Enter the vendor name received from Sage Pay.
Key: Enter the key received from Sage Pay.
Password: Enter the Password received from Sage Pay.
Integration Type: The admin will select Direct Integration for this field.
Payment Action: The admin can select the payment action among Authorize and Authorize and Capture, both are having different functionalities mentioned in the user guide.
When the admin selects Authorize in the admin configuration, then the invoice will be generated by the admin manually. No invoice will be there under the invoice tab in the starting:
After clicking on the Invoice button, the admin will direct to the new invoice page. After selecting the amount as Capture Online, the admin will click on Submit Invoice.
Finally, the manual invoice is ready from the admin end.
Authorize and Capture
Further, for authorization and capture, the invoice is generated automatically just after the completion of payment. The invoice will be present in the Invoices tab under order details.
Enable 3D Secure: The admin will select among multiple options to enable/ disable the 3D Secure.
- Use default MySagePay settings: In this the authentication will be applied as per the selected default profile. That means, for basic profile validation will be disabled, and for extra check profile the authentication will be disabled.
- Apply authentication even if turned off: If this option is selected then the 3D Secure Authenticatication will surely happen at the time of checkout, does not matter which profile is been selected.
- Disable authentication and rules: If this option is selected then no 3D Secure Authenticatication will take place at the time of checkout, does not matter which profile is been selected.
- Apply authentication but ignore rules: The authentication will be done without following the rules created by the admin within the sage pay account.
Credit Card Types: Finally, the admin will select the cards using which the customers will make payments.
Further, the admin will save the configurations and the payment method will work on the frontend.
- The admin can use the test credentials for sandbox mode.
- The module does not support multiple address shipping.
- This module only supports british pound. So please select british pound as currency from backend.
Checkout Using Sage Pay Payment Gateway
Once the configuration is done from the backend then the customer will process the checkout using the Sage Pay payment method. The shopping cart page is shown in the image below with the product:
Furthermore, to commend the checkout, the customer will click on the Proceed to checkout button as shown in the image above. The next visible page will be the shipping address. So the customer will select the shipping address and shipping method as shown in the image below:
After clicking on the Next button, the customer will navigate to the payment page. Hereafter, the customer will select the payment method as Sage Pay and enter the basic card details as shown in the image below, and click on the Place Order button:
The customer will then proceed further for purchase authentication and answer the security questions with their bank to complete the payment as shown below in the snapshot.
After the successful authentication, the customer will navigate to the order success page.
Once the order is placed the customer will check the order under the My account > My orders section. the sage pay method will be visible under the payment details sections:
Admin Checks Order Details
Once the order is placed the admin will now check the order details from the Sales > Orders section. After selecting the desired order the customer will view the order details as shown in the image below:
Order Transaction Details
Once the payment and order are completed successfully, the transaction will be generated automatically. Under the Transaction tab, the admin will check the generated transaction as shown in the image below:
After selecting the transaction, its details will be visible as shown in the image below:
In the above image, the 3DSecureStatus will depend on the card selected while making the payment. That means the 3-D Secure object status for the entered card will be visible here.
Order Invoice Details
The admin will also check the invoice details under the Invoices tab, as shown in the image below.
Further in the invoice details the sage pay method under the payment information section as shown in the image below:
The admin can create the refund for the order whose invoice is generated, Let’s take an example for the order shown below. For an online refund, the admin will generate a refund from the Invoice section. The admin will view the invoice as visible in the image below:
After that, the admin will see the invoice details and click on the Credit Memo button present in the top as visible in the image below:
Further, the admin will click on the Refund button to generate a new refund.
Now, the admin will tap on the Refund tab as per the snapshot below.
After the creation of the refund, the admin can view the credit memo under the Credit Memo tab.
Further, the admin can view the credit memo by clicking on the view button, the payment details will also be visible as sage pay as shown in the image below:
Further, the admin will be able to see the transaction for this refund as shown in the image below:
Also, the transaction details will contain the transaction type as Refund:
The customer will check it from the storefront. For this, the customer will navigate to My Account > My Orders. After viewing the particular order it is visible as shown in the image below:
That’s all for Sage Pay Payment Gateway for Magento 2 module. Still, have any issues feel free to add a ticket and let us know your views to make the module better http://webkul.uvdesk.com/
Current Product Version - 4.0.3
Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x