espaybriedc 0.0.7
espaybriedc: ^0.0.7 copied to clipboard
Espay EDC
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:
- dio: ^5.4.0
- web_socket_channel: ^2.4.0
- crypto: ^3.0.3
- uuid: ^4.3.3
- intl: ^0.19.0
Usage #
There are main functions to use:
- EspayBriEDC().salePayment(); -> for regular payment
- EspayBriEDC().contactlessPayment(); -> for contactless payment
- EspayBriEDC().settlement(); -> for settlement process
Some parameters need to be passed inside the function
- Variable signatureKey: Unique (Change the variable based on the comm target - will need to integrate to ESPAY backend)
- Variable commCode: Unique (Change the variable based on signature target - will need to integrate to ESPAY backend)
- Variable transactionId: Unique (Free key-in)
- Variable amount: Free key-in
- Variable edcIpAddress: Retrieved from ECR Link Wifi Settings
- Function (TransactionResponse transactionResponse) {}, use this callback for interact with the response
Transaction Response fields:
- message: show success / error message
- isSuccess: boolean to determine transaction status
- 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