UpiRequestFromUrl constructor

UpiRequestFromUrl(
  1. String responseString
)

Implementation

UpiRequestFromUrl(String responseString) {
  List<String> _parts = responseString.split('&');

  for (int i = 0; i < _parts.length; ++i) {
    String key = _parts[i].split('=')[0];
    String value = _parts[i].split('=')[1];
    if (key == "pn") {
      pn = value;
    } else if (key == "mc") {
      mc = value;
    } else if (key == "tid") {
      tid = value;
    } else if (key.toLowerCase() == "tr") {
      tr = value;
    } else if (key == "am") {
      am = value;
    } else if (key == "cu") {
      cu = value;
    } else if (key == "intent://pay?pa") {
      pa = value;
    }
  }
}