# Doviz POS Integration

## 1.Bank App Protocol

{% content-ref url="../payment-services/bank-app-protocol" %}
[bank-app-protocol](https://developer.tokeninc.com/token-developer-portal-1/payment-service/payment-services/bank-app-protocol)
{% endcontent-ref %}

### 1.1 Sale&#x20;

Add below datas and use them in your Doviz POS(Multi Currency) flow.

**isDovizPOS** : false: not Doviz Txn,   true: Doviz Txn

**currenyRate** : Exchange Rate for currency. 4 bytes decimal. Ex: 1USD = 34,1234 is written as 341234

**currencyUnit**: Integer: This data is from MB currency Table and defines the unit scale for a particular currency used in exchange rate calculations. It specifies whether the exchange rate is based on **1 unit** of the currency (like USD or EUR) or **100 units** (like JPY).

Ex:

* If the `currencyUnit` for JPY is **100**, and the exchangeRate is`21.1234 TL` for JPY, it means **100 JPY = 21.1234 TL**.
* If the `currencyUnit` for USD is **1**, and the exchangeRate is `35.1234 TL` for USD, it means **1 USD = 35.1234 TL**.

**currencyCode** : Currency Code for Sale (TRY, USD, EUR, RUB, GBP, JPY)

**currenyAmount** : Integer: Ex: 1.25 TL is written 125

<mark style="color:red;">NOTE:</mark> The "amount" field returned in the intent to the payment gateway after the sale must represent the amount in TL.

### **1.2 Parameter**&#x20;

Add **DovizPOSAllowed** into **Allowed Operations** as Parameter Action Response Data if Doviz POS(Multi Currency) supported. Also provide the **Supported Currencies** so that the user can select only the supported currency of the banks.

**Allowed Operations**

Allowed Operations will be added with the "AllowedOperations" tag. The allowed transactions will be added as JSON Object, whether the terminal allows payment with QR or not and whether it allows Key In transactions. It will be indicated with “1” if the operation is allowed, “0” if not.

Allowed Operations Bundle Example

```java
AllowedOperations={"QrAllowed":1,"KeyInAllowed":0, "DovizPOSAllowed":1}
```

**Supported Currencies**

Supported Currencies will be added with the "SupportedCurrencies" tag and shared as a String Array.

Supported Currencies Bundle Example

```java
SupportedCurrencies=[USD, EUR, GBP, JPY, RUB]
// USD = US Dollar
// EUR = Euro
// GBP = British Pound
// JPY = Japanese Yen
// RUB = Russian Ruble
```

## **2.Card Service**

{% content-ref url="../payment-services/card-service" %}
[card-service](https://developer.tokeninc.com/token-developer-portal-1/payment-service/payment-services/card-service)
{% endcontent-ref %}

**currencySymbol:** The ISO 4217 currency numeric code to show currency symbol on cardService screens.  Ex:949 for TRY, 840 for USD.

<mark style="color:red;">Note</mark>: currencySymbol should be set  for **getCard** and **getOnlinePINEx.**

**forceICCTermCurrencyCode:** For ICC transactions, temporarily set **currencySymbol** to 5F2A.

## 3.Example Videos

### 1.Currency Settings

{% file src="<https://3604734571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPaz8tFKqEd6volXC5G4B%2Fuploads%2FpFvwDykQq26c7w1C8vOg%2FCurrency%20Settings.mov?alt=media&token=0899266f-0da1-4bf1-bc30-7fa988658788>" %}

### 2.Sale Flow

{% file src="<https://3604734571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPaz8tFKqEd6volXC5G4B%2Fuploads%2FhFGF00IMLJWMRpBchwiM%2FSale.mov?alt=media&token=dd8161b8-733b-4eeb-aac2-da55ba9c9ae1>" %}

## 4. UI Components

new uicomponent.aar library added to use Currency for Amount input.

{% content-ref url="../payment-services/ui-components" %}
[ui-components](https://developer.tokeninc.com/token-developer-portal-1/payment-service/payment-services/ui-components)
{% endcontent-ref %}
