Use this SDK to connect to the BRI EDC

Features

Communicate to BRI EDC

Getting started

Import espaybriedc package to your project, need to pay attention to the dependencies. Dependencies that current SDK are using:

  1. dio: ^5.4.0
  2. web_socket_channel: ^2.4.0
  3. crypto: ^3.0.3
  4. uuid: ^4.3.3
  5. intl: ^0.19.0

Usage

There are main functions to use:

  1. EspayBriEDC().salePayment(); -> for regular payment
  2. EspayBriEDC().contactlessPayment(); -> for contactless payment
  3. EspayBriEDC().settlement(); -> for settlement process

Some parameters need to be passed inside the function

  1. Variable signatureKey: Unique (Change the variable based on the comm target - will need to integrate to ESPAY backend)
  2. Variable commCode: Unique (Change the variable based on signature target - will need to integrate to ESPAY backend)
  3. Variable transactionId: Unique (Free key-in)
  4. Variable amount: Free key-in
  5. Variable edcIpAddress: Retrieved from ECR Link Wifi Settings
  6. Function (TransactionResponse transactionResponse) {}, use this callback for interact with the response

Transaction Response fields:

  1. message: show success / error message
  2. isSuccess: boolean to determine transaction status
  3. transactionData: if success, data will be returned, if failed data will be null

Additional information

If further information needed, please contact leonardo@sgo.co.id