getOrderID function

String getOrderID(
  1. String token
)

Implementation

String getOrderID(String token) {
  // Parse and verify the JWT token
  try {
    final jwt = JWT.decode(token);
    return jwt.payload['order_id'];
  } catch (e) {
    return '';
  }
}