> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkesta.com.tr/llms.txt
> Use this file to discover all available pages before exploring further.

# 3D Hash'leme Dökümanı

> 3D Secure callback ve normal işlemler için kullanılan SHA-256 hash doğrulama algoritması

## 🔐 Hash Doğrulama

3D Secure callback ve normal işlemler için kullanılan SHA-256 hash doğrulama algoritması.

### Genel Bilgi

Bu hash mekanizması, ödeme sonucunun doğruluğunu garanti altına almak için kullanılır. Fincraft'ın callback veya yanıt olarak döndüğü verilerin değiştirilmediğini doğrulamak amacıyla oluşturulur. `callbackKey` değeri entegrasyon ekibiniz tarafından sağlanır; almak için [Destek](https://orkesta.com.tr) ile iletişime geçin.

### Hash Algoritması

<Info>
  * **Algoritma:** SHA-256
  * **Encoding:** UTF-8
  * **Output:** Hex (küçük harf)
</Info>

## 3D Secure Başarılı Durum (`is3DSuccess = true`)

### Hash Parametre Sırası

```text theme={null}
token:reconciliationId:orderId:mdStatus:amount:callbackKey
```

### Hash String Oluşturma

```text theme={null}
hashKey = token + ":" + reconciliationId + ":" + orderId + ":" + mdStatus + ":" + amount + ":" + callbackKey
```

### Örnek

```text theme={null}
token=ABC123
reconciliationId=456789
orderId=ORD-001
mdStatus=1
callbackKey=SECRET
amount=3.25

hashKey = ABC123:456789:ORD-001:1:3.25:SECRET
```

## 3D Secure Başarısız / Normal Durum (`is3DSuccess = false`)

### Hash Parametre Sırası

```text theme={null}
reconciliationId:orderId:mdStatus:amount:callbackKey
```

### Hash String Oluşturma

```text theme={null}
hashKey = reconciliationId + ":" + orderId + ":" + mdStatus + ":" + amount + ":" + callbackKey
```

### Örnek

```text theme={null}
reconciliationId=456789
orderId=ORD-001
mdStatus=0
callbackKey=SECRET
amount=3.25

hashKey = 456789:ORD-001:0:3.25:SECRET
```

## Hash Hesaplama

```text theme={null}
hash = SHA256(hashKey).toLowerCase()
```

### Java Örneği

```java theme={null}
String hash = DigestUtils.sha256Hex(hashKey).toLowerCase(Locale.ENGLISH);
```

<Warning>
  **Dikkat:**

  * Parametre sırası kesinlikle değiştirilmemelidir.
  * `:` karakteri separator olarak kullanılmalıdır.
  * `callbackKey` gizli tutulmalıdır.
  * Büyük/küçük harf duyarlılığına dikkat edilmelidir.
</Warning>

<Check>
  Hash doğrulaması başarılı ise işlem güvenlidir ve veri büttünlüğü korunmuştur.
</Check>
