Back to All

flutter integration

how to access onsucces method in flutter integration

example:

ScgatewayFlutterPlugin.setConfigEnvironment(
GatewayEnvironment.PRODUCTION,
'futurewise-technologies',
false,
[checkAccountType()],
isAmoenabled: false);

so i am using this method so giving wrong response , i got this response :--->

{
"data":{
"batches":[
{
"filled":1,
"variety":"regular",
"buyAmount":16.5,
"sellAmount":0,
"orders":[
{
"orderType":"MARKET",
"product":"CNC",
"price":0,
"exchange":"NSE",
"status":"COMPLETE",
"quantity":2,
"tradingsymbol":"SUZLON",
"transactionType":"BUY",
"orderTimestamp":"2023-04-11T06":"47":34.000Z,
"filledQuantity":2,
"averagePrice":8.25,
"exchangeOrderId":1300000011437423,
"triggerPrice":0,
"statusMessage":"EXECUTED"
}
],
"unplaced":[

        ],
        "batchId":64350286c769201efb8957de,
        "broker":"groww",
        "quantity":1,
        "status":"COMPLETED",
        "completedDate":"2023-04-11T06":"47":37.668Z,
        "transactionId":TRX_100ebf912e50417cba4045373c85c94c
     }
  ]

},
"broker":"groww",
"smallcaseAuthToken":eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFsbGNhc2VBdXRoSWQiOiI2NDJhNjMzMzBlOTk4MjdkNGYyMDJiZWYiLCJpYXQiOjE2ODExOTU2MDMsImV4cCI6MTY4MTE5OTIwM30.GJQryZbP0M1sUT0Nu_EbNsNpNMnmKu7c93VwbG-ePKU,
"transactionId":TRX_100ebf912e50417cba4045373c85c94c,
"success":true,
"transaction":"TRANSACTION"
}

i getting this response but its not as per the transcation response as per doc .

      ScgatewayFlutterPlugin.initGateway(response['authToken']);
      var newdata = await ScgatewayFlutterPlugin.triggerGatewayTransaction(
          response['transactionDetails']['data']['transactionId']);