This is a Payment Module for Magento 2 Community Edition, that gives you the ability to process payments through payment service providers running on beGateway platform.
- Magento 2 Community Edition 2.x (Tested up to 2.1.3)
- beGateway PHP API library v2.7.x - (Integrated in Module)
- PCI DSS certified server in order to use
beGateway Direct
Note: this module has been tested only with Magento 2 Community Edition, it may not work as intended with Magento 2 Enterprise Edition
-
Install Composer - Composer Download Instructions
-
Install beGateway Gateway
-
Install Payment Module
$ composer require begateway/magento2-payment-module
-
Enable Payment Module
$ php bin/magento module:enable BeGateway_BeGateway
$ php bin/magento setup:upgrade
-
Deploy Magento Static Content (Execute If needed)
$ php bin/magento setup:static-content:deploy
-
-
Download the Payment Module archive, unpack it and upload its contents to a new folder
<root>/app/code/BeGateway/BeGateway/of your Magento 2 installation -
Install beGateway PHP API Library
$ composer require begateway/begateway-api-php
-
Enable Payment Module
$ php bin/magento module:enable BeGateway_BeGateway --clear-static-content
$ php bin/magento setup:upgrade
-
Deploy Magento Static Content (Execute If needed)
$ php bin/magento setup:static-content:deploy
- Login inside the Admin Panel and go to
Stores->Configuration->Sales->Payment Methods - If the Payment Module Panel
beGatewayis not visible in the list of available Payment Methods, go toSystem->Cache Managementand clear Magento Cache by clicking onFlush Magento Cache - Go back to
Payment Methodsand click the buttonConfigureunder the payment methodbeGateway CheckoutorbeGateway Directto expand the available settings - Set
EnabledtoYes, set the correct credentials, select your prefered transaction types and additional settings and clickSave config
This configuration is needed for beGateway Direct Method to be usable.
Steps:
- Ensure you have installed a valid SSL Certificate on your Web Server & you have configured your Virtual Host correctly.
- Login to Magento 2 Admin Panel
- Navigate to
Stores->Configuration->General->Web - Expand Tab
Base URLs (Secure)and setUse Secure URLs on StorefrontandUse Secure URLs in AdmintoYes - Set your
Secure Base URLand clickSave Config - It is recommended to add a Rewrite Rule from
httptohttpsor to configure a Permanent Redirect tohttpsin your virtual host
If you setup the module with default values, you can use the test data to make a test payment:
- Shop Id
361 - Shop Secret Key
b8647b68898b084b836474ed8d61ffe117c9a01168d867f24953b776ddcb134d - Checkout Domain
checkout.begateway.com - Gateway Domain
demo-gateway.begateway.com
- Card number
4200000000000000 - Card name
John Doe - Card expiry date
01/20to get a success payment - Card expiry date
10/20to get a failed payment - CVC
123
Модуль оплаты для Magento 2 Community Edition, который даст вам возможность начать принимать платежи через провайдеров платежей, использующих платформу beGateway.
- Magento 2 Community Edition 2.x (тестировалось на версиях до 2.1.3)
- beGateway PHP API библиотека v2.7.x - (поставляется с модулем)
- PCI DSS сертифицированный сервер, чтобы принимать платежи через
beGateway Direct
Примечание: этот модуль тестировался только с Magento 2 Community Edition и может работать не стабильно с Magento 2 Enterprise Edition
-
Установите Composer - инструкция по установке Composer
-
Установите beGateway Gateway
-
Установите модуль оплаты
$ composer require begateway/magento2-payment-module
-
Включите модуль оплаты
$ php bin/magento module:enable BeGateway_BeGateway
$ php bin/magento setup:upgrade
-
Создайте статичный контент Magento (выполните если необходимо)
$ php bin/magento setup:static-content:deploy
-
-
Скачайте архив модуля, распакуйте его и скопируйте его содержимое в новую директорию
<root>/app/code/BeGateway/BeGateway/вашей Magento 2 инсталляции -
Установите beGateway PHP API библиотеку
$ composer require begateway/begateway-api-php
-
Включить модуль оплаты
$ php bin/magento module:enable BeGateway_BeGateway --clear-static-content
$ php bin/magento setup:upgrade
-
Создайте статичный контент Magento (выполните если необходимо)
$ php bin/magento setup:static-content:deploy
- Войдите в личный кабинет администратора и перейдите в
Магазины->Конфигурация->Продажи->Методы оплаты - Если панель модуля оплаты
beGatewayне видна в списке доступных методов оплаты, то перейдите вСистема->Управление кэшеми очистите Magento кэш, нажавОчистить кэш Magento - Вернитесь назад в
Методы оплатыи нажмите кнопкуНастроитьпод способом оплатыbeGateway CheckoutилиbeGateway Direct, чтобы раскрыть доступные настройки - Выберите
Дав выпадающем списке параметраВключено, задайте данные вашего магазина, выберите тип операции, доступные способы оплаты и прочие настройки. НажмитеСохранить конфигурацию, чтобы их сохранить
Данная настройка необходима для использования способа оплаты beGateway Direct.
Шаги (названия параметров могут отличаться из-за различных пакетов русификации Magento):
- Убедитесь, что вы установили рабочий SSL сертификат на вашем веб-сервере и произвели необходимые настройки.
- Зайдите в панель администратора Magento 2
- Перейдите в
Магазины->Конфигурация->Основное->Веб - Раскройте закладку
Базовые URLs (безопасные)и установитеИспользовать защищённые URL в магазинеиИспользовать защищённые URL в панели администрированиявДа - Задайте ваш
Базовый защищённый URLи нажмитеСохранить конфигурацию - Рекомендуем добавить Rewrite Rule с
httpнаhttpsили настроить Permanent Redirect наhttpsв настройках вашего веб-сервера
Вы можете использовать приведенные ниже тестовые данные, чтобы протестировать оплату.
- Id магазина
361 - Секретный ключ магазина
b8647b68898b084b836474ed8d61ffe117c9a01168d867f24953b776ddcb134d - Домен страницы оплаты
checkout.begateway.com - Домен платежного шлюза
demo-gateway.begateway.com
- Номер карты
4200000000000000 - Имя на карте
John Doe - Срок действия для успешной оплаты
01/20 - Срок действия для неуспешной оплаты
10/20 - CVC
123