sendRequest method

  1. @override
Future<String?> sendRequest({
  1. required String request,
})
override

send request for pinelabs device using request request is a json string which can take any supported data e.g.

{
	"Header": {
		"ApplicationId": "abcdefgh",
		"UserId": "user1234",
		"MethodId": "1001",
		"VersionNo": "1.0"
	},
	"Detail": {
		"TransactionType": "4001",
		"BillingRefNo": "TXN12345678",
		"PaymentAmount": "9999000",
		"MobileNumberForEChargeSlip": "9876543210",
		"AdditionalInfo": {
			"Split1": "99991",
			"Split2": "99992",
			"Split3": "99993"
		}
	}
}

Implementation

@override
Future<String?> sendRequest({required String request}) async {
  final version = await methodChannel
      .invokeMethod<String>('doTransaction', {'request': request});
  return version;
}