Introduction

Giriş

Harici otomasyon sistem geliştiricilerinin, bu döküman sistemindeki mimari, protokol, iş akışları ve veri içeriklerini inceleyerek, entegrasyon sürecine başlamadan sisteme hakim olmaları amaçlanmıştır.

Harici otomasyon sistem geliştiricileri, bu döküman sisteminden erişecekleri Token template uygulaması ile hem entegrasyonun fonksiyonelleğini görmesi hem de Token DLL in nasıl çalıştığını anlaması Token tarafından hedeflenmiştir.

Token template uygulaması kodlarını inceleyerek, kendi sistemine Token DLL i ekleyerek Token OKC ile hızlıca entegre olacaktır.

Mimari:

Protocol ve İş akışları:

  1. Get Fiscal Parameters: Harici sistem ile Token OKC nin mali olarak eşleşmesi için zorunlu adımdır.

  2. Send Basket ( 300TR & X30TR)

    1. Kendi sisteminiz de Token Integration Protocol ile oluşturduğunuz sepetinizi iletiniz.

      1. Sepet

      2. Ödeme yöntemini talebi (KK, Nakit gibi)

    2. Kendi sisteminizde result bekliyor olacak.

    3. Token OKC platformunda Ödeme ve Mali processeler çalışır.

    4. Token Integration Protocol Result İçeriği

      1. Ödeme bilgileri (Ödeme türü, Varsa BKM ID, Tutar )

      2. Fiş bilgileri (Fiş no, Z no, Ekü no)

      3. Fatura bilgileri (UUID,)

  3. Error Handling : Dokumana eklenecektir.

  4. Güvenlik : Dokumana eklenecektir.

Token Integration Protocol

// Send Basket
{
  "basketID": "93ced0be-99f5-4e42-b0ca-bc781c778d69",
  "createInvoice": false,
  "documentType": 0,
  "isVoid": false,
  "items": [
    {
      "name": "GIDA",
      "price": 500,
      "sectionNo": 1,
      "taxPercent": 1000,
      "type": 0,
      "limit": 0,
      "quantity": 1000
    },
    {
      "barcode": "",
      "name": "Armut",
      "pluNo": 0,
      "price": 1500,
      "sectionNo": 1,
      "taxPercent": 1000,
      "type": 0,
      "limit": 0,
      "quantity": 1000
    }
  ],
  "adjust": {
    "description": "20 tl indirim",
    "discountOrSurcharge": 0,
    "type": 0,
    "value": 2000
  }
}
// Basket Result

//Successful sale
{
  "basketID": "93ced0be-99f5-4e42-b0ca-bc781c778d69",
  "documentType": 0,
  "InstanceIdentifier": "XXXX",
  "invoiceID": "",
  "message": "OK",
  "paymentCount": 1,
  "paymentItems": [
    {
      "amount": 2000,
      "BatchNo": 0,
      "currencyId": 0,
      "description": "Nakit",
      "operatorId": 0,
      "status": -1,
      "TxnNo": 0,
      "type": 1
    }
  ],
  "receiptNo": 2,
  "status": 0,
  "UUID": "aa2c8046-f0bd-4617-9f5d-0bb6eb4f4ed7",
  "zNo": 12
}

//Unsuccessful sale
{
  "basketID":"93ced0be-99f5-4e42-b0ca-bc781c778d69",
  "message":"CANCELLED",
  "status":-1
}

Token Integration Protocol in Action

Destekleyici Tool ve yazılımlar:

  1. PC Simulator : Token PC simulator ile Token test OKC ile uçtan uca sistemin nasıl çalıştığını görebilirsiniz.

  2. PC Simulator açık kaynak kodu GIT. Den erişebilirsiniz.

  3. PC DLL: eklenecektir.

Last updated