# Drupal 8, 9 (commerce)

**Instructions for configuring and installing the module.**

{% hint style="info" %}
The module supports working with version 8 and 9 of Drupal (commerce)
{% endhint %}

1\. Download the [archive with the module](https://github.com/unitpay/drupal/archive/main.zip).

2\. install the module. to do this, go to extend - > install new module. Select the archive with the module and then "Save".

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOawKLLfWHMWJMmV0WF%2F-MOax6uViREeY5BtpJvb%2Fd_%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0.png?alt=media\&token=3a383094-2f99-4fde-b9d4-1ec936ae2c1e)

3\. Go To commerce - > Configuration -> Payment gateway. PAYMENT GATEWAY: "Unitpay" click "edit".In the DOMAIN field, INSERT the value unitpay.ru, in thePUBLIC KEY  and SECRET KEY , copy the public and secret key from the unitpay personal account.

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOawKLLfWHMWJMmV0WF%2F-MOaxzDsKs5dv4RG83oS%2F8%20%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B81.png?alt=media\&token=f9214a5f-7b60-4acb-bba8-fc568ea32327)

4\. Enable the module and save it.

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOawKLLfWHMWJMmV0WF%2F-MOayDJQhQdZmNxzqxGV%2F8%20%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B82.png?alt=media\&token=a42bc1c0-fac9-4a69-acf2-7050c62570fa)

5\. in your unitpay dashboard, add the address of the handler in the format http\://\<name of your site>/commerce-unitpay/callback

<div align="left"><img src="https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOayMIE6gaqbI0JWLbc%2F-MOaz1kGx_bgWIOimwQp%2F213514da544a8913f88105cb2135f9ae.png?alt=media&#x26;token=dc539844-f37c-45c8-bd55-03d37e0c38ef" alt=""></div>

6\. VAT is set inside the module settings Commerce -> Configuration -> Payment gateway

<div align="left"><img src="https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOayMIE6gaqbI0JWLbc%2F-MOb-1RtPRjSEDF0Hgs4%2F6e56d9874bd24b7521520cac32b1d278.png?alt=media&#x26;token=99bef4ff-9088-470e-a594-dd940479763a" alt=""></div>

7\. the currency is set in two places. Commerce -> Configuration -> Currencies

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOayMIE6gaqbI0JWLbc%2F-MOb-dxsz70S3R1R60Td%2F6a75171b61038834536fdc4987f3386b.png?alt=media\&token=f56a9a30-4e70-451b-8ea8-70b4f3e8751f)

8\. and then, to be able to change in products, you need to add to "Product types". Commerce -> Configuration -> Product types -> Edit Default -> Manage fields

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOb00Em66gikOEOVqmO%2F-MOb02bwVRPtpnsbwbjr%2F1111.png?alt=media\&token=833e6ce7-3abe-44b2-b07f-faa4dadde4ad)

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOb00Em66gikOEOVqmO%2F-MOb0GOxjd84N11UN3M0%2F222.png?alt=media\&token=ff2c05f0-8e2f-402d-8db1-2045a3b78539)

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOb00Em66gikOEOVqmO%2F-MOb0UIICNTh39Xrhjq6%2F3333.png?alt=media\&token=c6752256-2349-4ba0-9747-152661e8cb24)

![](https://244174165-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M9Y_k8Gr-WxeECFRelw%2F-MOb00Em66gikOEOVqmO%2F-MOb0X3KnzvZCz6QMfpC%2F4444.png?alt=media\&token=d6ee27d7-ab3e-4cef-958a-9ea2360af2bc)

9\. Similarly, you need to do for "variation types". Commerce -> Configuration -> Product variation types -> Edit Default -> Manage fields
